 |
Bsoft
2.1.0
Bernard's software package
|
Go to the documentation of this file.
29 "Usage: bspiral [options] out.star",
30 "---------------------------------",
31 "Generates a polyhedron using the spiral algorithm.",
34 "-analyze Analyze the polyhedron.",
35 "-enantiomorph Generate the enantiomorph of the polyhedron.",
36 "-sequence 5566665566565 Sequence of polygons to use in stead of permutations.",
37 "-cone 14,30,25 Polygons to generate for the tip, body and base of a cone.",
38 "-lozenge 2,7 Unit lengths for the top and body of a lozenge.",
39 "-coffin 3,5,2 Unit lengths for the top, body and base of a coffin.",
42 "-verbose 7 Verbosity of output.",
43 "-vertices 36 Number of vertices (default 20).",
44 "-linklength 150 Vertex separation (default 10 A).",
45 "-requirements 0 Polyhedron acceptance requirements (default 1 = strict).",
48 "-parameters parm.star Molecular parameter file (default atom_prop.star).",
53 int main(
int argc,
char **argv)
77 for ( curropt = option; curropt; curropt = curropt->
next ) {
78 if ( curropt->
tag ==
"analyze" ) analyze = 1;
79 if ( curropt->
tag ==
"enantiomorph" ) enantiomorph = 1;
80 if ( curropt->
tag ==
"vertices" ) {
82 cerr <<
"-vertices: The number of vertices must be specified!" << endl;
87 if ( curropt->
tag ==
"sequence" ) {
89 vertices = 20 + 2*(seq.
length() - 12);
92 if ( curropt->
tag ==
"cone" )
93 if ( curropt->
values(conetip, conebody, conebase) < 3 )
94 cerr <<
"-cone: Three integers must be specified!" << endl;
95 if ( curropt->
tag ==
"lozenge" )
96 if ( curropt->
values(loztop, lozbody) < 2 )
97 cerr <<
"-lozenge: Two integers must be specified!" << endl;
98 if ( curropt->
tag ==
"coffin" )
99 if ( curropt->
values(coftop, cofbody, cofbase) < 3 )
100 cerr <<
"-coffin: Three integers must be specified!" << endl;
101 if ( curropt->
tag ==
"linklength" )
102 if ( ( linklength = curropt->
value.
real() ) < 1 )
103 cerr <<
"-linklength: The link length separating vertices must be specified!" << endl;
104 if ( curropt->
tag ==
"requirements" )
106 cerr <<
"-requirements: An integer must be specified!" << endl;
107 if ( curropt->
tag ==
"parameters" )
114 mkdir(
"temp", O_CREAT );
123 }
else if ( conetip > 0 && conebody > 0 && conebase > 0 ) {
125 }
else if ( loztop > 0 ) {
127 }
else if ( coftop > 0 && cofbody > 0 && cofbase > 0 ) {
138 if (
verbose ) cout <<
"No model generated!" << endl;
151 if ( optind < argc ) {
152 filename = argv[optind];
A class for a command line input option.
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.
Bmodel * model_poly_gen_lozenge(int ttop, int tbody, int valence, int enantiomorph, int requirements)
Two icosahedral tips are set up and polyhedra generated by rotating the 2 tips.
int bexit(int value)
Exit function for cleanup and debugging.
Bmodel * model_poly_gen_permutations(int vertices, int valence, int enantiomorph)
All polyhedra are generated for a given number of vertices.
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 count_list(char *list)
Counts the number of items in a linked list.
Library routines used for model link processing.
long models_process(Bmodel *model, long(modfunc)(Bmodel *))
Process a list of models using the specified function.
Bmodel * model_poly_gen_sequence(Bstring &seq, int valence, int enantiomorph, int requirements, int nm)
Generates a polyhedron using a given sequence.
long values(T1 &v1, T2 &v2)
int main(int argc, char **argv)
int model_kill(Bmodel *model)
Deallocates all memory in the list.
Utilities for timing functions.
Bmodel * model_poly_gen_cone(int tip, int body, int base, int valence, int enantiomorph, int requirements)
A cone tip with 5 pentagons and a base with 7 pentagons are use to generate polyhedra.
Functions to generate polyhedra using the spiral algorithm.
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.
Header file for generalized linked list functions.
int model_poly_analyze(Bmodel *model)
Analyzes a model for polygon regularity and planarity.
Functions to manipulate polyhedral coordinate files.
int option_kill(Boption *option)
Deallocates a linked list of option structures.
Library routines used for model processing.
long model_set_component_radius(Bmodel *model, double comprad)
Set the display radius for all components to a specific value.
Bmodel * model_poly_gen_coffin_jiggle(int ttop, int tbody, int tbase, int valence, int enantiomorph, int requirements)
An icosahedral tip and a 6-fold base is set up and polyhedra generated by moving pentagons around.