mirror of
https://github.com/dnlbauer/xdrfile.git
synced 2026-09-10 14:15:31 +00:00
documentation
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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>,
|
||||
|
||||
@@ -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>>,
|
||||
|
||||
Reference in New Issue
Block a user