[−]Module lumol::energy
Interaction potentials for energy and forces computations
Potentials
In classical simulations, the total energy of a system is separated as a sum containing terms from the non-bonded pairs, the bonds, the angles, the dihedral angles in the system; and the electrostatic interactions.
Potentials are used to compute the interaction energy in a system. They are
represented by a Potential
trait, used to compute the force
and the energy of interaction. In order to add a new potential to lumol,
one has to implement the Potential trait, and then indicate how the
potential can be used. This is done by implementing one or more of the
potentials marker traits:
PairPotential
for non-bonded two body interactions;BondPotential
for covalent bonds interactions;AnglePotential
for covalent angles interactions;DihedralPotential
for covalent dihedral angles interactions.
use lumol_core::energy::{Potential, PairPotential, DihedralPotential}; #[derive(Clone)] struct OnePotential; // OnePotential is a potential impl Potential for OnePotential { fn energy(&self, _: f64) -> f64 {1.0} fn force(&self, _: f64) -> f64 {0.0} } // It can be used for pair and dihedral potentials, but not for angles or // bonds. impl PairPotential for OnePotential { /* some code omitted */ } impl DihedralPotential for OnePotential {}
Global and Coulombic potentials
Global potentials are potentials that have an effect on the whole system at
once. They are defined by implementing the GlobalPotential
GlobalPotential trait. CoulombicPotential
are a
specific version of global potentials used to compute electrostatic
interactions.
Structs
BornMayerHuggins | Born-Mayer-Huggins potential. |
Buckingham | Buckingham potential. |
CosineHarmonic | Cosine harmonic potential. |
Ewald | Ewald summation for coulombic interactions. |
Gaussian | Gaussian potential. |
Harmonic | Harmonic potential. |
LennardJones | Lennard-Jones potential. |
Mie | Mie potential. |
Morse | Morse potential |
NullPotential | No-op potential. |
PairInteraction | A non-bonded interaction between two particle. |
RestrictionInfo | Restriction information attached to a pair of |
SharedEwald | Thread-sade wrapper around Ewald implementing |
TableComputation | Computation of a potential using tabulated values. |
Torsion | Torsion potential. |
Wolf | Wolf summation for coulombic interactions. |
Enums
BondPath | Shortest bond path between two particles in a system |
PairRestriction | Possible restrictions on the pair interactions. |
Traits
AnglePotential | Marker trait for potentials that can be used for molecular angles. |
BondPotential | Marker trait for potentials that can be used for molecular bonds. |
Computation | Alternative energy and forces computation. |
CoulombicPotential | Electrostatic potential solver. |
DihedralPotential | Marker trait for potentials that can be used for molecular dihedral angles. |
GlobalCache | Energetic cache for global potentials. |
GlobalPotential | A potential acting on the whole System at once. |
PairPotential | Marker trait for potentials that can be used for non-bonded two body interactions. |
Potential | A potential for force and energy computations. |