[−][src]Module lumol::input
This module provide a way to build a Lumol simulation using input files.
Instead of building the System
and Simulation
objects by hand before
being able to use them, this module provides a way to describe the
simulation and the system in a TOML input file, using a simpler syntax.
The main entry point is the Input
struct, which allow to read a whole
simulation configuration. The easiest way to run a simulation using Lumol
is then:
use lumol::input::Input; fn main() { let input = Input::new("simulation.toml").unwrap(); let mut config = input.read().unwrap(); config.simulation.run(&mut config.system, config.nsteps); }
This crate also provide an InteractionsInput
for reading interactions
from a TOML file. It can be used to set the interactions in a system:
use lumol::System; use lumol::input::InteractionsInput; fn main() { let mut system = System::new(); // ... Build the system by hand // Read the interactions let input = InteractionsInput::new("potentials.toml").unwrap(); input.read(&mut system).unwrap(); }
Structs
Config | A configuration about how to run a single simulation. This contains the system to simulate, the simulation itself and the number of steps to run the simulation. |
Input | An input file for Lumol. |
InteractionsInput | Input file for reading interactions |
Enums
Error | Possible causes of error when reading input files |
Traits
FromToml | Convert a TOML table to a Rust type. |
FromTomlWithData | Convert a TOML table and some additional owned data to a Rust type. |
FromTomlWithRefData | Convert a TOML table to a Rust type using information from an additional reference. |
Functions
setup_default_logger | Setup a default logger to be able to print error messages |