 |
Bsoft
2.1.0
Bernard's software package
|
Go to the documentation of this file.
25 "Usage: bbild [options] in1.star [in2.star ...]",
26 "----------------------------------------------",
27 "Generates BILD output from a model.",
30 "-all Reset selection to all models before other selections.",
31 "-type poly Type of BILD output: views, polygons or neighbors.",
32 "-linklength 56.3 Generate links with this maximum length.",
33 "-color spectrum Color selection or polygons: spectrum=red->blue, density, fom.",
36 "-verbose 7 Verbose output.",
37 "-componentradius 8.4 Set display radius for all components.",
38 "-linkradius 5.1 Set display radius for all links.",
41 "-output file.bild Output model file.",
46 int main(
int argc,
char **argv)
60 for ( curropt = option; curropt; curropt = curropt->
next ) {
61 if ( curropt->
tag ==
"all" ) reset = 1;
62 if ( curropt->
tag ==
"type" ) bild_type = curropt->
value.
lower();
63 if ( curropt->
tag ==
"linklength" )
64 if ( ( linklength = curropt->
value.
real() ) < 0.1 )
65 cerr <<
"-linklength: A link length must be specified!" << endl;
66 if ( curropt->
tag ==
"color" ) {
71 if ( curropt->
tag ==
"componentradius" )
72 if ( ( comprad = curropt->
value.
real() ) < 0.001 )
73 cerr <<
"-componentradius: A display radius must be specified!" << endl;
74 if ( curropt->
tag ==
"linkradius" )
75 if ( ( linkrad = curropt->
value.
real() ) < 0.001 )
76 cerr <<
"-linkradius: A radius must be specified!" << endl;
77 if ( curropt->
tag ==
"output" )
86 while ( optind < argc )
string_add(&file_list, argv[optind++]);
88 cerr <<
"Error: No parameter or image files specified!" << endl;
96 cerr <<
"Error: Input file not read!" << endl;
117 if ( bild_type[0] ==
'v' )
119 else if ( bild_type[0] ==
'f' )
121 else if ( bild_type[0] ==
's' )
123 else if ( bild_type[0] ==
'b' )
125 else if ( bild_type[0] ==
'c' )
127 else if ( bild_type[0] ==
'p' )
129 else if ( bild_type[0] ==
'n' )
A class for a command line input option.
int write_model_bild(Bstring &filename, Bmodel *model)
Writes Chimera BILD model parameters.
int string_kill(Bstring *list)
Kills a string linked list.
int model_to_bild_view_sphere(Bstring &filename, Bmodel *model, int color_type)
Converts a model into a representation with views.
int model_to_bild_view_polygons(Bstring &filename, Bmodel *model, int order, int color_type)
Converts a model into a representation with view polygons.
Header file for reading and writing atomic model files.
long model_set_link_radius(Bmodel *model, double linkrad)
Set the display radius for all links to a specific value.
int bexit(int value)
Exit function for cleanup and debugging.
Boption * get_option_list(const char *use[], int argc, char *argv[], int &optind)
Parses command line arguments based on a template.
Header file for option handlers.
Library routines used for model link processing.
long models_process(Bmodel *model, long(modfunc)(Bmodel *))
Process a list of models using the specified function.
long model_selection_stats(Bmodel *model)
Calculates selection statistics.
int model_kill(Bmodel *model)
Deallocates all memory in the list.
long model_link_list_generate(Bmodel *model, double maxlength)
Generates a link list for a model based on vertex separation.
Header file for reading and writing atomic model files.
Utilities for timing functions.
int model_to_bild_neighbor_planes(Bstring &filename, Bmodel *model, int color_type)
Converts a model into a bild neighbor plane representation.
long model_reset_selection(Bmodel *model)
Resets the selection to all components.
Header file for reading and writing Chimera BILD files.
double timer_start()
Starts timer and prints the time.
Header file for general utilities.
int write_model(Bstring &filename, Bmodel *model)
Writes model parameters.
int main(int argc, char **argv)
double timer_report(double lasttime)
Reports the time elapsed since a given time.
int option_kill(Boption *option)
Deallocates a linked list of option structures.
Library routines used for model processing.
Bmodel * read_model(Bstring &filename)
int model_to_bild_orientations(Bstring &filename, Bmodel *model, int vec_type, int color_type)
Converts a model into a representation with views.
bool contains(const Bstring &s)
long model_set_component_radius(Bmodel *model, double comprad)
Set the display radius for all components to a specific value.
Bstring * string_add(Bstring **list, const char *string)
Adds a string to a linked list.
int model_to_bild_polygons(Bstring &filename, Bmodel *model, int color_type)
Converts a model into a bild polygon representation.