[]Trait lumol::BondPotential

pub trait BondPotential: Potential + BoxCloneBond {
    fn virial(&self, r: &Vector3D) -> Matrix3 { ... }

Marker trait for potentials that can be used for molecular bonds.


use lumol_core::energy::{Potential, BondPotential};

// A no-op potential
struct Null;

impl Potential for Null {
    fn energy(&self, x: f64) -> f64 {0.0}
    fn force(&self, x: f64) -> f64 {0.0}

// Now we can use the Null potential for bonds
impl BondPotential for Null {}

Provided methods

fn virial(&self, r: &Vector3D) -> Matrix3

Compute the virial contribution corresponding to the distance r between the particles.

Loading content...


impl BondPotential for Harmonic

impl BondPotential for Morse

impl BondPotential for NullPotential

Loading content...