 |
Bsoft
2.1.0
Bernard's software package
|
Go to the documentation of this file.
24 "Usage: bmolsym [options] in.pdb out.pdb",
25 "---------------------------------------",
26 "Performs symmetry operations on molecules.",
29 "-translate 0,-50,22 Translate (angstrom).",
30 "-rotate 0.5,0,5.8,45 Rotate around a vector (x,y,z) by an angle.",
31 "-select CA Atom selection (default all).",
32 "-apply C5 Apply point group symmetry.",
33 "-find C5 Find standard orientation for this point group symmetry.",
34 "-Bfactor D5 Calculate B factors for this point group symmetry.",
35 "-pdbsymmetry Read SMTRY matrices from a PDB file and apply them.",
36 "-pdbbiomt Read BIOMT matrices from a PDB file and apply them.",
37 "-rename D Rename molecules from the given letter.",
38 "-show Show operational symmetry matrices.",
41 "-verbose 7 Verbosity of output.",
42 "-origin 10,-10,20 Origin for rotation (default 0,0,0, can be \"center\" for COM).",
43 "-reference 0,1.5,-0.2,35 Reference symmetry axis and rotation angle (default 0,0,1,0).",
44 "-distance 3.5 Distance between overlapping atoms allowed (default 3 angstrom, use with -apply).",
47 "-parameters parm.star Atomic properties parameter file (default atom_prop.star).",
48 "-similarity sim.star Residue similarity matrix for finding orientation (default blosum62.star).",
53 int main(
int argc,
char **argv)
74 for ( curropt = option; curropt; curropt = curropt->
next ) {
75 if ( curropt->
tag ==
"rename" )
76 if ( ( first_name = curropt->
value[0] ) < 1 )
77 cerr <<
"-rename: The first molecule name must be specified!" << endl;
78 if ( curropt->
tag ==
"translate" )
80 if ( curropt->
tag ==
"rotate" ) {
83 cerr <<
"-rotate: All three vector elements and an angle must be specified!" << endl;
89 if ( curropt->
tag ==
"origin" ) {
95 if ( curropt->
tag ==
"select" ) {
96 atom_select = curropt->
value;
97 if ( atom_select.
length() < 1 )
98 cerr <<
"-select: A selection must be specified!" << endl;
100 if ( curropt->
tag ==
"apply" ) {
103 cerr <<
"-apply: A point group must be specified!" << endl;
107 if ( curropt->
tag ==
"find" ) {
110 cerr <<
"-find: A point group must be specified!" << endl;
114 if ( curropt->
tag ==
"Bfactor" )
116 if ( curropt->
tag ==
"pdbsymmetry" ) pdbsym_flag = 1;
117 if ( curropt->
tag ==
"pdbbiomt" ) pdbbio_flag = 1;
118 if ( curropt->
tag ==
"reference" )
119 ref_view = curropt->
view();
120 if ( curropt->
tag ==
"distance" )
122 cerr <<
"-distance: A separation distance must be specified!" << endl;
123 if ( curropt->
tag ==
"show" )
125 if ( curropt->
tag ==
"parameters" )
127 if ( curropt->
tag ==
"similarity" )
136 if ( optind >= argc )
bexit(-1);
138 Bstring filename(argv[optind++]);
141 cerr <<
"Error: Coordinate file not read!" << endl;
156 if ( sym_flag == 2 && sym ) {
163 if ( sym_flag == 1 && sym ) {
174 if ( molgroup && sym_B )
177 if ( molgroup && sym )
183 if ( optind < argc ) {
186 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 main(int argc, char **argv)
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.
Vector3< double > origin()
int molgroup_remove_overlapping_atoms(Bmolgroup *molgroup, double mindist)
Removes overlapping atoms.
Header file for reading reflection files.
double molgroup_symmetry_B(Bmolgroup *molgroup, Bsymmetry *sym)
Calculates the B factors from symmetry-related molecules.
Utilities for timing functions.
vector< double > split_into_doubles(const Bstring &delim)
double distance(vector< T1 > &v1, vector< T2 > &v2)
int molgroup_orient_to_standard_view(Bmolgroup *molgroup, Bsymmetry *sym, View ref_view, Bresidue_matrix *simat)
Searches for the standard view based on point group symmetry.
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 write_molecule(char *filename, Bmolgroup *molgroup)
Writes a molecule group.
int sym_show_operational_matrices(Bsymmetry *sym)
Show symmetry matrices associated with each symmetry operator.
int molgroup_rename(Bmolgroup *molgroup, char first_name)
Renames molecules.
Library routines used for symmetry operations on atomic coordinates.
int kill_symmetry(Bsymmetry *sym)
Deallocates a symmetry structure.
int residue_matrix_kill(Bresidue_matrix *resmat)
Deallocating a residue matrix.
int option_kill(Boption *option)
Deallocates a linked list of option structures.
double molgroup_symmetry_RMSD(Bmolgroup *molgroup, Bsymmetry *sym)
Calculates the RMSD for symmetry in the standard orientation.
int molgroup_apply_point_group(Bmolgroup *molgroup, Bsymmetry *sym, View ref_view)
Generates all symmetry-related coordinates.
int molgroup_apply_matrices_from_pdb(Bmolgroup *molgroup, Bstring &filename)
Generates all symmetry-related coordinates using PDB file matrices.
bool contains(const Bstring &s)
Bresidue_matrix * get_residue_matrix(Bstring &filename)
Reading a residue matrix from a file.
int molgroup_apply_symmetry_from_pdb(Bmolgroup *molgroup, Bstring &filename)
Generates all symmetry-related coordinates using PDB file matrices.
Library routines used for atomic coordinates.