pub struct Computed { /* private fields */ }Expand description
The computed model properties by external application
Implementations§
Source§impl 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_forces(&mut self, f: Vec<[f64; 3]>)
pub fn set_forces(&mut self, f: Vec<[f64; 3]>)
Set item forces.
Sourcepub fn set_stress(&mut self, s: [[f64; 3]; 3])
pub fn set_stress(&mut self, s: [[f64; 3]; 3])
Set item stress
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 set_force_constants(&mut self, fc: Vec<[f64; 3]>)
pub fn set_force_constants(&mut self, fc: Vec<[f64; 3]>)
Set item force constants.
Sourcepub fn get_energy(&self) -> Option<f64>
pub fn get_energy(&self) -> Option<f64>
Get energy component.
Sourcepub fn get_dipole(&self) -> Option<[f64; 3]>
pub fn get_dipole(&self) -> Option<[f64; 3]>
Get dipole moment 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)
pub fn set_structure<A, C>(&mut self, atoms: A, cell: Option<C>, scaled: bool)
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§
Source§impl<'de> Deserialize<'de> for Computed
impl<'de> Deserialize<'de> for Computed
Source§fn 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 Freeze for Computed
impl RefUnwindSafe for Computed
impl Send for Computed
impl Sync for Computed
impl Unpin for Computed
impl UnwindSafe for Computed
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Configure for T
impl<T> Configure for T
Source§fn print_toml(&self)
fn print_toml(&self)
👎Deprecated: plan to be removed
Print current configuration in toml format.
Source§fn from_json(s: &str) -> Result<Self, Error>
fn from_json(s: &str) -> Result<Self, Error>
Deserialize an instance of type T from a string of JSON text.
Source§impl<T> Configure for T
impl<T> Configure for T
Source§fn print_toml(&self)
fn print_toml(&self)
👎Deprecated: plan to be removed
Print current configuration in toml format.
Source§fn from_json(s: &str) -> Result<Self, Error>
fn from_json(s: &str) -> Result<Self, Error>
Deserialize an instance of type T from a string of JSON text.
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§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 moreSource§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).Source§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.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.