Cartesian Coordinate Collective Variables

Overview

pysages.colvars.coordinates.Component(...[, ...])

Use a specific Cartesian component of the center of mass of the group of atom selected via the indices.

pysages.colvars.coordinates.Distance(indices)

Use the distance of atom groups selected via the indices as collective variable.

Details

Collective Variables that are computed from the Cartesian coordinates.

pysages.colvars.coordinates.barycenter(positions)

Returns the geometric center, or centroid, of a group of points in space.

Parameters:

positions (jax.Array) – Array containing the positions of the points for which to compute the barycenter.

Returns:

barycenter – 3D array with the barycenter coordinates.

Return type:

jax.Array

pysages.colvars.coordinates.weighted_barycenter(positions, weights)

Returns the center of a group of points in space weighted by arbitrary weights.

Parameters:
  • positions (jax.Array) – Array containing the positions of the points for which to compute the barycenter.

  • weights (jax.Array) – Array containing the weights to be used when computing the barycenter.

Returns:

weighted_barycenter – 3D array with the weighted barycenter coordinates.

Return type:

jax.Array

class pysages.colvars.coordinates.Component(indices, axis, group_length=None)

Use a specific Cartesian component of the center of mass of the group of atom selected via the indices.

Parameters:
  • indices (list[int], list[tuple(int)]) – Select atom groups via indices. From each group the barycenter is calculated.

  • axis (int) – Cartesian coordinate axis component 0 (X), 1 (Y), 2 (Z) that is requested as CV.

class pysages.colvars.coordinates.Distance(indices)

Use the distance of atom groups selected via the indices as collective variable.

Parameters:

indices (list[int], list[tuple(int)]) – Select atom groups via indices. (2 Groups required)

pysages.colvars.coordinates.distance(r1, r2)

Returns the distance between two points in space or between the barycenters of two groups of points in space.

Parameters:
  • r1 (jax.Array) – Array containing the position in space of the first point or group of points.

  • r2 (jax.Array) – Array containing the position in space of the second point or group of points.

Returns:

distance – Distance between the two points.

Return type:

float

class pysages.colvars.coordinates.Displacement(indices)

Relative displacement between two points in space.

Parameters:

indices (Union[list[int], list[tuple(int)]]) – Indices of the reference atoms (two groups are required).

pysages.colvars.coordinates.displacement(r1, r2)

Displacement between two points in space or between the barycenters of two groups of points in space.

Parameters:
  • r1 (jax.Array) – Array containing the position in space of the first point or group of points.

  • r2 (jax.Array) – Array containing the position in space of the second point or group of points.

Returns:

displacement – Displacement between the two points.

Return type:

jax.Array