pub struct MolecularSimulator { /* private fields */ }Expand description
Molecular simulator for molecular dynamics simulations
Implementations§
Source§impl MolecularSimulator
impl MolecularSimulator
Sourcepub fn attach_dependencies(
&mut self,
linear_algebra: Option<Arc<Mutex<LinearAlgebraLibrary>>>,
statistical_computing: Option<Arc<Mutex<StatisticalComputingLibrary>>>,
)
pub fn attach_dependencies( &mut self, linear_algebra: Option<Arc<Mutex<LinearAlgebraLibrary>>>, statistical_computing: Option<Arc<Mutex<StatisticalComputingLibrary>>>, )
Attach optional LinearAlgebraLibrary / StatisticalComputingLibrary
shared handles used by the MD integrator.
Sourcepub fn store_molecule(&mut self, molecule: Molecule)
pub fn store_molecule(&mut self, molecule: Molecule)
Insert molecule into the simulator store keyed by molecule_id.
Sourcepub fn initialize(&mut self) -> Result<(), ChemistryError>
pub fn initialize(&mut self) -> Result<(), ChemistryError>
Initialise the MolecularSimulator sub-components; propagates ChemistryError.
Sourcepub fn validate_config(
&self,
config: &SimulationConfig,
) -> Result<(), ChemistryError>
pub fn validate_config( &self, config: &SimulationConfig, ) -> Result<(), ChemistryError>
Validate config — positive time_step/total_time, non-negative
temperature; ValidationError otherwise.
Sourcepub fn run_simulation(
&mut self,
config: &SimulationConfig,
molecule: &Molecule,
) -> Result<SimulationTrajectory, ChemistryError>
pub fn run_simulation( &mut self, config: &SimulationConfig, molecule: &Molecule, ) -> Result<SimulationTrajectory, ChemistryError>
Run a real Lennard-Jones + velocity-Verlet MD via
molecular_dynamics::run_md; fails closed on unparameterized
input rather than fabricating a trajectory.
Sourcepub fn list_force_fields(&self) -> Vec<String>
pub fn list_force_fields(&self) -> Vec<String>
Force-field names understood by the force-field calculator (AMBER/CHARMM/OPLS).
Sourcepub fn get_molecule(&self, molecule_id: &str) -> Option<Molecule>
pub fn get_molecule(&self, molecule_id: &str) -> Option<Molecule>
Clone of the stored molecule molecule_id, or None.
Sourcepub fn boundary_conditions(&self) -> &BoundaryConditions
pub fn boundary_conditions(&self) -> &BoundaryConditions
Borrow the boundary-conditions configuration.
Sourcepub fn boundary_conditions_mut(&mut self) -> &mut BoundaryConditions
pub fn boundary_conditions_mut(&mut self) -> &mut BoundaryConditions
Mutably borrow the boundary-conditions configuration.
Sourcepub fn simulation_engine(&self) -> &SimulationEngine
pub fn simulation_engine(&self) -> &SimulationEngine
Borrow the simulation engine.
Sourcepub fn simulation_engine_mut(&mut self) -> &mut SimulationEngine
pub fn simulation_engine_mut(&mut self) -> &mut SimulationEngine
Mutably borrow the simulation engine.
Sourcepub fn force_field_calculator(&self) -> &ForceFieldCalculator
pub fn force_field_calculator(&self) -> &ForceFieldCalculator
Borrow the force-field calculator.
Sourcepub fn force_field_calculator_mut(&mut self) -> &mut ForceFieldCalculator
pub fn force_field_calculator_mut(&mut self) -> &mut ForceFieldCalculator
Mutably borrow the force-field calculator.
Sourcepub fn integrator(&self) -> &MolecularIntegrator
pub fn integrator(&self) -> &MolecularIntegrator
Borrow the molecular integrator.
Sourcepub fn integrator_mut(&mut self) -> &mut MolecularIntegrator
pub fn integrator_mut(&mut self) -> &mut MolecularIntegrator
Mutably borrow the molecular integrator.
Auto Trait Implementations§
impl Freeze for MolecularSimulator
impl RefUnwindSafe for MolecularSimulator
impl Send for MolecularSimulator
impl Sync for MolecularSimulator
impl Unpin for MolecularSimulator
impl UnsafeUnpin for MolecularSimulator
impl UnwindSafe for MolecularSimulator
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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 more