pub fn open<P: AsRef<Path>>(self, path: P) -> Result<Trajectory, chemfiles::Error> {
        redirect_chemfiles_warnings();
        let mode = match self.mode {
            OpenMode::Read => 'r',
            OpenMode::Write => 'w',
            OpenMode::Append => 'a',
        };
        let trajectory = chemfiles::Trajectory::open_with_format(path, mode, self.format)?;
        return Ok(Trajectory(trajectory));
    }
/// Open the trajectory at the given `path`.
///
/// # Examples
///
/// ```no_run
/// # use lumol_core::sys::TrajectoryBuilder;
/// let trajectory = TrajectoryBuilder::new()
///     .open("file.nc")
///     .unwrap();
/// ```
Open the trajectory at the given `path`.
Open the trajectory at the given ` path ` .
pub fn open<P: AsRef<Path>>(self, path: P) -> Result<Trajectory, chemfiles::Error> {
        redirect_chemfiles_warnings();
        let mode = match self.mode {
            OpenMode::Read => 'r',
            OpenMode::Write => 'w',
            OpenMode::Append => 'a',
        };
        let trajectory = chemfiles::Trajectory::open_with_format(path, mode, self.format)?;
        return Ok(Trajectory(trajectory));
    }
pub fn open < P : AsRef < Path > > ( self , path : P ) -> Result < Trajectory , chemfiles :: Error > { redirect_chemfiles_warnings ( ) ; let mode = match self . mode { OpenMode :: Read => 'r' , OpenMode :: Write => 'w' , OpenMode :: Append => 'a' , } ; let trajectory = chemfiles :: Trajectory :: open_with_format ( path , mode , self . format ) ? ; return Ok ( Trajectory ( trajectory ) ) ; }
Open the trajectory at the given `path`.
Open the trajectory at the given ` path ` .
self
path
P
examples
None
use lumol_core::sys::trajectorybuilder;
let trajectory = TrajectoryBuilder::new()
.open("file.nc")
.unwrap();
```
let trajectory = TrajectoryBuilder :: new () . open ( " file . nc " ) . unwrap () ; ` ` `