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
let expect = ResidueBase { code: "RES".to_string(), atoms: vec![ Atom { code: "A".to_string(), position: Coord::new(0.0, 0.0, 0.0) }, Atom { code: "B".to_string(), 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);