pub fn read_system(&self) -> Result<System, Error> {
        let config = self.system_table()?;

        let file = extract::str("file", config, "system")?;
        let file = get_input_path(&self.path, file);
        let mut trajectory = TrajectoryBuilder::new().open(file)?;

        let with_cell = self.read_cell()?.map_or(false, |cell| {
            trajectory.set_cell(&cell);
            true
        });

        if config.get("topology").is_some() {
            let topology = extract::str("topology", config, "system")?;
            trajectory.set_topology_file(topology)?;
        }

        let guess_bonds = if let Some(guess_bonds) = config.get("guess_bonds") {
            guess_bonds.as_bool().ok_or(
                Error::from("'guess_bonds' should be a boolean value in system")
            )?
        } else {
            false
        };

        let mut system = if guess_bonds {
            trajectory.read_guess_bonds()?
        } else {
            trajectory.read()?
        };

        self.read_potentials(&mut system)?;
        self.init_velocities(&mut system)?;

        if !with_cell && system.cell.is_infinite() {
            warn!(
                "No unit cell in the system, using an infinite unit cell.\n\
                 You can get rid of this warning by using `cell = []` in the \
                 input file if this is what you want."
            );
        }

        Ok(system)
    }
/// Get the the simulated system.
Get the the simulated system.
Get the the simulated system .
pub fn read_system(&self) -> Result<System, Error> {
        let config = self.system_table()?;
        let file = extract::str("file", config, "system")?;
        let file = get_input_path(&self.path, file);
        let mut trajectory = TrajectoryBuilder::new().open(file)?;
        let with_cell = self.read_cell()?.map_or(false, |cell| {
            trajectory.set_cell(&cell);
            true
        });
        if config.get("topology").is_some() {
            let topology = extract::str("topology", config, "system")?;
            trajectory.set_topology_file(topology)?;
        }
        let guess_bonds = if let Some(guess_bonds) = config.get("guess_bonds") {
            guess_bonds.as_bool().ok_or(
                Error::from("'guess_bonds' should be a boolean value in system")
            )?
        } else {
            false
        };
        let mut system = if guess_bonds {
            trajectory.read_guess_bonds()?
        } else {
            trajectory.read()?
        };
        self.read_potentials(&mut system)?;
        self.init_velocities(&mut system)?;
        if !with_cell && system.cell.is_infinite() {
            warn!(
                "No unit cell in the system, using an infinite unit cell.\n\
                 You can get rid of this warning by using `cell = []` in the \
                 input file if this is what you want."
            );
        }
        Ok(system)
    }
pub fn read_system ( & self ) -> Result < System , Error > { let config = self . system_table ( ) ? ; let file = extract :: str ( " " , config , " " ) ? ; let file = get_input_path ( & self . path , file ) ; let mut trajectory = TrajectoryBuilder :: new ( ) . open ( file ) ? ; let with_cell = self . read_cell ( ) ? . map_or ( false , | cell | { trajectory . set_cell ( & cell ) ; true } ) ; if config . get ( " " ) . is_some ( ) { let topology = extract :: str ( " " , config , " " ) ? ; trajectory . set_topology_file ( topology ) ? ; } let guess_bonds = if let Some ( guess_bonds ) = config . get ( " " ) { guess_bonds . as_bool ( ) . ok_or ( Error :: from ( " " ) ) ? } else { false } ; let mut system = if guess_bonds { trajectory . read_guess_bonds ( ) ? } else { trajectory . read ( ) ? } ; self . read_potentials ( & mut system ) ? ; self . init_velocities ( & mut system ) ? ; if ! with_cell && system . cell . is_infinite ( ) { warn ! ( " \n \
 \
 " ) ; } Ok ( system ) }
Get the the simulated system.
Get the the simulated system .
&self