pub struct Script {
pub tolerance: f64,
pub seed: Option<u64>,
pub filetype: Option<String>,
pub output: PathBuf,
pub nloop: usize,
pub avoid_overlap: bool,
pub pbc: Option<PbcSpec>,
pub structures: Vec<Structure>,
}Expand description
A fully parsed packing script.
Fields§
§tolerance: f64Minimum atom-atom distance tolerance (tolerance). Default 2.0 Å.
seed: Option<u64>Random seed (seed keyword).
filetype: Option<String>Global format hint (filetype keyword). When set, it overrides
per-file extension inference; otherwise each input file’s format
is inferred from its extension.
output: PathBufOutput file path (output keyword). Required.
nloop: usizeMaximum outer-loop iterations (nloop keyword). When unset, Packmol’s
default of 200 * ntype is used (getinp.f90:537-539).
avoid_overlap: boolWhether to reject initial random placements that overlap a fixed
molecule (avoid_overlap, default on). Wired through Script::build
to Molpack::with_avoid_overlap.
pbc: Option<PbcSpec>Periodic-boundary box (pbc keyword). When set, it seeds the
packer’s cell grid so the initial ±sidemax random placement
never drives ncells to anything astronomical.
structures: Vec<Structure>Implementations§
Source§impl Script
impl Script
Sourcepub fn lower(&self, base_dir: &Path) -> Result<ScriptPlan, ScriptError>
pub fn lower(&self, base_dir: &Path) -> Result<ScriptPlan, ScriptError>
Resolve paths and clone restraints into a ScriptPlan without
touching the filesystem.
Use this from front-ends that supply their own frame loader. The
native counterpart that does read files is [Script::build]
(gated behind the io feature).