mirror of
https://github.com/dnlbauer/xdrfile.git
synced 2026-09-10 22:25:30 +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)]
|
#![allow(non_upper_case_globals, non_camel_case_types)]
|
||||||
|
|
||||||
pub mod xdr_seek;
|
pub mod xdr_seek;
|
||||||
|
|||||||
@@ -32,11 +32,10 @@ impl IntoIterator for TRRTrajectory {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/// Iterator for trajectories.
|
||||||
Iterator for trajectories. This iterator yields a Result<Frame, Error>
|
/// This iterator yields a Result<Frame, Error> for each frame in the
|
||||||
for each frame in the trajectory file and stops with yielding None once the
|
/// trajectory file and stops with yielding None once the trajectory is
|
||||||
trajectory is finished. Also yields None after the first occurence of an error
|
/// EOF. Also yields None after the first occurrence of an error
|
||||||
*/
|
|
||||||
pub struct TrajectoryIterator<T> {
|
pub struct TrajectoryIterator<T> {
|
||||||
trajectory: T,
|
trajectory: T,
|
||||||
item: Rc<Frame>,
|
item: Rc<Frame>,
|
||||||
|
|||||||
@@ -84,6 +84,7 @@ use std::io::SeekFrom;
|
|||||||
use std::os::raw::{c_float, c_int};
|
use std::os::raw::{c_float, c_int};
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
|
|
||||||
|
/// File Mode for accessing trajectories.
|
||||||
#[derive(Debug, Clone, PartialEq)]
|
#[derive(Debug, Clone, PartialEq)]
|
||||||
pub enum FileMode {
|
pub enum FileMode {
|
||||||
Write,
|
Write,
|
||||||
@@ -233,7 +234,7 @@ pub trait Trajectory {
|
|||||||
fn get_num_atoms(&mut self) -> Result<usize>;
|
fn get_num_atoms(&mut self) -> Result<usize>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Read/Write XTC Trajectories
|
/// Handle to Read/Write XTC Trajectories
|
||||||
pub struct XTCTrajectory {
|
pub struct XTCTrajectory {
|
||||||
handle: XDRFile,
|
handle: XDRFile,
|
||||||
precision: Cell<c_float>, // internal mutability required for read method
|
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 {
|
pub struct TRRTrajectory {
|
||||||
handle: XDRFile,
|
handle: XDRFile,
|
||||||
num_atoms: Lazy<Result<usize>>,
|
num_atoms: Lazy<Result<usize>>,
|
||||||
|
|||||||
Reference in New Issue
Block a user