Module grafen::substrate
[−]
[src]
Define and construct substrates.
Examples
Construct a triclinic lattice of hydrogen molecules.
// Define the molecule as a Residue. let residue_base = ResidueBase { code: "HMOL".to_string(), atoms: vec![ Atom { code: "H1".to_string(), position: Coord::new(0.0, 0.0, 0.5), }, Atom { code: "H2".to_string(), position: Coord::new(0.0, 0.0, -0.5), } ], }; // Define the substrate let conf = SubstrateConf { lattice: LatticeType::Triclinic { a: 1.0, b: 0.5, gamma: 60.0 }, residue: residue_base, size: (5.0, 10.0), std_z: None, }; // ... and create it! let substrate = create_substrate(&conf).unwrap();
Structs
SubstrateConf |
Configuration for constructing a substrate. |
Enums
LatticeType |
Lattice types which a substrate can be constructed from. |
Functions
create_substrate |
Create a substrate of input configuration and return as a |