 |
Bsoft
2.1.0
Bernard's software package
|
Go to the documentation of this file.
25 "Usage: bdelta [options] in.star [in2.star ...]",
26 "----------------------------------------------",
27 "Generates and analyzes deltagraphs.",
28 "The creation options are mutually exclusive.",
31 "-pentagonal Create a pentagonal deltagraph.",
32 "-hexagonal Create a hexagonal deltagraph.",
33 "-tube 8,3 Create a tubular deltagraph with the given lattice parameters.",
34 "-caps 2 Add 1 or 2 caps.",
35 "-dual Calculate the dual of a polyhedron.",
38 "-verbose 7 Verbosity of output.",
39 "-componentradius 0.5 Component display radius.",
40 "-linkradius 0.5 Link display radius.",
41 "-linklength 150 Link length (default 1).",
42 "-radius 3 Radius in integer units (default 1).",
43 "-height 5 Height in integer units (default 1).",
46 "-parameters param.star Input parameter file.",
49 "-output file.star Output model parameter file.",
54 int main(
int argc,
char **argv)
72 for ( curropt = option; curropt; curropt = curropt->
next ) {
73 if ( curropt->
tag ==
"pentagonal" ) type = 2;
74 if ( curropt->
tag ==
"hexagonal" ) type = 1;
76 if ( curropt->
tag ==
"tube" )
77 if ( curropt->
values(h, k) < 1 )
78 cerr <<
"-tube: At least one integer must be specified!" << endl;
79 if ( curropt->
tag ==
"dual" ) dual = 1;
80 if ( curropt->
tag ==
"radius" )
82 cerr <<
"-radius: A radius must be specified!" << endl;
83 if ( curropt->
tag ==
"height" )
85 cerr <<
"-height: A height must be specified!" << endl;
86 if ( curropt->
tag ==
"componentradius" )
87 if ( ( compradius = curropt->
value.
real() ) < 0.001 )
88 cerr <<
"-componentradius: The component display radius must be specified!" << endl;
89 if ( curropt->
tag ==
"linkradius" )
90 if ( ( linkradius = curropt->
value.
real() ) < 0.001 )
91 cerr <<
"-linkradius: The link display radius must be specified!" << endl;
92 if ( curropt->
tag ==
"linklength" )
93 if ( ( linklength = curropt->
value.
real() ) < 0.001 )
94 cerr <<
"-linklength: The link length between vertices must be specified!" << endl;
95 if ( curropt->
tag ==
"parameters" )
97 if ( curropt->
tag ==
"output" )
109 while ( optind < argc )
string_add(&file_list, argv[optind++]);
111 if ( radius > 0 && height > 0 && ( type & 3 ) ) {
117 if ( linklength != 1 )
121 cerr <<
"Error: No model files specified or generated!" << endl;
130 cerr <<
"Error: No model read or generated!" << endl;
A class for a command line input option.
Bmodel * model_delta_create_cylinder(int type, int radius, int height)
Generates a new deltagraph based on the type.
int string_kill(Bstring *list)
Kills a string linked list.
Functions to generate deltagraph polyhedra.
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.
Bmodel * model_delta_create_tube(int h, int k, int height)
Generates a new tubular deltagraph.
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 values(T1 &v1, T2 &v2)
Bmodel * model_poly_dual(Bmodel *model, int order)
Calculates the dual of a polyhedral network.
int model_kill(Bmodel *model)
Deallocates all memory in the list.
Utilities for timing functions.
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.
Functions to manipulate polyhedral coordinate files.
int option_kill(Boption *option)
Deallocates a linked list of option structures.
int model_poly_generate(Bmodel *model)
Generates polygons based on a vertex network.
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.
int main(int argc, char **argv)
Bstring * string_add(Bstring **list, const char *string)
Adds a string to a linked list.