[−]Struct lumol::Particle
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
name: String
Particle name.
kind: ParticleKind
Particle kind, an index for potentials lookup
charge: f64
Particle charge
mass: f64
Particle mass
position: Vector3D
Particle positions
velocity: Vector3D
Particle velocity, if needed
Implementations
impl Particle
pub fn new<S>(name: S) -> Particle where
S: Into<String>,
S: Into<String>,
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.
pub fn with_position<S>(name: S, position: Vector3D) -> Particle where
S: Into<String>,
S: Into<String>,
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
pub fn as_ref(&self) -> ParticleRef<'_>
Create a
ParticleRef
from a borrowed
Particle
.
pub fn as_mut(&mut self) -> ParticleRefMut<'_>
Create a
ParticleRefMut
from a mutably borrowed
Particle
.
Trait Implementations
impl Clone for Particle
pub fn clone(&self) -> Particle
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for Particle
impl<'a> From<&'a Atom> for Particle
impl FromIterator<Particle> for ParticleVec
pub fn from_iter<T>(iter: T) -> ParticleVec where
T: IntoIterator<Item = Particle>,
T: IntoIterator<Item = Particle>,
impl StructOfArray for Particle
type Type = ParticleVec
Auto Trait Implementations
impl RefUnwindSafe for Particle
impl Send for Particle
impl Sync for Particle
impl Unpin for Particle
impl UnwindSafe for Particle
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,