 |
Bsoft
2.1.0
Bernard's software package
|
Go to the documentation of this file.
26 "Usage: bass [options] in1.star [in2.star ...]",
27 "---------------------------------------------",
28 "Assemble molecular components specified in a model.",
30 "Actions for preparation:",
31 "-com Generate a new model from the centers-of-mass of molecules.",
32 "-all Reset selection to all components before other selections.",
35 "-select #232@14 Select models and components.",
36 "-first 22 Select the first number of components.",
39 "-views local Calculate views for components. Modes: origin: current origin,",
40 " com: center-of-mass origin, map: map origin, local: neigbor plane.",
41 "-associate TRS,trs.pdb Associate a component type with a file name.",
42 "-untangle 3.5,0.2 Eliminate overlaps by moving molecules apart (sampling and damping factor).",
45 "-verbose 7 Verbose output.",
46 "-separate Each model is defined as a separate molecule group.",
47 "-componentradius 8.4 Set display radius for all components.",
48 "-linkradius 5.1 Set display radius for all links.",
50 "Actions for finishing:",
51 "-reset Reset selection to all components before other selections.",
54 "-parameters param.star Input parameter file.",
57 "-output file.star Output model parameter file.",
58 "-coordinates all.pdb Output coordinate files.",
63 int main(
int argc,
char **argv)
87 for ( curropt = option; curropt; curropt = curropt->
next ) {
88 if ( curropt->
tag ==
"all" ) all = 1;
89 if ( curropt->
tag ==
"reset" ) reset = 1;
90 if ( curropt->
tag ==
"select" )
91 mod_select = curropt->
value;
92 if ( curropt->
tag ==
"first" )
94 cerr <<
"-first: An integer must be specified!" << endl;
95 if ( curropt->
tag ==
"com" ) com = 1;
96 if ( curropt->
tag ==
"views" ) calc_views = curropt->
value.
lower();
97 if ( curropt->
tag ==
"associate" ) {
98 associate_file = curropt->
value;
99 associate_type = associate_file.
pre(
',');
100 associate_file = associate_file.
post(
',');
102 if ( curropt->
tag ==
"untangle" )
103 if ( curropt->
values(untangle, lambda) < 1 )
104 cerr <<
"-untangle: Grid sampling in angstrom must be specified!" << endl;
105 if ( curropt->
tag ==
"separate" ) separate = 1;
106 if ( curropt->
tag ==
"componentradius" )
107 if ( ( comprad = curropt->
value.
real() ) < 1 )
108 cerr <<
"-componentradius: A display radius must be specified!" << endl;
109 if ( curropt->
tag ==
"linkradius" )
110 if ( ( linkrad = curropt->
value.
real() ) < 1 )
111 cerr <<
"-linkradius: A radius must be specified!" << endl;
112 if ( curropt->
tag ==
"parameters" )
114 if ( curropt->
tag ==
"output" )
116 if ( curropt->
tag ==
"coordinates" )
125 while ( optind < argc )
string_add(&file_list, argv[optind++]);
127 cerr <<
"Error: No model files specified!" << endl;
135 molgroup =
read_molecule(*file_list, atom_select, paramfile);
145 cerr <<
"Error: Input file not read!" << endl;
155 if ( associate_file.
length() )
171 if ( coorfile.
length() ) {
int main(int argc, char **argv)
A class for a command line input option.
int molgroup_kill(Bmolgroup *molgroup)
Destroys a molecule group.
int string_kill(Bstring *list)
Kills a string linked list.
int molecule_update_comment(Bmolgroup *molgroup, int n, char **strings)
Puts a set of strings and time in the main comment of a molecule group.
Header file for reading and writing atomic model files.
int molgroup_list_kill(Bmolgroup *molgroup)
Destroys a molecule group linked list.
int molgroup_untangle_groups(Bmolgroup *molgroup, double sampling, double lambda)
Moves overlapping molecules away from each other.
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 atomic coordinates.
Bmolgroup * read_molecule(const char *filename, const char *select, const char *paramfile)
The generalized function for reading molecular files.
Header file for option handlers.
long model_select_first(Bmodel *model, int first)
Selects the first number of components.
long model_update_centers_of_mass(Bmodel *model, Bmolgroup *molgroup)
Updates the centers-of-mass of molecule group components.
Bmolgroup * model_assemble(Bmodel *model, Bstring ¶mfile, int separate)
Concatenates selected molecules into one group.
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.
long values(T1 &v1, T2 &v2)
Header file for reading reflection files.
int model_kill(Bmodel *model)
Deallocates all memory in the list.
Header file for reading and writing atomic model files.
Utilities for timing functions.
long model_calculate_views(Bmodel *model, Bstring &mode)
Calculates the views associated with each component.
long model_reset_selection(Bmodel *model)
Resets the selection to all components.
Bmodel * model_generate_com(Bmolgroup *molgroup)
Calculates the centers-of-mass of molecule group components and generates a new model.
int molgroup_list_write(Bstring &filename, Bmolgroup *molgroup)
Writes a molecule group list.
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.
Library routines used for analysing model component views.
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.
int model_associate(Bmodel *model, Bstring &associate_type, Bstring &associate_file)
Associates a model file with a component type.
Bstring * string_add(Bstring **list, const char *string)
Adds a string to a linked list.
long model_select(Bmodel *model, Bstring &comptype)
Selects models, components and component types.