A worldwide e-Infrastructure for NMR and structural biology

This site uses cookies for a better experience. By continuing to browse you agree to the use of cookies.

HADDOCK scriptorium - geometrical properties of a molecule


geometry.py is a python module, which is composed of three functions (to make use of the geometry module, you should have Biopython installed): 

  1. center_of_mass: calculates the center of mass of a molecule. It can be run in two modes: geometric=False or geometric=Truegeometric=False assumes that all the atoms present in the molecule has the same mass. 
  2. calculate_shape_paramcalculates the dimensions of the smallest ellipsoid into which the input molecule can fit (a, b,c, see Ellipsoid-wiki), radius of gyration and anisotropy value, A (for interpretation of it, see below). 
  3. calculate_moment_of_inertia_tensor: calculates the moment of inertia tensor.


To use any of the above given functions, you should first import the PDBParser of Biopython and parse your structure with it:

from Bio.PDB import PDBParser
P = PDBParser()
s = P.get_structure('id', 'structure.pdb')

And after that you can make use of the each function as follows:

from geometry import center_of_mass
print center_of_mass(s, False)
from geometry import calculate_gyration_tensor
print calculate_shape_param(s)
from geometry import calculate_moment_of_inertia_tensor
print calculate_moment_of_inertia_tensor(s)

How to interpret the anisotrpy value, A (see Ellipsoid-wiki):

If A=0: The molecule is spherical
If A>0: The molecule is prolate
If A<0: The molecule is oblate
Your rating: None Average: 5 (1 vote)

Cite WeNMR/WestLife

Usage of the WeNMR/WestLife portals should be acknowledged in any publication:
"The FP7 WeNMR (project# 261572), H2020 West-Life (project# 675858) and the EOSC-hub (project# 777536) European e-Infrastructure projects are acknowledged for the use of their web portals, which make use of the EGI infrastructure with the dedicated support of CESNET-MetaCloud, INFN-PADOVA, NCG-INGRID-PT, TW-NCHC, SURFsara and NIKHEF, and the additional support of the national GRID Initiatives of Belgium, France, Italy, Germany, the Netherlands, Poland, Portugal, Spain, UK, Taiwan and the US Open Science Grid."
And the following article describing the WeNMR portals should be cited:
Wassenaar et al. (2012). WeNMR: Structural Biology on the Grid.J. Grid. Comp., 10:743-767.


The WeNMR Virtual Research Community has been the first to be officially recognized by the EGI.

European Union

WeNMR is an e-Infrastructure project funded under the 7th framework of the EU. Contract no. 261572

WestLife, the follow up project of WeNMR is a Virtual Research Environment e-Infrastructure project funded under Horizon 2020. Contract no. 675858