gosh_model/lib.rs
1// [[file:../models.note::4e128786][4e128786]]
2use gosh_core::*;
3use gut::prelude::*;
4// 4e128786 ends here
5
6// [[file:../models.note::5d2df595][5d2df595]]
7mod model_properties;
8
9mod blackbox;
10mod edip;
11mod lj;
12// 5d2df595 ends here
13
14// [[file:../models.note::bf8cc73b][bf8cc73b]]
15use gchemol::prelude::*;
16use gchemol::Molecule;
17
18/// Trait for chemical calculations
19pub trait ChemicalModel: Send {
20 /// Define how to compute molecular properties, such as energy, forces, or
21 /// structure ...
22 fn compute(&mut self, mol: &Molecule) -> Result<Computed>;
23
24 /// Define how to compute the properties of a bunch of molecules, mainly for
25 /// reduce IO costs of small molecule calculations.
26 fn compute_bunch(&mut self, _mols: &[Molecule]) -> Result<Vec<Computed>> {
27 unimplemented!()
28 }
29}
30// bf8cc73b ends here
31
32// [[file:../models.note::616b7a47][616b7a47]]
33pub use crate::blackbox::BlackBoxModel;
34pub use crate::lj::LennardJones;
35pub use crate::model_properties::*;
36
37pub use crate::edip::Edip;
38
39pub type BlackBox = BlackBoxModel;
40pub type ModelProperties = Computed;
41// 616b7a47 ends here