topo.core package

Note

The models and system modules have dedicated, curated pages: Models and System. Only the geometry helper module is documented here to avoid duplicate API entries.

Submodules

topo.core.geometry module

class topo.core.geometry.geometry[source]

Bases: object

A class to hold methods for calculating geometrical values given sets of atom coordinates.

static bond(coord1: Quantity, coord2: Quantity)[source]

Calculate the distance length between two (x,y,z) quantity coordinates.

Parameters:
  • coord1 (openmm.unit.quantity.Quantity array) – Vector for the first coordinate.

  • coord2 (openmm.unit.quantity.Quantity array) – Vector for the second coordinate.

Returns:

Quantity (value and unit) of the distance length in nanometers.

Return type:

simtk.unit.quantity.Quantity

static position2Array(position: Quantity, output_unit)[source]

Converts an OpenMM position object quantity into a numpy array.

Parameters:
  • position (openmm.unit.quantity.Quantity) – Array containing quantity objects [e.g. (x,y,z) array returned from positions].

  • output_unit (openmm.unit.nanometer) – Unit in which to return the items of the array.

Returns:

A numpy array containing the quantity values in unit of nm, converted to float.

Return type:

numpy.ndarray