Skip to main content
← OpenMECP Documentation

get_default_output_path

Function get_default_output_path 

Source
pub fn get_default_output_path<P: AsRef<Path>>(geometry_file: P) -> PathBuf
Expand description

Get default output filename based on input geometry file

This function generates a default .inp filename from the source geometry file. To prevent overwriting QM output files when creating templates from them, it adds a _omecp suffix when the source file has an extension that matches common QM output formats (.log, .out, .json).

§Examples

  • abc.xyzabc.inp (no conflict)
  • abc.logabc_omecp.inp (prevents overwriting abc.log when run)
  • calc.outcalc_omecp.inp (prevents overwriting calc.out when run)
  • result.jsonresult_omecp.inp (prevents overwriting result.json when run)