mirror of
https://github.com/dnlbauer/xdrfile.git
synced 2026-09-10 22:25:30 +00:00
array-like frame indexing
This commit is contained in:
@@ -29,7 +29,7 @@ fn main() -> Result<()> {
|
||||
assert_eq!(frame.step, 1);
|
||||
assert_eq!(frame.len(), num_atoms);
|
||||
|
||||
let first_atom_coords = frame.coords[0];
|
||||
let first_atom_coords = frame[0]; // shorthand for frame.coords[0]
|
||||
assert_eq!(first_atom_coords, [-0.8901, 0.4127, -0.055499997]);
|
||||
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user