 |
Bsoft
2.1.0
Bernard's software package
|
Go to the documentation of this file.
25 "Usage: bmodcomp [options] in.star",
26 "---------------------------------",
27 "Compares models internally or to reference models.",
30 "-all Select all models for comparison.",
31 "-distance Calculate a distance matrix.",
32 "-unknown Select unknown models for comparison.",
33 "-closed order,3 Select based on valency (valency,<n>) or polygon order (order,<n>).",
34 "-consensus 12.5 Calculate a consensus model: components are considered the same if within the given distance.",
37 "-verbose 7 Verbosity of output.",
40 "-parameters parm.star Molecular parameter file (default atom_prop.star).",
41 "-reference ref.star File with reference models.",
44 "-output new.star Output model file.",
45 "-writereference ref.star Reference output model file.",
46 "-matrix file.mat Distance matrix.",
47 "-image file.map Distance matrix as an image.",
52 int main(
int argc,
char **argv)
72 for ( curropt = option; curropt; curropt = curropt->
next ) {
73 if ( curropt->
tag ==
"all" ) all = 1;
74 if ( curropt->
tag ==
"distance" ) calc_dist = 1;
75 if ( curropt->
tag ==
"unknown" ) unknown = 1;
76 if ( curropt->
tag ==
"closed" ) {
77 if ( curropt->
value[0] ==
'v' ) closure_rule = 1;
78 if ( curropt->
value[0] ==
'o' ) closure_rule = 2;
82 if ( curropt->
tag ==
"consensus" )
84 cerr <<
"-consensus: A cutoff distance must be specified!" << endl;
85 if ( curropt->
tag ==
"parameters" )
87 if ( curropt->
tag ==
"reference" )
89 if ( curropt->
tag ==
"output" )
91 if ( curropt->
tag ==
"writereference" )
93 if ( curropt->
tag ==
"matrix" )
95 if ( curropt->
tag ==
"image" )
104 while ( optind < argc )
string_add(&file_list, argv[optind++]);
106 cerr <<
"Error: No model files specified!" << endl;
165 if ( refoutfile.
length() ) {
A class for a command line input option.
int main(int argc, char **argv)
int string_kill(Bstring *list)
Kills a string linked list.
Header file for reading and writing atomic model files.
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.
long model_select_unknowns(Bmodel *model)
Resets the selection to all unknown models.
Functions to compare models and components.
double model_compare(Bmodel *model1, Bmodel *model2)
Compares two models.
long models_process(Bmodel *model, long(modfunc)(Bmodel *))
Process a list of models using the specified function.
int write_img(const char *filename, Bimage *p, int compression)
General driver function to write multiple image formats.
Bmodel * models_consensus(Bmodel *model, double distance)
Determines a consensus between models in a list.
int model_kill(Bmodel *model)
Deallocates all memory in the list.
General image parameter class.
Header file for reading and writing atomic model files.
Utilities for timing functions.
double distance(vector< T1 > &v1, vector< T2 > &v2)
long model_reset_selection(Bmodel *model)
Resets the selection to all components.
double timer_start()
Starts timer and prints the time.
Header file for general utilities.
int write_model(Bstring &filename, Bmodel *model)
Writes model parameters.
double timer_report(double lasttime)
Reports the time elapsed since a given time.
Matrix model_distance_matrix(Bmodel *model, int view_flag)
Calculates the distance matrix for a model.
Header file for 2D and 3D image I/O.
long model_select_closed(Bmodel *model, int closure_rule, int val_order)
Determines if a polyhedron is closed given a rule.
Functions to manipulate polyhedral coordinate files.
int option_kill(Boption *option)
Deallocates a linked list of option structures.
int model_poly_compare(Bmodel *model, Bmodel *refmodel)
Compares a model with reference models based on the eigenvalues of the adjacency matrix.
int model_poly_generate(Bmodel *model)
Generates polygons based on a vertex network.
Library routines used for model processing.
Bmodel * read_model(Bstring &filename)
bool contains(const Bstring &s)
Bstring * string_add(Bstring **list, const char *string)
Adds a string to a linked list.