[]Struct lumol::sys::Particle

pub struct Particle {
    pub name: String,
    pub kind: ParticleKind,
    pub charge: f64,
    pub mass: f64,
    pub position: Vector3D,
    pub velocity: Vector3D,
}

The Particle type hold basic data about a particle in the system. It is self contained, so that it will be easy to send data between parallels processes.

Fields

Particle name.

Particle kind, an index for potentials lookup

Particle charge

Particle mass

Particle positions

Particle velocity, if needed

Methods

impl Particle

Create a new Particle from a name, setting the mass to the atomic mass if the name can be found in the periodic table. The charge, position, and velocity are set to 0.

Create a new Particle from a name and a position, setting the mass to the atomic mass if the name can be found in the periodic table. The charge and velocity are set to 0.

impl Particle

Create a ParticleRef from a borrowed Particle .

Create a ParticleRefMut from a mutably borrowed Particle .

Trait Implementations

impl Debug for Particle

Formats the value using the given formatter. Read more

impl Clone for Particle

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for Particle

impl Sync for Particle

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