Shapes as collective Variables¶
Overview
Collective Variable that calculates the unweighted radius of gyration as CV. |
|
|
Calculate the principal moment as collective variable. |
|
Collective Variable that calculates the Asphericity. |
|
Collective Variable that calculates the Acylindricity CV. |
Collective Variable that calculates the Shape Anisotropy CV. |
Details
Collective Variables that are calculated from the shape of group of atoms.
- class pysages.colvars.shape.RadiusOfGyration(indices, group_length=None)¶
Collective Variable that calculates the unweighted radius of gyration as CV.
- Parameters:
indices (list[int], list[tuple(int)]) – Must be a list or tuple of atoms (integers or ranges) or groups of atoms. A group is specified as a nested list or tuple of atoms.
group_length (int, optional) – Specify if a fixed group length is expected.
- property function¶
returns: See pysages.colvars.shape.radius_of_gyration for details. :rtype: Callable
- pysages.colvars.shape.radius_of_gyration(positions)¶
Calculate the radius of gyration for a group of atoms.
- Parameters:
positions (jax.Array) – Array of particle positions used to calculate the radius of gyration.
- Returns:
Radius of gyration vector
- Return type:
jax.Array
- pysages.colvars.shape.weighted_radius_of_gyration(positions, weights)¶
Calculate the radius of gyration for a group of atoms weighted by arbitrary weights.
- Parameters:
positions (jax.Array) – Array of particle positions used to calculate the radius of gyration.
weights (jax.Array) – Array of weights for the positions.
- Returns:
Weighted radius of gyration vector
- Return type:
jax.Array
- class pysages.colvars.shape.PrincipalMoment(indices, axis, group_length=None)¶
Calculate the principal moment as collective variable.
- Parameters:
indices (list[int], list[tuple(int)]) – Must be a list or tuple of atoms (integers or ranges) or groups of atoms. A group is specified as a nested list or tuple of atoms.
axis (int) – Index of the Cartesian coordinate: 0 (X), 1 (Y), 2 (Z)
group_length (Optional[int]) – Specify if a fixed group length is expected.
- property function¶
returns: Function to calculate the eigenvalue with the specified axis index of the gyration tensor. See pysages.colvars.shape.principal_moments and pysages.colvars.shape.gyration_tensor for details. :rtype: Callable
- pysages.colvars.shape.gyration_tensor(positions)¶
Calculate the gyration tensor for a collection of points in space.
- Parameters:
positions (jax.Array) – Points in space that are equally weighted to calculate the gyration tensor.
- Returns:
Gyration tensor
- Return type:
jax.Array
- pysages.colvars.shape.weighted_gyration_tensor(positions, weights)¶
Calculate the gyration tensor for a collection of points in space weighted by arbitrary weights.
- Parameters:
positions (jax.Array) – Points in space that are weighted by weight to calculate the gyration tensor.
weights (jax.Array) – Weights for the points in space e.g. particle masses
- Returns:
Gyration tensor
- Return type:
jax.Array
- pysages.colvars.shape.principal_moments(positions)¶
Calculate the principal moments for positions. The principal moments are the eigenvalues of the gyration tensor. See pysages.colvars.shape.gyration_tensor for details.
- Parameters:
positions (jax.Array) – Points in space that are equally weighted to calculate the gyration tensor.
- Returns:
Eigenvalues of the gyration tensor
- Return type:
jax.Array
- class pysages.colvars.shape.Asphericity(indices, group_length=None)¶
Collective Variable that calculates the Asphericity.
- Parameters:
indices (list[int], list[tuple(int)]) – Must be a list or tuple of atoms (integers or ranges) or groups of atoms. A group is specified as a nested list or tuple of atoms.
group_length (Optional[int]) – Specify if a fixed group length is expected.
- property function¶
returns: See pysages.colvars.shape.asphericity for details. :rtype: Callable
- pysages.colvars.shape.asphericity(positions)¶
Calculate the Asphericity from a group of atoms. It is defined as \(\lambda_3 - (\lambda_1 + \lambda_2) / 2\), where \(\lambda_i\) specifies the principal moments of the group of atoms.
See pysages.colvars.shape.principal_moments for details.
- Parameters:
positions (jax.Array) – Points in space that are equally weighted to calculate the principal moments.
- Returns:
Asphericity
- Return type:
float
- class pysages.colvars.shape.Acylindricity(indices, axes='xy', group_length=None)¶
Collective Variable that calculates the Acylindricity CV.
- Parameters:
indices (list[int], list[tuple(int)]) – Must be a list or tuple of atoms (integers or ranges) or groups of atoms. A group is specified as a nested list or tuple of atoms.
group_length (Optional[int]) – Specify if a fixed group length is expected.
axes (str) – Axis combination around which the particles are symmetric. Options are: xy, yz, xz
- property function¶
returns: See pysages.colvars.shape.acylindricity for details. :rtype: Callable
- pysages.colvars.shape.acylindricity(positions, axes)¶
Calculate the Acylindricity from a group of atoms. It is defined as \(\lambda_k - \lambda_j\), where \(\lambda_i\) specifies the principal moments of the group of atoms, and j and k are the axes around which the particles are symmetric.
See pysages.colvars.shape.principal_moments for details.
- Parameters:
positions (jax.Array) – Points in space that are equally weighted to calculate the principal moments from.
axes (Tuple[int, int]) – Indices of the axes around which the particles are symmetric.
- Returns:
Acylindricity
- Return type:
float
- class pysages.colvars.shape.ShapeAnisotropy(indices, group_length=None)¶
Collective Variable that calculates the Shape Anisotropy CV.
- Parameters:
indices (list[int], list[tuple(int)]) – Must be a list or tuple of atoms (integers or ranges) or groups of atoms. A group is specified as a nested list or tuple of atoms.
group_length (Optional[int]) – Specify if a fixed group length is expected.
- property function¶
returns: See pysages.colvars.shape.shape_anisotropy for details. :rtype: Callable
- pysages.colvars.shape.shape_anisotropy(positions)¶
Calculate the shape anisotropy from a group of atoms, defined as:
\[\frac{3}{2} \frac{\lambda_1^2 + \lambda_2^2 + \lambda_3^2} {(\lambda_1 + \lambda_2 + \lambda_3)^2} - \frac{1}{2}\]where \(\lambda_i\) specifies the principal moments of the group of atoms.
See pysages.colvars.shape.principal_moments for details.
- Parameters:
positions (jax.Array) – Points in space that are equally weighted to calculate the principal moments from.
- Returns:
Shape Anisotropy
- Return type:
float