mythos.energy.martini.m2.angle ============================== .. py:module:: mythos.energy.martini.m2.angle .. autoapi-nested-parse:: Angle potential energy function for Martini 2. Attributes ---------- .. autoapisummary:: mythos.energy.martini.m2.angle.ANGLE_K_PREFIX mythos.energy.martini.m2.angle.ANGLE_THETA0_PREFIX Classes ------- .. autoapisummary:: mythos.energy.martini.m2.angle.AngleConfiguration mythos.energy.martini.m2.angle.Angle Functions --------- .. autoapisummary:: mythos.energy.martini.m2.angle.compute_angle mythos.energy.martini.m2.angle.triplet_angle Module Contents --------------- .. py:data:: ANGLE_K_PREFIX :value: 'angle_k_' .. py:data:: ANGLE_THETA0_PREFIX :value: 'angle_theta0_' .. py:class:: AngleConfiguration(couplings: dict[str, list[str]] | None = None, **kwargs) Bases: :py:obj:`mythos.energy.martini.base.MartiniEnergyConfiguration` Configuration 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". .. py:method:: __post_init__() -> None Hook for additional initialization in subclasses. .. py:function:: compute_angle(r_ij: mythos.utils.types.Vector3D, r_kj: mythos.utils.types.Vector3D) -> float Compute the angle between three particles (angle at j). :param r_ij: Displacement vector from j to i. :param r_kj: Displacement vector from j to k. :returns: The angle theta_ijk in radians. .. py:function:: 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 Calculate angle energy for a given triplet of particles. :param centers: Positions of all particles. :param triplet: Indices [i, j, k] of the three particles forming the angle. :param k_angle: Force constant for the angle. :param theta0_angle: Equilibrium angle in radians. :param displacement_fn: Function to compute displacement between particles. :param 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 :rtype: Harmonic angle energy .. py:class:: Angle Bases: :py:obj:`mythos.energy.martini.base.MartiniEnergyFunction` Angle potential energy function for Martini 2. .. py:attribute:: params :type: AngleConfiguration .. py:attribute:: use_G96 :type: ClassVar[bool] :value: True .. py:method:: __post_init__(topology: None = None) -> None .. py:method:: compute_energy(trajectory: mythos.simulators.io.SimulatorTrajectory) -> float Compute the energy of the system given the nucleotide.