[]Struct lumol::sys::EnergyCache

pub struct EnergyCache { /* fields omitted */ }

This is a cache for energy computation.

Cache integrity is left up to the user of this structure: any function with update_ prefix must be called as needed to ensure cache consistency.

Methods

impl EnergyCache

Create a new empty energy cache.

Initialize the cache to be used with system. After a call to this function, the cache is only usable with the same system. To change the associated system, one must call this function again.

Get the cached energy

Update the cache after a call to a EnergyCache::*_cost function or EnergyCache::unused.

This function should be called whenever the cache is not used, but one still want it to be updated. Future call to EnergyCache::update will recompute the full cache.

impl EnergyCache

Get the cost of moving a rigid molecule at molecule_id in the system to new_positions.

This function DOES NOT update the cache, the update function MUST be called if the particles are effectively moved.

Return the cost for moving all rigid molecules of the system.

This function is intended for use when all the molecules in the system are moved rigidly, for example when resizing the system in NPT Monte Carlo. It computes energy changes due to:

  • non bonded pairs interactions;
  • Coulomb interactions;
  • global interactions;

It DOES NOT recompute bonds, angles and dihedral interactions. You must not use this function when the intramolecular configuration changed.

This function DOES NOT update the cache, the update function MUST be called if the molecules are effectively moved.

Auto Trait Implementations

impl Send for EnergyCache

impl Sync for EnergyCache

Blanket Implementations

impl<T> From for T
[src]

Performs the conversion.

impl<T, U> Into for T where
    U: From<T>, 
[src]

Performs the conversion.

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<T> Borrow for T where
    T: ?Sized
[src]

Important traits for &'a mut R

Immutably borrows from an owned value. Read more

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<T> BorrowMut for T where
    T: ?Sized
[src]

Important traits for &'a mut R

Mutably borrows from an owned value. Read more

impl<T> Any for T where
    T: 'static + ?Sized
[src]

🔬 This is a nightly-only experimental API. (get_type_id)

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more