mythos.energy.martini.m2.lj

Lennard-Jones potential energy function for Martini 2.

Attributes

LJ_SIGMA_PREFIX

LJ_EPSILON_PREFIX

Classes

LJConfiguration

"Configuration for Martini Lennard-Jones energy function.

LJ

Lennard-Jones potential energy function for Martini 2.

Functions

lennard_jones(→ float)

Calculate Lennard-Jones potential given distance r, epsilon, and sigma.

pair_lj(→ float)

Calculate LJ energy for a given pair of particles.

Module Contents

mythos.energy.martini.m2.lj.LJ_SIGMA_PREFIX = 'lj_sigma_'
mythos.energy.martini.m2.lj.LJ_EPSILON_PREFIX = 'lj_epsilon_'
class mythos.energy.martini.m2.lj.LJConfiguration(couplings: dict[str, list[str]] | None = None, **kwargs)[source]

Bases: mythos.energy.martini.base.MartiniEnergyConfiguration

“Configuration for Martini Lennard-Jones energy function.

All parameters provided must be of the form “lj_sigma_A_B” or “lj_epsilon_A_B”, where A and B are bead types. Pair order is ignored unless both orderings are provided. It is required that sigma and epsilon parameters are provided for any bead type pairs present in the system.

Couplings are supported (see MartiniEnergyConfiguration for details).

__post_init__() None[source]

Hook for additional initialization in subclasses.

mythos.energy.martini.m2.lj.lennard_jones(r: float, eps: float, sigma: float) float[source]

Calculate Lennard-Jones potential given distance r, epsilon, and sigma.

mythos.energy.martini.m2.lj.pair_lj(centers: mythos.utils.types.Arr_States_3, pair: mythos.utils.types.Vector2D, sigmas: mythos.utils.types.MatrixSq, epsilons: mythos.utils.types.MatrixSq, types: mythos.utils.types.Arr_N, displacement_fn: callable) float[source]

Calculate LJ energy for a given pair of particles.

class mythos.energy.martini.m2.lj.LJ[source]

Bases: mythos.energy.martini.base.MartiniEnergyFunction

Lennard-Jones potential energy function for Martini 2.

params: LJConfiguration
__post_init__(topology: None = None) None[source]
compute_energy(trajectory: mythos.simulators.io.SimulatorTrajectory) float[source]

Compute the energy of the system given the nucleotide.