mythos.energy.martini.m2.angle
Angle potential energy function for Martini 2.
Attributes
Classes
Configuration for Martini angle energy function. |
|
Angle potential energy function for Martini 2. |
Functions
|
Compute the angle between three particles (angle at j). |
|
Calculate angle energy for a given triplet of particles. |
Module Contents
- mythos.energy.martini.m2.angle.ANGLE_K_PREFIX = 'angle_k_'
- mythos.energy.martini.m2.angle.ANGLE_THETA0_PREFIX = 'angle_theta0_'
- class mythos.energy.martini.m2.angle.AngleConfiguration(couplings: dict[str, list[str]] | None = None, **kwargs)[source]
Bases:
mythos.energy.martini.base.MartiniEnergyConfigurationConfiguration for Martini angle energy function.
Angle params must be provided as “angle_k_I_J_K” and “angle_theta0_I_J_K” in corresponding pairs for each angle name in the system. NAME should be in the format of “MOLTYPE_ATOMNAME1_ATOMNAME2_ATOMNAME3”, e.g., “DMPC_NC3_PO4_GL1”.
- mythos.energy.martini.m2.angle.compute_angle(r_ij: mythos.utils.types.Vector3D, r_kj: mythos.utils.types.Vector3D) float[source]
Compute the angle between three particles (angle at j).
- Parameters:
r_ij – Displacement vector from j to i.
r_kj – Displacement vector from j to k.
- Returns:
The angle theta_ijk in radians.
- mythos.energy.martini.m2.angle.triplet_angle(centers: mythos.utils.types.Arr_States_3, triplet: mythos.utils.types.Vector3D, k_angle: float, theta0_angle: float, displacement_fn: callable, use_G96: bool) float[source]
Calculate angle energy for a given triplet of particles.
- Parameters:
centers – Positions of all particles.
triplet – Indices [i, j, k] of the three particles forming the angle.
k_angle – Force constant for the angle.
theta0_angle – Equilibrium angle in radians.
displacement_fn – Function to compute displacement between particles.
use_G96 – Whether to use Gromacs 1996 cosine-based angle potential (as in Martini 2) or standard harmonic angle potential.
- Returns:
0.5 * k * (theta - theta0)^2
- Return type:
Harmonic angle energy
- class mythos.energy.martini.m2.angle.Angle[source]
Bases:
mythos.energy.martini.base.MartiniEnergyFunctionAngle potential energy function for Martini 2.
- params: AngleConfiguration
- compute_energy(trajectory: mythos.simulators.io.SimulatorTrajectory) float[source]
Compute the energy of the system given the nucleotide.