Bsoft 2.1.4
Bernard's software package
rwmodel_bild.cpp File Reference

Library routines to read and write Chimera BILD model parameters. More...

#include "rwmodel.h"
#include "model_neighbors.h"
#include "model_poly.h"
#include "Color.h"
#include "string_util.h"
#include "utilities.h"
#include "timer.h"
#include <fstream>

Functions

Bcomponentcomponent_add_if_not_exist (Vector3< double > loc, Bcomponent **comp, int &number)
 
Bmodelread_model_bild (Bstring *file_list)
 Reads Chimera BILD model parameters. More...
 
void bild_color (ofstream &fbld, RGB< float > rgb)
 
void bild_color (ofstream &fbld, RGBA< float > rgba)
 
void bild_sphere (ofstream &fbld, Vector3< double > loc, double radius)
 
void bild_cylinder (ofstream &fbld, Vector3< double > start, Vector3< double > end, double radius)
 
void bild_polygon_start (ofstream &fbld, Vector3< double > vertex)
 
void bild_polygon_add (ofstream &fbld, Vector3< double > vertex)
 
void bild_polygon_end (ofstream &fbld, Vector3< double > vertex)
 
void bild_arrow (ofstream &fbld, Vector3< double > start, Vector3< double > end, double cylrad, double conerad, double rho)
 
int write_model_bild (Bstring &filename, Bmodel *model, int splt)
 Writes Chimera BILD model parameters. More...
 
int model_to_bild_orientations (Bstring &filename, Bmodel *model, int vec_type, int color_type)
 Converts a model into a representation with views. More...
 
int model_to_bild_view_sphere (Bstring &filename, Bmodel *model, int color_type)
 Converts a model into a representation with views. More...
 
int model_to_bild_force_vectors (Bstring &filename, Bmodel *model, int color_type)
 Converts a model into a representation with views. More...
 
int model_to_bild_view_polygons (Bstring &filename, Bmodel *model, int order, int color_type)
 Converts a model into a representation with view polygons. More...
 
int model_to_bild_polygons (Bstring &filename, Bmodel *model, int color_type)
 Converts a model into a bild polygon representation. More...
 
int model_to_bild_neighbor_planes (Bstring &filename, Bmodel *model, int color_type)
 Converts a model into a bild neighbor plane representation. More...
 

Variables

int verbose
 

Detailed Description

Library routines to read and write Chimera BILD model parameters.

Author
Bernard Heymann
Date
Created: 20080521
Modified: 20221115

Function Documentation

◆ bild_arrow()

void bild_arrow ( ofstream &  fbld,
Vector3< double >  start,
Vector3< double >  end,
double  cylrad,
double  conerad,
double  rho 
)

◆ bild_color() [1/2]

void bild_color ( ofstream &  fbld,
RGB< float >  rgb 
)

◆ bild_color() [2/2]

void bild_color ( ofstream &  fbld,
RGBA< float >  rgba 
)

◆ bild_cylinder()

void bild_cylinder ( ofstream &  fbld,
Vector3< double >  start,
Vector3< double >  end,
double  radius 
)

◆ bild_polygon_add()

void bild_polygon_add ( ofstream &  fbld,
Vector3< double >  vertex 
)

◆ bild_polygon_end()

void bild_polygon_end ( ofstream &  fbld,
Vector3< double >  vertex 
)

◆ bild_polygon_start()

void bild_polygon_start ( ofstream &  fbld,
Vector3< double >  vertex 
)

◆ bild_sphere()

void bild_sphere ( ofstream &  fbld,
Vector3< double >  loc,
double  radius 
)

◆ component_add_if_not_exist()

Bcomponent * component_add_if_not_exist ( Vector3< double >  loc,
Bcomponent **  comp,
int &  number 
)

◆ model_to_bild_force_vectors()

int model_to_bild_force_vectors ( Bstring filename,
Bmodel model,
int  color_type 
)

Converts a model into a representation with views.

Parameters
&filenamebild format file name.
*modelmodel structure.
color_typeflag to color components.
Returns
int 0, <0 on error.
A sphere is drawn for every component with a cylinder indicating its view.

◆ model_to_bild_neighbor_planes()

int model_to_bild_neighbor_planes ( Bstring filename,
Bmodel model,
int  color_type 
)

Converts a model into a bild neighbor plane representation.

Parameters
&filenamebild format file name.
*modelmodel structure.
color_typeflag to color planes.
Returns
int 0, <0 on error.
Color scheme types:
    1   spectrum/rainbow.
    2   fom.

◆ model_to_bild_orientations()

int model_to_bild_orientations ( Bstring filename,
Bmodel model,
int  vec_type,
int  color_type 
)

Converts a model into a representation with views.

Parameters
&filenamebild format file name.
*modelmodel structure.
vec_type0=views, 1=vectors, 2=velocity vectors.
color_typeflag to color components.
Returns
int 0, <0 on error.
A sphere is drawn for every component with a cylinder indicating its view.

◆ model_to_bild_polygons()

int model_to_bild_polygons ( Bstring filename,
Bmodel model,
int  color_type 
)

Converts a model into a bild polygon representation.

Parameters
&filenamebild format file name.
*modelmodel structure.
color_typeflag to color polygons.
Returns
int 0, <0 on error.
Color scheme types:
    1   spectrum/rainbow.
    2   fom.

◆ model_to_bild_view_polygons()

int model_to_bild_view_polygons ( Bstring filename,
Bmodel model,
int  order,
int  color_type 
)

Converts a model into a representation with view polygons.

Parameters
&filenamebild format file name.
*modelmodel structure.
orderpolygon order.
color_typeflag to color components.
Returns
int 0, <0 on error.
A sphere is drawn for every component with a cylinder indicating its view.

◆ model_to_bild_view_sphere()

int model_to_bild_view_sphere ( Bstring filename,
Bmodel model,
int  color_type 
)

Converts a model into a representation with views.

Parameters
&filenamebild format file name.
*modelmodel structure.
color_typeflag to color components.
Returns
int 0, <0 on error.
A sphere is drawn for every component with a cylinder indicating its view.

◆ read_model_bild()

Bmodel * read_model_bild ( Bstring file_list)

Reads Chimera BILD model parameters.

Parameters
*file_listlist of model parameter file names.
Returns
Bmodel* model parameters.

◆ write_model_bild()

int write_model_bild ( Bstring filename,
Bmodel model,
int  splt 
)

Writes Chimera BILD model parameters.

Parameters
&filenamemodel parameter file name.
*modelmodel parameters.
spltflag to split into separate models.
Returns
int models written.

Variable Documentation

◆ verbose

int verbose
extern