 |
Bsoft
2.1.0
Bernard's software package
|
Go to the documentation of this file.
23 "Usage: bmolhel [options] in.pdb out.pdb",
24 "---------------------------------------",
25 "Performs helical symmetry operations on molecules.",
28 "-generate 5,7 Generate new molecules downwards and upwards.",
29 "-translate 0,-50,22 Translate (angstrom)",
32 "-verbose 7 Verbosity of output.",
33 "-origin 10,-10,20 Origin for rotation (default 0,0,0, can be \"center\" for COM).",
34 "-helix 25.3,67.1 Helical rise and angle.",
35 "-reference 0,1.5,-0.2,35 Reference symmetry axis and rotation angle (default 0,0,1,0).",
36 "-rename D Rename molecules from the given letter.",
39 "-parameters parm.star Atomic properties parameter file (default atom_prop.star).",
44 int main(
int argc,
char **argv)
47 int gen_down(0), gen_up(0);
53 double helix_angle(0);
61 for ( curropt = option; curropt; curropt = curropt->
next ) {
62 if ( curropt->
tag ==
"generate" )
63 if ( curropt->
values(gen_down, gen_up) < 1 )
64 cerr <<
"-generate: At least one number must be specified!" << endl;
65 if ( curropt->
tag ==
"translate" ) {
68 cerr <<
"-translate: Three values must be specified!" << endl;
70 if ( curropt->
tag ==
"rename" )
71 if ( ( first_name = curropt->
value[0] ) < 1 )
72 cerr <<
"-rename: The first molecule name must be specified!" << endl;
73 if ( curropt->
tag ==
"origin" ) {
77 origin = curropt->
origin();
79 if ( curropt->
tag ==
"helix" ) {
80 if ( curropt->
values(helix_rise, helix_angle) < 2 )
81 cerr <<
"-helix: Both rise and angle must be specified" << endl;
83 helix_angle *=
M_PI/180.0;
85 if ( curropt->
tag ==
"reference" )
86 ref_view = curropt->
view();
87 if ( curropt->
tag ==
"parameters" )
94 Bstring filename(argv[optind++]);
97 cerr <<
"Error: Coordinate file not read!" << endl;
101 if ( t[0] != 0 || t[1] != 0 || t[2] != 0 )
107 if ( origin[0] || origin[1] || origin[2] )
112 if ( gen_down + gen_up > 0 && helix_rise && helix_angle )
120 if ( optind < argc ) {
123 cerr <<
"Error: " << argv[optind] <<
" not written!" << endl;
A class for a command line input option.
long molgroup_stats(Bmolgroup *molgroup, int show)
Calculates the statistics of a molecule group.
int molgroup_kill(Bmolgroup *molgroup)
Destroys a molecule group.
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.
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.
int molgroup_generate_helix(Bmolgroup *molgroup, View ref_view, double helix_rise, double helix_angle, int gen_down, int gen_up)
Generates a helix from the given parameters.
Bmolgroup * read_molecule(const char *filename, const char *select, const char *paramfile)
The generalized function for reading molecular files.
Header file for option handlers.
int molgroup_from_molgroup_list(Bmolgroup *molgroup)
Converts a molecule group list to a single molecule group.
Vector3< double > origin()
long values(T1 &v1, T2 &v2)
Header file for reading reflection files.
Utilities for timing functions.
double timer_start()
Starts timer and prints the time.
Header file for general utilities.
Vector3< double > vector3()
double timer_report(double lasttime)
Reports the time elapsed since a given time.
Vector3< double > molgroup_center_of_mass(Bmolgroup *molgroup)
Calculates the center of mass of a molecule group.
int main(int argc, char **argv)
int write_molecule(char *filename, Bmolgroup *molgroup)
Writes a molecule group.
int molgroup_rename(Bmolgroup *molgroup, char first_name)
Renames molecules.
Library routines used for symmetry operations on atomic coordinates.
int option_kill(Boption *option)
Deallocates a linked list of option structures.
bool contains(const Bstring &s)
Library routines used for atomic coordinates.