pub struct FileNaming {
basename: String,
}Expand description
Manages dynamic file naming based on input file basename
All file names are prefixed with the basename extracted from the input file, ensuring unique file names when multiple jobs run in the same directory.
Fields§
§basename: StringImplementations§
Source§impl FileNaming
impl FileNaming
Sourcepub fn new(input_path: &Path) -> Self
pub fn new(input_path: &Path) -> Self
Creates a new FileNaming instance from an input file path
Extracts the file stem (filename without extension) to use as the basename for all generated file names.
§Arguments
input_path- Path to the input file
§Example
use std::path::Path;
use omecp::naming::FileNaming;
let naming = FileNaming::new(Path::new("compound_xyz_123.input"));
assert_eq!(naming.basename(), "compound_xyz_123");Sourcepub fn state_a_chk(&self) -> String
pub fn state_a_chk(&self) -> String
Returns the state A checkpoint file name
Format: {basename}_state_A.chk
Sourcepub fn state_b_chk(&self) -> String
pub fn state_b_chk(&self) -> String
Returns the state B checkpoint file name
Format: {basename}_state_B.chk
Sourcepub fn state_a_chk_path(&self, job_dir: &str) -> String
pub fn state_a_chk_path(&self, job_dir: &str) -> String
Returns the state A checkpoint file path in a job directory
Format: {job_dir}/{basename}_state_A.chk
Sourcepub fn state_b_chk_path(&self, job_dir: &str) -> String
pub fn state_b_chk_path(&self, job_dir: &str) -> String
Returns the state B checkpoint file path in a job directory
Format: {job_dir}/{basename}_state_B.chk
Sourcepub fn a_chk_path(&self, job_dir: &str) -> String
pub fn a_chk_path(&self, job_dir: &str) -> String
Returns the ‘a’ checkpoint file path in a job directory
Format: {job_dir}/{basename}_a.chk
Sourcepub fn b_chk_path(&self, job_dir: &str) -> String
pub fn b_chk_path(&self, job_dir: &str) -> String
Returns the ‘b’ checkpoint file path in a job directory
Format: {job_dir}/{basename}_b.chk
Sourcepub fn state_a_gbw(&self, job_dir: &str) -> String
pub fn state_a_gbw(&self, job_dir: &str) -> String
Returns the state A wavefunction file path
Format: {job_dir}/{basename}_state_A.gbw
Sourcepub fn state_b_gbw(&self, job_dir: &str) -> String
pub fn state_b_gbw(&self, job_dir: &str) -> String
Returns the state B wavefunction file path
Format: {job_dir}/{basename}_state_B.gbw
Sourcepub fn a_gbw(&self, job_dir: &str) -> String
pub fn a_gbw(&self, job_dir: &str) -> String
Returns the ‘a’ wavefunction file path
Format: {job_dir}/{basename}_a.gbw
Sourcepub fn b_gbw(&self, job_dir: &str) -> String
pub fn b_gbw(&self, job_dir: &str) -> String
Returns the ‘b’ wavefunction file path
Format: {job_dir}/{basename}_b.gbw
Sourcepub fn pre_a(&self, job_dir: &str, ext: &str) -> String
pub fn pre_a(&self, job_dir: &str, ext: &str) -> String
Returns the pre-point A input file path
Format: {job_dir}/{basename}_pre_A.{ext}
Sourcepub fn pre_b(&self, job_dir: &str, ext: &str) -> String
pub fn pre_b(&self, job_dir: &str, ext: &str) -> String
Returns the pre-point B input file path
Format: {job_dir}/{basename}_pre_B.{ext}
Sourcepub fn pre_a_chk(&self, job_dir: &str) -> String
pub fn pre_a_chk(&self, job_dir: &str) -> String
Returns the pre-point A checkpoint file path
Format: {job_dir}/{basename}_pre_A.chk
Sourcepub fn pre_b_chk(&self, job_dir: &str) -> String
pub fn pre_b_chk(&self, job_dir: &str) -> String
Returns the pre-point B checkpoint file path
Format: {job_dir}/{basename}_pre_B.chk
Sourcepub fn pre_a_gbw(&self, job_dir: &str) -> String
pub fn pre_a_gbw(&self, job_dir: &str) -> String
Returns the pre-point A wavefunction file path
Format: {job_dir}/{basename}_pre_A.gbw
Sourcepub fn pre_b_gbw(&self, job_dir: &str) -> String
pub fn pre_b_gbw(&self, job_dir: &str) -> String
Returns the pre-point B wavefunction file path
Format: {job_dir}/{basename}_pre_B.gbw
Sourcepub fn step_state_a(&self, job_dir: &str, step: usize, ext: &str) -> String
pub fn step_state_a(&self, job_dir: &str, step: usize, ext: &str) -> String
Returns the state A input file path for a given step
Format: {job_dir}/{basename}_{step}_state_A.{ext}
Sourcepub fn step_state_b(&self, job_dir: &str, step: usize, ext: &str) -> String
pub fn step_state_b(&self, job_dir: &str, step: usize, ext: &str) -> String
Returns the state B input file path for a given step
Format: {job_dir}/{basename}_{step}_state_B.{ext}
Sourcepub fn step_state_a_gbw(&self, job_dir: &str, step: usize) -> String
pub fn step_state_a_gbw(&self, job_dir: &str, step: usize) -> String
Returns the state A wavefunction file path for a given step
Format: {job_dir}/{basename}_{step}_state_A.gbw
Sourcepub fn step_state_b_gbw(&self, job_dir: &str, step: usize) -> String
pub fn step_state_b_gbw(&self, job_dir: &str, step: usize) -> String
Returns the state B wavefunction file path for a given step
Format: {job_dir}/{basename}_{step}_state_B.gbw
Sourcepub fn step_state_a_engrad(&self, job_dir: &str, step: usize) -> String
pub fn step_state_a_engrad(&self, job_dir: &str, step: usize) -> String
Returns the state A engrad file path for a given step
Format: {job_dir}/{basename}_{step}_state_A.engrad
Sourcepub fn step_state_b_engrad(&self, job_dir: &str, step: usize) -> String
pub fn step_state_b_engrad(&self, job_dir: &str, step: usize) -> String
Returns the state B engrad file path for a given step
Format: {job_dir}/{basename}_{step}_state_B.engrad
Sourcepub fn step_a(&self, job_dir: &str, step: usize, ext: &str) -> String
pub fn step_a(&self, job_dir: &str, step: usize, ext: &str) -> String
Returns the ‘A’ input file path for a given step (PES analysis)
Format: {job_dir}/{basename}_{step}_A.{ext}
Sourcepub fn step_b(&self, job_dir: &str, step: usize, ext: &str) -> String
pub fn step_b(&self, job_dir: &str, step: usize, ext: &str) -> String
Returns the ‘B’ input file path for a given step (PES analysis)
Format: {job_dir}/{basename}_{step}_B.{ext}
Sourcepub fn drive_file(
&self,
job_dir: &str,
step: usize,
state: &str,
ext: &str,
) -> String
pub fn drive_file( &self, job_dir: &str, step: usize, state: &str, ext: &str, ) -> String
Returns a drive calculation file path
Format: {job_dir}/{basename}_drive_{step}_{state}.{ext}
Sourcepub fn neb_file(
&self,
job_dir: &str,
step: usize,
state: &str,
ext: &str,
) -> String
pub fn neb_file( &self, job_dir: &str, step: usize, state: &str, ext: &str, ) -> String
Returns a NEB calculation file path
Format: {job_dir}/{basename}_neb_{step}_{state}.{ext}
Sourcepub fn orca_basename(&self, job_dir: &str) -> String
pub fn orca_basename(&self, job_dir: &str) -> String
Returns the basename for ORCA gbw file references in input headers
This is used in ORCA input files where the gbw path needs to be specified.
Format: {job_dir}/{basename}
Sourcepub fn final_mecp_xyz(&self) -> String
pub fn final_mecp_xyz(&self) -> String
Returns the final MECP geometry output file name
Format: {basename}_mecp.xyz
§Example
use std::path::Path;
use omecp::naming::FileNaming;
let naming = FileNaming::new(Path::new("compound_xyz_123.input"));
assert_eq!(naming.final_mecp_xyz(), "compound_xyz_123_mecp.xyz");Trait Implementations§
Source§impl Clone for FileNaming
impl Clone for FileNaming
Source§fn clone(&self) -> FileNaming
fn clone(&self) -> FileNaming
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for FileNaming
impl RefUnwindSafe for FileNaming
impl Send for FileNaming
impl Sync for FileNaming
impl Unpin for FileNaming
impl UnsafeUnpin for FileNaming
impl UnwindSafe for FileNaming
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.