Bsoft 2.1.4
Bernard's software package
mol_symmetry.cpp File Reference

Library routines used for symmetry operations on atomic coordinates. More...

#include "rwmolecule.h"
#include "rwatomprop.h"
#include "rwresprop.h"
#include "mol_compare.h"
#include "mol_symmetry.h"
#include "mol_transform.h"
#include "mol_util.h"
#include "seq_align.h"
#include "Matrix3.h"
#include "matrix_linear.h"
#include "symmetry.h"
#include "random_numbers.h"
#include "utilities.h"
#include <fstream>

Classes

struct  MassCOM
 

Functions

int molgroup_apply_point_group (Bmolgroup *molgroup, Bsymmetry &sym, View ref_view)
 Generates all symmetry-related coordinates. More...
 
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. More...
 
int molgroup_apply_symmetry_from_pdb (Bmolgroup *molgroup, Bstring &filename)
 Generates all symmetry-related coordinates using PDB file matrices. More...
 
int molgroup_apply_matrices_from_pdb (Bmolgroup *molgroup, Bstring &filename)
 Generates all symmetry-related coordinates using PDB file matrices. More...
 
int molgroup_find_standard_view (Bmolgroup *molgroup, Bsymmetry &sym, View ref_view)
 Searches for the standard view based on point group symmetry. More...
 
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. More...
 
double molgroup_symmetry_RMSD (Bmolgroup *molgroup, Bsymmetry &sym)
 Calculates the RMSD for symmetry in the standard orientation. More...
 
double molgroup_symmetry_B (Bmolgroup *molgroup, Bsymmetry &sym)
 Calculates the B factors from symmetry-related molecules. More...
 
int molgroup_generate_crystal (Bmolgroup *molgroup, UnitCell uc, Vector3< int > number)
 Generates unit cells from a set of coordinates. More...
 

Variables

int verbose
 

Detailed Description

Library routines used for symmetry operations on atomic coordinates.

Author
Bernard Heymann
Date
Created: 20021020
Modified: 20180226

Function Documentation

◆ molgroup_apply_matrices_from_pdb()

int molgroup_apply_matrices_from_pdb ( Bmolgroup molgroup,
Bstring filename 
)

Generates all symmetry-related coordinates using PDB file matrices.

Parameters
*molgroupmolecule group structure.
&filenamePDB file with matrices.
Returns
int 0.
Uses the BIOMT records.

◆ molgroup_apply_point_group()

int molgroup_apply_point_group ( Bmolgroup molgroup,
Bsymmetry sym,
View  ref_view 
)

Generates all symmetry-related coordinates.

Parameters
*molgroupmolecule group structure.
*symsymmetry structure.
ref_viewreference view.
Returns
int 0.

◆ molgroup_apply_symmetry_from_pdb()

int molgroup_apply_symmetry_from_pdb ( Bmolgroup molgroup,
Bstring filename 
)

Generates all symmetry-related coordinates using PDB file matrices.

Parameters
*molgroupmolecule group structure.
&filenamePDB file with matrices.
Returns
int 0.
Uses the SMTRY records.

◆ molgroup_find_standard_view()

int molgroup_find_standard_view ( Bmolgroup molgroup,
Bsymmetry sym,
View  ref_view 
)

Searches for the standard view based on point group symmetry.

Parameters
*molgroupmolecule group structure.
*sympoint group symmetry.
ref_viewreference view.
Returns
int 0.
The molecule group is first analyzed to identify the different
chains and calculate their centers-of-mass and weights.
The overall center-of-mass defines a point on at least the
major symmetry axis (cyclic symmetries), or the likely intersection
of symmetry axes.
Note: This function does a reasonable job of orienting the molecule
group, but it may be off by up to an angstrom!!!

◆ molgroup_generate_crystal()

int molgroup_generate_crystal ( Bmolgroup molgroup,
UnitCell  uc,
Vector3< int >  number 
)

Generates unit cells from a set of coordinates.

Parameters
*molgroupmolecule group.
ucunit cell dimensions.
numbernumber of unit cells in each lattice direction.
Returns
int 0, <0 if error.
The input molecule group is duplicated to generate the requested number
of copies in each lattice direction.

◆ molgroup_generate_helix()

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.

Parameters
*molgroupmolecule group structure.
ref_viewreference view.
helix_risehelical rise.
helix_anglehelical rotation angle.
gen_downnumber of asymmetric units generated upwards.
gen_upnumber of asymmetric units generated downwards.
Returns
int 0.

◆ molgroup_orient_to_standard_view()

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.

Parameters
*molgroupmolecule group structure.
*sympoint group symmetry.
ref_viewreference view (default should be 0,0,1,0).
*simatresidue similarity matrix.
Returns
int 0.
Each pair of chains in the molecule groupis tested for sequence
identity to find symmetry-related molecules. For each pair of matched
molecules, the transformation to superimpose the one onto the other
is determined and the symmetry axis and translation calculated.
The collection of symmetry axes are clustered with a k-means 
algorithm and the predominant class assigned to the major 
symmetry axis. For dihedral point groups, a minor axis is also
assigned (randomly at this time). The molecule group is then
transformed to orient it with the major axis on {0,0,1} and
the minor axis on {1,0,0}, and the symmetry center at {0,0,0}.
Note: This function has not been extensively tested with all
point groups!!!

◆ molgroup_symmetry_B()

double molgroup_symmetry_B ( Bmolgroup molgroup,
Bsymmetry sym 
)

Calculates the B factors from symmetry-related molecules.

Parameters
*molgroupmolecule group structure.
*sympoint group symmetry.
Returns
double RMSD.
The centers-of-mass for all the molecules are calculated as a reduced
representation of the molecule group. All symmetry operations are 
imposed on the centers, with the RMSD defined as minimum distance
between an original cneter and a transformed center.

◆ molgroup_symmetry_RMSD()

double molgroup_symmetry_RMSD ( Bmolgroup molgroup,
Bsymmetry sym 
)

Calculates the RMSD for symmetry in the standard orientation.

Parameters
*molgroupmolecule group structure.
*sympoint group symmetry.
Returns
double RMSD.
The centers-of-mass for all the molecules are calculated as a reduced
representation of the molecule group. All symmetry operations are 
imposed on the centers, with the RMSD defined as minimum distance
between an original cneter and a transformed center.

Variable Documentation

◆ verbose

int verbose
extern