Struct gosh_model::Computed
source · [−]pub struct Computed { /* private fields */ }Expand description
The computed model properties by external application
Implementations
sourceimpl Computed
impl Computed
sourcepub fn set_energy(&mut self, e: f64)
pub fn set_energy(&mut self, e: f64)
Set item energy.
sourcepub fn set_dipole(&mut self, d: [f64; 3])
pub fn set_dipole(&mut self, d: [f64; 3])
Set item dipole.
sourcepub fn set_molecule(&mut self, m: Molecule)
pub fn set_molecule(&mut self, m: Molecule)
Set item Molecule.
sourcepub fn get_energy(&self) -> Option<f64>
pub fn get_energy(&self) -> Option<f64>
Get energy component.
sourcepub fn get_molecule(&self) -> Option<&Molecule>
pub fn get_molecule(&self) -> Option<&Molecule>
Get molecule structure.
sourcepub fn set_structure<A, C>(&mut self, atoms: A, cell: Option<C>, scaled: bool) where
A: IntoIterator,
A::Item: Into<Atom>,
C: Into<[[f64; 3]; 3]>,
pub fn set_structure<A, C>(&mut self, atoms: A, cell: Option<C>, scaled: bool) where
A: IntoIterator,
A::Item: Into<Atom>,
C: Into<[[f64; 3]; 3]>,
Set molecule structure.
Parameters
-
atoms: a list of symbol and position pairs
-
cell: three Lattice vectors array
-
scaled: indicates if input atom positions in scaled coordinates
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Computed
impl<'de> Deserialize<'de> for Computed
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Computed
impl Send for Computed
impl Sync for Computed
impl Unpin for Computed
impl UnwindSafe for Computed
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct self from the equivalent element of its
superset. Read more
fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if self is actually part of its subset T (and can be converted to it).
fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset but without any property checks. Always succeeds.
fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts self to the equivalent element of its superset.
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more