Bsoft  2.1.0
Bernard's software package
bmol.cpp
Go to the documentation of this file.
1 
9 #include "rwmolecule.h"
10 #include "mol_transform.h"
11 #include "mol_edit.h"
12 #include "mol_select.h"
13 #include "mol_compare.h"
14 #include "mol_util.h"
15 #include "rwimg.h"
16 #include "utilities.h"
17 #include "options.h"
18 #include "timer.h"
19 
20 // Declaration of global variables
21 extern int verbose; // Level of output to the screen
22 
23 /* Usage assistance */
24 const char* use[] = {
25 " ",
26 "Usage: bmol [options] in.pdb out.pdb",
27 "------------------------------------",
28 "Edits, analyzes and transforms atomic coordinate files.",
29 " ",
30 "Selections:",
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).",
34 " ",
35 "Actions:",
36 "-invert 10,-5.3,2.6 Invert through a point.",
37 "-translate 0,-50,22 Translate (angstrom).",
38 "-scale 2,1.5,2.2 Scale the coordinates.",
39 "-rotate 0.5,0,5.8,45 Rotate around a vector (x,y,z) by an angle.",
40 "-toview 0.3,0.5,0.8,33 Rotate to view: vector {xyz} and angle (default 0,0,1,0).",
41 "-fromview 0.3,0.5,0.8,33 Rotate from view: vector {xyz} and angle (default 0,0,1,0).",
42 "-radius 41.8 Force all coordinates to this radius (default not).",
43 "-rename D Rename molecules from the given letter.",
44 "-renumber 52 Renumber residues from the given number.",
45 "-occupancy 27,99,3 Set an occupancy range (res1,res2) to a value.",
46 "-box 15,66,54 Consolidate structure within box (0,0,0 means no change).",
47 "-wrap 15,66,54 Pack coordinates within periodic box.",
48 "-Bfactor Analyze B-factors.",
49 "-Sequence Output sequence as string of letters.",
50 "-Mass Calculate the total molecular weight and volume.",
51 "-Volume 1 Calculate the Van der Waals volume, wrapping flag (default 0).",
52 "-Composition Calculate the composition.",
53 "-Center Calculate the center of mass.",
54 "-Translate Translate the coordinate set to the center of mass.",
55 "-Place -43.2,33,0 Place the center-of-mass at the given coordinates.",
56 "-Axes Calculate the orthogonal axes.",
57 "-Sphericity 1.5 Calculate the sphericity with the given angular sampling.",
58 "-Radialdensity 0.05,6,1 Calculate the radial density function at a given sampling",
59 " and distance cutoff (angstrom) with optional wrapping.",
60 " ",
61 "Parameters:",
62 "-verbose 7 Verbosity of output.",
63 "-origin 10,-10,20 Origin for rotation (default 0,0,0, can be \"center\" for COM)",
64 " ",
65 "Input:",
66 "-parameters parm.star Atomic properties parameter file (default atom_prop.star).",
67 "-compare mol.pdb Reference to calculate RMSD.",
68 "-distance mol.pdb Reference to calculate distance matrix.",
69 " ",
70 "Output:",
71 "-matrix file.mat Distance matrix.",
72 "-image file.map Distance matrix as an image.",
73 " ",
74 NULL
75 };
76 
77 int main(int argc, char **argv)
78 {
79  /* Initialize variables */
80  Bstring atom_select("ALL");
81  Bstring chain_select;
82  int set_minmax(0); // Flag for setting min and max
83  double rmin(0); // Inner radius
84  double rmax(10000); // Outer radius
85  int set_invert(0);
86  int com_origin(0); // Flag to set the center-of-mass as origin of rotation
87  Vector3<double> point; // Inversion point
88  Transform t; // Transformation details
89  View view; // View to rotate to
90  int rot_from(0); // Rotation from view flag
91  Vector3<double> min(-1e6,-1e6,-1e6); // Coordinate minima
92  Vector3<double> max(1e6,1e6,1e6); // Coordinate maxima
93  Vector3<double> box = max - min; // Enclosing box
94  Vector3<double> place; // Coordinates for placing a molecule
95  char first_name(0); // First molecule name for renaming
96  int first_res(0); // Don't renumber
97  int range_first(0); // For resetting occupancy
98  int range_last(0);
99  double set_radius(0); // Spherical radius to enforce
100  double occupancy(0);
101  int set_occupancy(0); // Flag for setting occupancy
102  int set_pbc(0); // Flag for resolving wrapped coordinates
103  int set_wrap(0); // Flag for wrapping coordinates
104  int show_seq(0); // Flag to show the sequence(s)
105  int show_MW(0); // Flag for calculating the MW(s)
106  int show_Volume(0); // Flag for calculating the Van der Waals volume
107  int show_composition(0); // Flag for calculating the composition
108  int show_COM(0); // Flag for calculating the center of mass
109  int translate_COM(0); // Flag for translating to the center of mass
110  int orth_axes(0); // Flag for calculating orthogonal axes
111  double dang(0); // Angular step size for sphericity
112  int setBfac(0);
113  double rdf_sampling(0); // Sampling for radial density function
114  double rdf_cutoff(5); // Distance cutoff for radial density function
115  int wrap(0); // No wrapping as default
116  Bstring paramfile; // Use default parameter file
117  Bstring compfile; // Reference to calculate RMSD
118  Bstring distfile; // Reference to calculate distance matrix
119  Bstring matfile; // Distance matrix
120  Bstring imgfile; // Distance matrix as an image
121 
122  int optind;
123  Boption* option = get_option_list(use, argc, argv, optind);
124  Boption* curropt;
125  for ( curropt = option; curropt; curropt = curropt->next ) {
126  if ( curropt->tag == "select" ) {
127  atom_select = curropt->value;
128  if ( atom_select.length() < 1 )
129  cerr << "-select: A selection must be specified!" << endl;
130  }
131  if ( curropt->tag == "chains" ) {
132  chain_select = curropt->value;
133  if ( chain_select.length() < 1 )
134  cerr << "-chains: A selection must be specified!" << endl;
135  }
136  if ( curropt->tag == "invert" ) {
137  point = curropt->vector3();
138  set_invert = 1;
139  }
140  if ( curropt->tag == "translate" )
141  t.trans = curropt->vector3();
142  if ( curropt->tag == "scale" )
143  t.scale = curropt->vector3();
144  if ( curropt->tag == "rotate" ) {
145  vector<double> d = curropt->value.split_into_doubles(",");
146  if ( d.size() < 4 )
147  cerr << "-rotate: All three vector elements and an angle must be specified!" << endl;
148  else {
149  t.axis = Vector3<double>(d[0], d[1], d[2]);
150  t.angle = d[3] * M_PI/180.0;
151  }
152  }
153  if ( curropt->tag == "toview" )
154  view = curropt->view();
155  if ( curropt->tag == "fromview" ) {
156  view = curropt->view();
157  rot_from = 1;
158  }
159  if ( curropt->tag == "origin" ) {
160  if ( curropt->value.contains("cen") )
161  com_origin = 1;
162  else
163  t.origin = curropt->origin();
164  }
165  if ( curropt->tag == "limits" ) {
166  if ( curropt->box(min, max) < 6 )
167  cerr << "-limits: All 6 limits must be specified!" << endl;
168  else
169  set_minmax = 1;
170  }
171  if ( curropt->tag == "radius" )
172  if ( ( set_radius = curropt->value.real() ) < 1 )
173  cerr << "-radius: The radius must be specified!" << endl;
174  if ( curropt->tag == "rename" )
175  if ( ( first_name = curropt->value[0] ) < 1 )
176  cerr << "-rename: The first molecule name must be specified!" << endl;
177  if ( curropt->tag == "renumber" )
178  if ( ( first_res = curropt->value.integer() ) < 1 )
179  cerr << "-renumber: The first residue number must be specified!" << endl;
180  if ( curropt->tag == "occupancy" ) {
181  if ( curropt->values(range_first, range_last, occupancy) < 3 )
182  cerr << "-occupancy: A range and value must be specified!" << endl;
183  else
184  set_occupancy = 1;
185  }
186  if ( curropt->tag == "box" ) {
187  box = curropt->size();
188  set_pbc = 1; // Resolve periodic boundaries
189  }
190  if ( curropt->tag == "wrap" ) {
191  box = curropt->size();
192  set_wrap = 1; // Wrap within periodic boundaries
193  }
194  if ( curropt->tag == "Bfactor" )
195  setBfac = 1;
196  if ( curropt->tag == "Sequence" )
197  show_seq = 1;
198  if ( curropt->tag == "Mass" )
199  show_MW = 1;
200  if ( curropt->tag == "Volume" ) {
201  if ( ( show_Volume = curropt->value.integer() ) < 1 )
202  cerr << "-Volume: A wrapping flag must be specified!" << endl;
203  else
204  show_Volume++;
205  }
206  if ( curropt->tag == "Composition" )
207  show_composition = 1;
208  if ( curropt->tag == "Center" )
209  show_COM = 1;
210  if ( curropt->tag == "Translate" )
211  translate_COM = 1;
212  if ( curropt->tag == "Place" )
213  place = curropt->vector3();
214  if ( curropt->tag == "Axes" )
215  orth_axes = 1;
216  if ( curropt->tag == "Sphericity" ) {
217  if ( ( dang = curropt->value.real() ) < 0.01 )
218  cerr << "-Sphericity: The angular step size must be specified!" << endl;
219  else
220  dang *= M_PI/180.0;
221  }
222  if ( curropt->tag == "Radialdensity" )
223  if ( curropt->values(rdf_sampling, rdf_cutoff, wrap) < 1 )
224  cerr << "-Radialdensity: The sampling must be specified!" << endl;
225  if ( curropt->tag == "parameters" )
226  paramfile = curropt->filename();
227  if ( curropt->tag == "compare" )
228  compfile = curropt->filename();
229  if ( curropt->tag == "distance" )
230  distfile = curropt->filename();
231  if ( curropt->tag == "matrix" )
232  matfile = curropt->filename();
233  if ( curropt->tag == "image" )
234  imgfile = curropt->filename();
235  }
236  option_kill(option);
237 
238  if ( optind >= argc ) bexit(-1);
239 
240  double ti = timer_start();
241 
242  Bstring filename(argv[optind++]);
243  Bmolgroup* mgtemp = NULL;
244  Bmolgroup* molgroup = read_molecule(filename, atom_select, paramfile);
245  if ( !molgroup ) {
246  cerr << "Error: Coordinate file not read!" << endl;
247  bexit(-1);
248  }
249 
250  if ( chain_select.length() )
251  molgroup_select_chains(molgroup, chain_select);
252 
253  /* Select some atoms in a ring between rmin and rmax */
254  if ( ( rmin > 0 ) || ( rmax < 1000 ) )
255  molgroup_coor_select_ring(molgroup, rmin, rmax);
256 
257  /* Select atoms between desired limits */
258  if ( set_minmax )
259  molgroup_coor_select(molgroup, min, max);
260 
261 
262  if ( com_origin )
263  t.origin = molgroup_center_of_mass(molgroup);
264  else if ( show_COM )
266 
267  if ( translate_COM )
269 
270  if ( place.length() > 0 )
271  molgroup_place_at_coordinates(molgroup, place);
272 
273  if ( orth_axes )
274  molgroup_principal_axes(molgroup, NULL);
275 
276  if ( dang > 0 )
277  molgroup_sphericity(molgroup, dang);
278 
279  if ( set_radius )
280  molgroup_set_radius(molgroup, set_radius);
281 
282  if ( set_invert )
283  molgroup_coor_invert(molgroup, point);
284 
285  if ( fabs(t.scale.volume() - 1) < 1e-10 ) {
286  if ( view[2] < 1 ) {
287  if ( rot_from )
288  mgtemp = molgroup_rotate_from_view(molgroup, view, t.origin, t.trans);
289  else
290  mgtemp = molgroup_rotate_to_view(molgroup, view, t.origin, t.trans);
291  molgroup_kill(molgroup);
292  molgroup = mgtemp;
293  } else if ( t.angle == 0 ) {
294  molgroup_coor_shift(molgroup, t.trans);
295  } else {
296  molgroup_coor_rotate(molgroup, t);
297  }
298  } else {
299  molgroup_coor_transform(molgroup, t);
300  }
301 
302  if ( set_pbc || set_wrap ) molgroup->box = box;
303 
304  if ( set_pbc ) molgroup_resolve_pbc(molgroup);
305  else if ( set_wrap ) molgroup_pack_in_periodic_box(molgroup);
306 
307  molgroup_stats(molgroup);
308 
309  if ( setBfac )
310  molgroup_Bfactors(molgroup);
311 
312  if ( show_seq )
313  molgroup_print_sequence(molgroup);
314 
315  if ( show_MW )
316  molgroup_calculate_weight(molgroup);
317 
318  if ( show_Volume )
319  molgroup_volume(molgroup, paramfile, show_Volume-1);
320 
321  if ( show_composition )
322  molgroup_composition(molgroup, paramfile);
323 // molgroup_elements(molgroup);
324 
325  if ( first_name )
326  molgroup_rename(molgroup, first_name);
327 
328  if ( first_res > 0 )
329  molgroup_residue_renumber(molgroup, first_res);
330 
331  if ( set_occupancy )
332  molgroup_coor_reset_occupancy(molgroup, range_first,
333  range_last, occupancy);
334 
335  if ( rdf_sampling > 0 )
336  molgroup_radial_density(molgroup, rdf_sampling, rdf_cutoff, wrap);
337 
338  Bmolgroup* molgroup2 = NULL;
339  if ( compfile.length() ) {
340  molgroup2 = read_molecule(compfile, atom_select, paramfile);
341  if ( !molgroup2 ) {
342  cerr << "Error: Template file not read!" << endl;
343  } else {
344  molgroup_calculate_rmsd(molgroup, molgroup2);
345  molgroup_kill(molgroup2);
346  }
347  }
348 
349  if ( distfile.length() ) {
350  molgroup2 = read_molecule(distfile, atom_select, paramfile);
351  if ( !molgroup2 ) {
352  cerr << "Error: Template file not read!" << endl;
353  } else {
354  Matrix mat = mol_distance_matrix(molgroup->mol, molgroup2->mol);
355  molgroup_kill(molgroup2);
356  if ( matfile.length() && mat.rows() )
357  mat.write(matfile);
358 
359  if ( imgfile.length() && mat.rows() ) {
360  Bimage* pimg = new Bimage(mat, 1);
361 // pimg->change_type(nudatatype);
362  write_img(imgfile, pimg, 0);
363  delete pimg;
364  }
365  }
366  }
367 
368  if ( optind < argc ) {
369  molecule_update_comment(molgroup, argc, argv);
370  if ( write_molecule(argv[optind], molgroup) < 1 )
371  cerr << "Error: " << argv[optind] << " not written!" << endl;
372  }
373 
374  molgroup_kill(molgroup);
375 
376  if ( verbose & VERB_TIME )
377  timer_report(ti);
378 
379  bexit(0);
380 }
Boption
A class for a command line input option.
Definition: options.h:26
molgroup_rotate_from_view
Bmolgroup * molgroup_rotate_from_view(Bmolgroup *molgroup, View view, Vector3< double > origin, Vector3< double > trans)
Rotates a molecule group from a specified view and translates it afterwards.
Definition: mol_transform.cpp:203
molgroup_shift_to_center_of_mass
int molgroup_shift_to_center_of_mass(Bmolgroup *molgroup)
Translates a set of coordinates to the center of mass.
Definition: mol_transform.cpp:625
use
const char * use[]
Definition: bmol.cpp:24
molgroup_stats
long molgroup_stats(Bmolgroup *molgroup, int show)
Calculates the statistics of a molecule group.
Definition: rwmolecule.cpp:1296
molgroup_volume
double molgroup_volume(Bmolgroup *molgroup, Bstring &paramfile, int wrap)
Calculates the volume of a molecular system.
Definition: mol_util.cpp:704
molgroup_print_sequence
int molgroup_print_sequence(Bmolgroup *molgroup)
Prints the sequence of a molecule as a single letter code string.
Definition: mol_util.cpp:92
molgroup_coor_invert
int molgroup_coor_invert(Bmolgroup *molgroup, Vector3< double > point)
Inverts the coordinates of a molecule through a given point.
Definition: mol_transform.cpp:419
molgroup_kill
int molgroup_kill(Bmolgroup *molgroup)
Destroys a molecule group.
Definition: rwmolecule.cpp:374
molgroup_rotate_to_view
Bmolgroup * molgroup_rotate_to_view(Bmolgroup *molgroup, View view, Vector3< double > origin, Vector3< double > trans)
Rotates a molecule group to a specified view and translates it afterwards.
Definition: mol_transform.cpp:180
molecule_update_comment
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.
Definition: rwmolecule.cpp:1467
Bstring
Definition: Bstring.h:29
molgroup_principal_axes
Vector3< double > molgroup_principal_axes(Bmolgroup *molgroup, Vector3< double > *eigenvec)
Calculates the principal axes of a molecule group.
Definition: mol_util.cpp:455
mol_select.h
Library routines to select atomic coordinates.
Bstring::integer
long integer()
Definition: Bstring.cpp:547
Boption::next
Boption * next
Definition: options.h:28
Bmolgroup::mol
Bmolecule * mol
Definition: rwmolecule.h:189
Vector3< double >
bexit
int bexit(int value)
Exit function for cleanup and debugging.
Definition: utilities.cpp:280
get_option_list
Boption * get_option_list(const char *use[], int argc, char *argv[], int &optind)
Parses command line arguments based on a template.
Definition: options.cpp:40
Bstring::real
double real()
Definition: Bstring.cpp:553
mol_edit.h
Library routines used for atomic coordinates.
read_molecule
Bmolgroup * read_molecule(const char *filename, const char *select, const char *paramfile)
The generalized function for reading molecular files.
Definition: rwmolecule.cpp:818
options.h
Header file for option handlers.
molgroup_coor_select_ring
int molgroup_coor_select_ring(Bmolgroup *molgroup, double rmin, double rmax)
Selects atoms in a ring.
Definition: mol_select.cpp:195
View
Definition: View.h:26
molgroup_set_radius
int molgroup_set_radius(Bmolgroup *molgroup, double radius)
Shifts all coordinates to a given radius.
Definition: mol_util.cpp:114
molgroup_place_at_coordinates
int molgroup_place_at_coordinates(Bmolgroup *molgroup, Vector3< double > location)
Translates a set of coordinates to a defined center-of-mass.
Definition: mol_transform.cpp:666
Boption::origin
Vector3< double > origin()
Definition: options.h:180
Boption::view
View view()
Definition: options.h:247
mol_transform.h
Library routines used for atomic coordinate transformations.
Transform::origin
Vector3< double > origin
Definition: Transform.h:27
molgroup_coor_rotate
int molgroup_coor_rotate(Bmolgroup *molgroup, Transform t)
Rotates and translates a molecule group.
Definition: mol_transform.cpp:87
molgroup_composition
int molgroup_composition(Bmolgroup *molgroup, Bstring &paramfile)
Calculates the elemental composition of a molecular system.
Definition: mol_util.cpp:817
Boption::tag
Bstring tag
Definition: options.h:29
Boption::values
long values(T1 &v1, T2 &v2)
Definition: options.h:115
write_img
int write_img(const char *filename, Bimage *p, int compression)
General driver function to write multiple image formats.
Definition: rwimg.cpp:281
molgroup_Bfactors
int molgroup_Bfactors(Bmolgroup *molgroup)
Calculates the average Bfactors for residues in molecules.
Definition: mol_util.cpp:28
Matrix::rows
long rows()
Definition: Matrix.h:153
rwmolecule.h
Header file for reading reflection files.
molgroup_calculate_weight
double molgroup_calculate_weight(Bmolgroup *molgroup)
Calculates the weight of each molecule.
Definition: mol_util.cpp:270
Boption::value
Bstring value
Definition: options.h:30
Bimage
General image parameter class.
Definition: Bimage.h:177
Bmolgroup::box
Vector3< double > box
Definition: rwmolecule.h:184
timer.h
Utilities for timing functions.
Boption::box
long box(Vector3< T1 > &st, Vector3< T2 > &sz)
Definition: options.h:202
verbose
int verbose
Bstring::split_into_doubles
vector< double > split_into_doubles(const Bstring &delim)
Definition: Bstring.cpp:673
main
int main(int argc, char **argv)
Definition: bmol.cpp:77
Transform::scale
Vector3< double > scale
Definition: Transform.h:31
VERB_TIME
#define VERB_TIME
Definition: utilities.h:114
mol_compare.h
Library routines used to compare sets of atomic coordinates.
molgroup_residue_renumber
int molgroup_residue_renumber(Bmolgroup *molgroup, int first)
Renumbers residues.
Definition: mol_util.cpp:182
molgroup_coor_shift
int molgroup_coor_shift(Bmolgroup *molgroup, Vector3< double > shift)
Translates a molecule group.
Definition: mol_transform.cpp:28
timer_start
double timer_start()
Starts timer and prints the time.
Definition: timer.cpp:61
M_PI
#define M_PI
Definition: utilities.h:63
utilities.h
Header file for general utilities.
Boption::size
Vector3< long > size()
Definition: options.h:163
Boption::vector3
Vector3< double > vector3()
Definition: options.h:148
Bstring::length
long length() const
Definition: Bstring.cpp:263
timer_report
double timer_report(double lasttime)
Reports the time elapsed since a given time.
Definition: timer.cpp:76
molgroup_show_center_of_mass
Vector3< double > molgroup_show_center_of_mass(Bmolgroup *molgroup)
Calculates the center of mass of a molecule group.
Definition: mol_util.cpp:387
molgroup_coor_select
int molgroup_coor_select(Bmolgroup *molgroup, Vector3< double > min, Vector3< double > max)
Selects atoms within a box.
Definition: mol_select.cpp:233
molgroup_center_of_mass
Vector3< double > molgroup_center_of_mass(Bmolgroup *molgroup)
Calculates the center of mass of a molecule group.
Definition: mol_util.cpp:307
write_molecule
int write_molecule(char *filename, Bmolgroup *molgroup)
Writes a molecule group.
Definition: rwmolecule.cpp:975
Vector3::volume
double volume()
Definition: Vector3.h:237
Transform::trans
Vector3< double > trans
Definition: Transform.h:30
rwimg.h
Header file for 2D and 3D image I/O.
molgroup_select_chains
int molgroup_select_chains(Bmolgroup *molgroup, Bstring chains)
Selects molecules.
Definition: mol_select.cpp:168
mol_distance_matrix
Matrix mol_distance_matrix(Bmolecule *m1, Bmolecule *m2)
Calculates the distance matrix between the residues in two molecules.
Definition: mol_compare.cpp:354
molgroup_sphericity
double molgroup_sphericity(Bmolgroup *molgroup, double da)
Calculates how close the coordinate set is to a spherical shape.
Definition: mol_util.cpp:545
molgroup_rename
int molgroup_rename(Bmolgroup *molgroup, char first_name)
Renames molecules.
Definition: mol_util.cpp:161
Boption::filename
Bstring filename()
Definition: options.h:85
option_kill
int option_kill(Boption *option)
Deallocates a linked list of option structures.
Definition: options.cpp:111
Matrix::write
void write(Bstring &filename)
Definition: Matrix.h:95
Bmolgroup
Definition: rwmolecule.h:170
Transform::axis
Vector3< double > axis
Definition: Transform.h:28
molgroup_pack_in_periodic_box
int molgroup_pack_in_periodic_box(Bmolgroup *molgroup)
Distributes coordinates across periodic box boundaries.
Definition: mol_transform.cpp:513
Transform::angle
double angle
Definition: Transform.h:29
molgroup_calculate_rmsd
double molgroup_calculate_rmsd(Bmolgroup *molgroup, Bmolgroup *molgroup2)
Calculates the root-mean-square-deviation between two molecule groups.
Definition: mol_compare.cpp:213
Transform
Definition: Transform.h:24
Bstring::contains
bool contains(const Bstring &s)
Definition: Bstring.cpp:592
Vector3::length
double length()
Definition: Vector3.h:222
molgroup_radial_density
int molgroup_radial_density(Bmolgroup *molgroup, double interval, double cutoff, int wrap)
Calculates a radial distribution function.
Definition: mol_util.cpp:1030
Matrix
Definition: Matrix.h:22
molgroup_coor_reset_occupancy
int molgroup_coor_reset_occupancy(Bmolgroup *molgroup, int range_first, int range_last, double occupancy)
Sets occupancies to new values..
Definition: mol_util.cpp:243
molgroup_resolve_pbc
int molgroup_resolve_pbc(Bmolgroup *molgroup)
Recombines coordinates split across periodic box boundaries.
Definition: mol_transform.cpp:450
molgroup_coor_transform
int molgroup_coor_transform(Bmolgroup *molgroup, Transform t)
Rotates and translates a molecule group.
Definition: mol_transform.cpp:332
mol_util.h
Library routines used for atomic coordinates.