 |
Bsoft
2.1.0
Bernard's software package
|
Go to the documentation of this file.
25 "Usage: bpath [options] in.star",
26 "------------------------------",
27 "Analyzes paths and cycles in a model.",
30 "-all Reset selection to all components before other selections.",
31 "-cutoff 23.5 Assign links within this cutoff distance.",
34 "-verbose 7 Verbosity of output.",
35 "-componentradius 0.5 Component display radius.",
36 "-linkradius 0.5 Link display radius.",
39 "-parameters param.star Input parameter file.",
42 "-output path.star Output model file with components linked along paths.",
47 int main(
int argc,
char **argv)
61 for ( curropt = option; curropt; curropt = curropt->
next ) {
62 if ( curropt->
tag ==
"all" ) reset = 1;
63 if ( curropt->
tag ==
"cutoff" )
64 if ( ( cutoff = curropt->
value.
real() ) < 1 )
65 cerr <<
"-cutoff: A cutoff distance must be specified!" << endl;
66 if ( curropt->
tag ==
"componentradius" )
67 if ( ( compradius = curropt->
value.
real() ) < 0.001 )
68 cerr <<
"-componentradius: The component display radius must be specified!" << endl;
69 if ( curropt->
tag ==
"linkradius" )
70 if ( ( linkradius = curropt->
value.
real() ) < 0.001 )
71 cerr <<
"-linkradius: The link display radius must be specified!" << endl;
72 if ( curropt->
tag ==
"parameters" )
74 if ( curropt->
tag ==
"output" )
83 while ( optind < argc )
string_add(&file_list, argv[optind++]);
85 cerr <<
"Error: No model files specified!" << endl;
93 cerr <<
"Error: Input file not read!" << endl;
A class for a command line input option.
int string_kill(Bstring *list)
Kills a string linked list.
Header file for reading and writing atomic model files.
long model_links_minimum_valency(Bmodel *model, long valency)
Generates links such that each component has at least the given valency.
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.
Library routines used for model processing.
Bmodel * model_hamiltonian_cycle(Bmodel *model)
Calculates the Hamiltonian cycles in a model.
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 main(int argc, char **argv)
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.
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.
int option_kill(Boption *option)
Deallocates a linked list of option structures.
Library routines used for model processing.
Bmodel * read_model(Bstring &filename)
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.