This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[input] | |
version = 1.0 | |
[[systems]] | |
cell = 20 # Cubic cell | |
positions = "initial.xyz" | |
velocities = {init = "300 K"} | |
potentials = "potentials.toml" | |
[[simulations]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::slice; | |
pub struct Vector3d([f64; 3]); | |
pub struct Atom { | |
pub position: Vector3d, | |
pub velocity: Vector3d, | |
pub name: String | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait Potential { | |
fn energy(&self) -> f64; | |
} | |
// This is just a marker trait, to know which potentials can be used as pair | |
// potentials. I also have AnglePotential, GlobalPotential, ... | |
trait PairPotential: Potential {} | |
impl Clone for Box<PairPotential> { | |
fn clone(&self) -> Box<PairPotential> { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pairs: # Non bonded atoms pairs | |
- atoms: [*, *] # Default value | |
type: NullPotential | |
- atoms: [He, He] | |
type: LennardJones | |
sigma: 3.4 A | |
epsilon: 0.45 kJ/mol | |
- atoms: [He, Ar] | |
type: LennardJones | |
sigma: 2.8 A |
NewerOlder