 |
Bsoft
2.1.0
Bernard's software package
|
Go to the documentation of this file.
24 "Usage: bgex [options] out.pdb out.map",
25 "-------------------------------------",
26 "Calculates and compares atomic models and maps.",
27 "A coordinate file is required.",
28 "If a map file is given, the occupancy of the atoms are calculated.",
31 "-select CA Atom selection (default all).",
32 "-chains B,G,O,Z Select chains or molecules by ID (default all).",
33 "-limits -50.5,10,0,40,-100,-20 Coordinate limits (default -10000,-10000,-10000,10000,10000,10000).",
36 "-potential Calculate an atomic potential map (default simple gaussian expansion).",
39 "-verbose 7 Verbosity of output.",
40 "-datatype u Force writing of a new image data type.",
41 "-origin 0,0,0 Origin placement within image (default 0,0,0).",
42 "-size 10,10,10 Map size, input map size otherwise (voxels).",
43 "-sampling 1 Sampling (default 1 angstrom/voxel).",
44 "-resolution 3 Resolution (default 2 angstrom, only simple gaussian expansion).",
45 "-wrap Wrap around periodic boundaries (default off).",
46 "-Bfactor 30 Global B-factor (default 0 angstrom squared).",
47 "-symmetry 1 Space group (default 1).",
48 "-unitcell 50,50,50,90,90,90 Unit cell parameters (angstrom & degrees).",
51 "-coordinates file.pdb Input coordinate file.",
52 "-map file.map Input map file.",
53 "-parameters parm.star Atomic properties parameter file (default atom_prop.star).",
58 int main(
int argc,
char **argv)
81 for ( curropt = option; curropt; curropt = curropt->
next ) {
82 if ( curropt->
tag ==
"select" ) {
83 atom_select = curropt->
value;
84 if ( atom_select.
length() < 1 )
85 cerr <<
"-select: A selection must be specified!" << endl;
87 if ( curropt->
tag ==
"chains" ) {
88 chain_select = curropt->
value;
89 if ( chain_select.
length() < 1 )
90 cerr <<
"-chains: A selection must be specified!" << endl;
92 if ( curropt->
tag ==
"potential" )
94 if ( curropt->
tag ==
"datatype" )
96 if ( curropt->
tag ==
"coordinates" )
98 if ( curropt->
tag ==
"map" )
100 if ( curropt->
tag ==
"origin" ) {
101 if ( curropt->
value[0] ==
'c' ) {
104 origin = curropt->
origin();
108 if ( curropt->
tag ==
"size" )
109 size = curropt->
size();
110 if ( curropt->
tag ==
"sampling" )
111 sam = curropt->
scale();
112 if ( curropt->
tag ==
"resolution" )
113 if ( ( resolution = curropt->
value.
real() ) < 0.001 )
114 cerr <<
"-resolution: Resolution must be specified!" << endl;
115 if ( curropt->
tag ==
"wrap" )
117 if ( curropt->
tag ==
"Bfactor" )
118 if ( ( Bfactor = curropt->
value.
real() ) < 0.001 )
119 cerr <<
"-Bfactor: The B-factor must be specified!" << endl;
120 if ( curropt->
tag ==
"unitcell" )
122 if ( curropt->
tag ==
"symmetry" )
124 cerr <<
"-symmetry: The space group number must be specified!" << endl;
125 if ( curropt->
tag ==
"parameters" )
136 if ( coorfile.
length() ) {
138 if ( !molgroup->
mol->
res ) {
139 cerr <<
"Error: Problem with coordinate file " << coorfile <<
", exiting!" << endl;
147 cerr <<
"Error: Map file " << mapfile <<
" not read!" << endl;
152 if ( molgroup == NULL ) {
153 cerr <<
"Error: No coordinate file given!" << endl;
163 if ( size[0] <= 0 || size[1] <= 0 || size[2] <= 0 ) {
171 if ( set_origin == 2 ) origin = {double(size[0]/2), double(size[1]/2), double(size[2]/2)};
173 if ( chain_select.
length() )
178 size, sam, resolution, Bfactor, wrap, gextype, spacegroup, uc);
190 while ( optind < argc ) {
195 }
else if ( pcalc ) {
203 if ( pcalc )
delete pcalc;
A class for a command line input option.
Vector3< double > scale()
int molgroup_kill(Bmolgroup *molgroup)
Destroys a molecule group.
Library routines to select atomic coordinates.
int bexit(int value)
Exit function for cleanup and debugging.
int main(int argc, char **argv)
Vector3< double > default_origin()
Boption * get_option_list(const char *use[], int argc, char *argv[], int &optind)
Parses command line arguments based on a template.
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()
double mass_threshold(long img_num, double mol_weight, double rho)
Finds the density threshold associated with a particular molecular weight.
Bimage * read_img(char *filename, int readdata, int img_select)
General driver function to read multiple image formats.
void origin(double x, double y, double z)
int write_img(const char *filename, Bimage *p, int compression)
General driver function to write multiple image formats.
int compare_mol_map(Bmolgroup *molgroup, Bimage *pcalc, Bimage *pimg)
Compares reference and calculated maps and calculates an occupancy for every atom in the molecule set...
Header file for reading reflection files.
double molgroup_calculate_weight(Bmolgroup *molgroup)
Calculates the weight of each molecule.
General image parameter class.
Utilities for timing functions.
double timer_start()
Starts timer and prints the time.
Header file for general utilities.
double timer_report(double lasttime)
Reports the time elapsed since a given time.
int write_molecule(char *filename, Bmolgroup *molgroup)
Writes a molecule group.
void change_type(char letter)
Get the data type indicated by a single letter code.
Header file for 2D and 3D image I/O.
int molgroup_select_chains(Bmolgroup *molgroup, Bstring chains)
Selects molecules.
Bimage * img_from_molecule(Bmolgroup *molgroup, Vector3< double > origin, Vector3< long > size, Vector3< double > sam, double resolution, double Bfactor, int wrap, int gextype, int spacegroup, UnitCell unit_cell)
Calculates a 3D density map from a set of atomic coordinates.
int option_kill(Boption *option)
Deallocates a linked list of option structures.
void sampling(long nn, Vector3< double > u)
DataType
Base data type specifier.
bool contains(const Bstring &s)
Header file for functions to calculate a 3D map from atomic coordinates.
Library routines used for atomic coordinates.