[−]Struct lumol::sim::output::CustomOutput
The CustomOutput
writes data into a file from an user-provided template.
The template string can contain mathematical expressions, using some
physical properties of the system. These mathematical expressions must be
enclosed in braces ({}
). Here are some examples:
- A constant string is reproduced as it is:
some data
; - Anything in braces is replaced by the corresponding values:
{pressure} {volume}
; - Mathematical operators are allowed in braces:
{pressure / volume}
. You can use+
,-
,/
,*
,^
for exponentiation and parentheses; - Some properties are arrays of atomic properties
{x[0] + y[20]}
; - Finally, all the properties are given in the internal units. One can
specify another unit:
x[0] / nm
.
Here is a list of all accepted properties:
- Atomic properties:
x
,y
andz
for cartesian coordinates,vx
,vy
andvz
for cartesian components of the velocity ,mass
for the atomic mass,charge
for the atomic charge. - Physical properties:
pressure
,volume
,temperature
,natoms
, stress tensor components:stress.xx
,stress.yy
,stress.zz
,stress.xy
,stress.xz
,stress.yz
, simulationstep
. - Unit Cell properties:
cell.a
,cell.b
,cell.c
are the unit cell vector lengths;cell.alpha
,cell.beta
andcell.gamma
are the unit cell angles.
Implementations
impl CustomOutput
pub fn new<P>(
filename: P,
template: &str
) -> Result<CustomOutput, CustomOutputError> where
P: AsRef<Path>,
filename: P,
template: &str
) -> Result<CustomOutput, CustomOutputError> where
P: AsRef<Path>,
Create a new CustomOutput
writing to the file at filename
using
the given template
. The template
is only partially validated at
this stage.
Trait Implementations
impl FromToml for CustomOutput
impl Output for CustomOutput
Auto Trait Implementations
impl RefUnwindSafe for CustomOutput
impl Send for CustomOutput
impl Sync for CustomOutput
impl Unpin for CustomOutput
impl UnwindSafe for CustomOutput
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, 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>,