Macro grafen::resbase
[−]
[src]
macro_rules! resbase { ( $rescode:expr, $(($atname:expr, $x:expr, $y:expr, $z:expr)),+ ) => { ... }; }
Construct a ResidueBase with a code and atoms.
At least one atom has to be present in the base. This is not a limitation when explicitly constructing a residue, but it makes no sense to allow it when invoking a constructor like this.
Examples:
use grafen::system::{Atom, Coord, ResidueBase}; let expect = ResidueBase { code: "RES", atoms: vec![ Atom { code: "A", position: Coord::new(0.0, 0.0, 0.0) }, Atom { code: "B", position: Coord::new(1.0, 2.0, 3.0) } ], }; let residue = resbase![ "RES", ("A", 0.0, 0.0, 0.0), ("B", 1.0, 2.0, 3.0) ]; assert_eq!(expect, residue);