moleculekit.projections.metricsphericalcoordinate module#

class moleculekit.projections.metricsphericalcoordinate.MetricSphericalCoordinate(refmol, targetcom, refcom, trajalnsel='protein and name CA', refalnsel=None, centersel='protein', pbc=True)#

Bases: Projection

Creates a MetricSphericalCoordinate object that calculates the spherical coordinates between two centers of masses from a set of trajectories.

Parameters:
  • refmol (Molecule object) – The reference Molecule to which we will align.

  • targetcom (str) – Atom selection string from which to calculate the target center of mass. See more here

  • refcom (str) – Atom selection string from which to calculate the reference center of mass. See more here

  • trajalnsel (str, optional) – Atom selection string for the trajectories from which to align to the reference structure. See more here

  • refalnsel (str, optional) – Atom selection string for refmol from which to align to the reference structure. If None, it defaults to the same as trajalnstr. See more here

  • centersel (str, optional) – Atom selection string around which to wrap the simulation. See more here

  • pbc (bool) – Enable or disable coordinate wrapping based on periodic boundary conditions.

Returns:

metr

Return type:

MetricCoordinate object

getMapping(mol)#

Returns the description of each projected dimension.

Parameters:

mol (Molecule object) – A Molecule object which will be used to calculate the descriptions of the projected dimensions.

Returns:

map – A DataFrame containing the descriptions of each dimension

Return type:

DataFrame object

project(mol)#

Project molecule.

Parameters:

mol (Molecule) – A Molecule object to project.

Returns:

data – An array containing the projected data.

Return type:

np.ndarray