documentation

This commit is contained in:
daniel
2020-11-16 13:26:03 +01:00
parent 40714061f6
commit 58617dcf4d
3 changed files with 8 additions and 7 deletions

View File

@@ -1,3 +1,4 @@
//! # Low level bindings to the c library from GROMACS
#![allow(non_upper_case_globals, non_camel_case_types)]
pub mod xdr_seek;

View File

@@ -32,11 +32,10 @@ impl IntoIterator for TRRTrajectory {
}
}
/*
Iterator for trajectories. This iterator yields a Result<Frame, Error>
for each frame in the trajectory file and stops with yielding None once the
trajectory is finished. Also yields None after the first occurence of an error
*/
/// Iterator for trajectories.
/// This iterator yields a Result<Frame, Error> for each frame in the
/// trajectory file and stops with yielding None once the trajectory is
/// EOF. Also yields None after the first occurrence of an error
pub struct TrajectoryIterator<T> {
trajectory: T,
item: Rc<Frame>,

View File

@@ -84,6 +84,7 @@ use std::io::SeekFrom;
use std::os::raw::{c_float, c_int};
use std::path::{Path, PathBuf};
/// File Mode for accessing trajectories.
#[derive(Debug, Clone, PartialEq)]
pub enum FileMode {
Write,
@@ -233,7 +234,7 @@ pub trait Trajectory {
fn get_num_atoms(&mut self) -> Result<usize>;
}
/// Read/Write XTC Trajectories
/// Handle to Read/Write XTC Trajectories
pub struct XTCTrajectory {
handle: XDRFile,
precision: Cell<c_float>, // internal mutability required for read method
@@ -361,7 +362,7 @@ impl io::Seek for XTCTrajectory {
}
}
/// Read/Write TRR Trajectories
/// Handle to Read/Write TRR Trajectories
pub struct TRRTrajectory {
handle: XDRFile,
num_atoms: Lazy<Result<usize>>,