[]Struct lumol::sys::System

pub struct System {
    pub simulated_degrees_of_freedom: DegreesOfFreedom,
    pub step: u64,
    // some fields omitted
}

The System type hold all the data about a simulated system.

This data contains:

In the implementation, the particles contained in a molecule are guaranteed to be contiguous in memory. This allow for faster access when iterating over molecules, and easier molecule removal from the system.

Fields

Number of degrees of freedom simulated in the system. This default to DegreesOfFreedom::Particles, and is set in the simulation setup.

The current simulation step

Methods

impl System

Create a new empty System

Create an empty system with a specific unit cell

Add a molecule to the system

Get the composition in particles and molecules of the configuration

Use an external temperature for all the system properties. Calling this with Some(temperature) will replace all the computation of the temperature from the velocities with the given values. Calling it with None will use the velocities.

The default is to use the velocities unless this function is called.

impl System

Functions related to interactions

Get an helper struct to evaluate the energy of this system.

Add the potential pair interaction for atoms with types i and j

Add the potential bonded interaction for atoms with types i and j

Add the potential angle interaction for the angle (i, j, k)

Add the potential dihedral interaction for the dihedral angle (i, j, k, m)

Set the coulombic interaction for all pairs to potential

Add the potential global interaction

Important traits for &'a [u8]

Get the list of pair potential acting between the particles at indexes i and j.

Important traits for &'a [u8]

Get the list of bonded potential acting between the particles at indexes i and j.

Important traits for &'a [u8]

Get the list of angle interaction acting between the particles at indexes i, j and k.

Important traits for &'a [u8]

Get the list of dihedral angles interaction acting between the particles at indexes i, j, k and m.

Get the coulombic interaction for the system

Important traits for &'a [u8]

Get all global interactions for the system

Get maximum cutoff from coulomb, pairs and global interactions.

impl System

Functions to get physical properties of a system.

Get the number of degrees of freedom in the system

Get the kinetic energy of the system.

Get the potential energy of the system.

Get the total energy of the system.

Get the temperature of the system.

Get the volume of the system.

Get the virial of the system as a tensor

Get the pressure of the system from the virial equation, at the system instantaneous temperature.

Get the stress tensor of the system from the virial equation.

Important traits for Vec<u8>

Get the forces acting on all the particles in the system

Methods from Deref<Target = Configuration>

Check if the particles at indexes i and j are in the same molecule

Important traits for MoleculeIter<'a>

Get an iterator over the molecules in the configuration.

Important traits for MoleculeIterMut<'a>

Get an iterator over the molecules in the configuration.

Get the molecule at index id

Get the molecule at index id

Get the index of the molecule containing the particle i

Get the length of the shortest bond path to go from the particle i to the particle j. If the particles are not in the same molecule, the length is -1. Else, this length is 0 if i == j, 1 if there is a bond between i and j, etc.

Remove the molecule at index i

Important traits for Vec<u8>

Add a bond between the particles at indexes i and j. The particles should have been added to the configuration before calling this.

Warning

If the bond is between two particles which are not in the same molecule, the two molecules are merged together by moving particles in the particles list, and thus invalidate any previously stored index. In particular, any bond, angle, dihedral or molecule is invalidated.

This function will return the list of atomic permutations that where applied in order to ensure that molecules are contiguous in memory.

Add a molecule to the configuration, putting the new particles at the end of the particles list

Get the number of particles in this configuration

Check if this configuration contains any particle

Return the center-of-mass of the configuration

Get the list of particles in this configuration, as a ParticleSlice.

Get the list of particles in this configuration, as a mutable ParticleSliceMut.

Get the distance between the particles at indexes i and j

Get the vector between the nearest image of particle j with respect to particle i.

Get the angle between the particles i, j and k

Get the angle and the derivatives of the angle between the particles i, j and k

Get the dihedral angle between the particles i, j, k and m

Get the dihedral angle and the derivatives of the dihedral angle between the particles i, j, k and m

Trait Implementations

impl DerefMut for System

Mutably dereferences the value.

impl Deref for System

The resulting type after dereferencing.

Dereferences the value.

impl Clone for System

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for System

impl Sync for System

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

Creates owned data from borrowed data, usually by cloning. Read more

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

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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