moleculekit.projections.metriccoordinate module#

class moleculekit.projections.metriccoordinate.MetricCoordinate(atomsel, refmol=None, trajalnsel=None, refalnsel=None, centersel='protein', groupsel=None, groupreduce='com', pbc=True)#

Bases: Projection

Creates a MetricCoordinate object that calculates the atom coordinates from a set of trajectories.

Parameters:
  • atomsel (str | ndarray | None) – Atom selection for the atoms whose coordinates we want to calculate (a selection string, boolean mask, or integer index array). See more here

  • refmol (Molecule | None) – The reference Molecule to which we will align.

  • trajalnsel (str | ndarray | None) – Atom selection for the trajectories from which to align to the reference structure (a selection string, boolean mask, or integer index array). If it’s None and a refmol is passed it will default to ‘protein and name CA’.

  • refalnsel (str | ndarray | None) – Atom selection for refmol from which to align to the reference structure (a selection string, boolean mask, or integer index array). If None, it defaults to the same as trajalnsel.

  • centersel (str | ndarray) – Atom selection around which to wrap the simulation (a selection string, boolean mask, or integer index array). See more here

  • groupsel (str | None) – Group all atoms in atomsel to a single (‘all’ atoms in group) or multiple groups per residue (‘residue’).

  • groupreduce (str) – The reduction to apply on groupsel if it is used. centroid will calculate the centroid coordinate of each group. com will calculate the coordinate of the center of mass of each group.

  • 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) – 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:

ndarray