opan.output¶
Module implementing parsing of output data from external computations.
Warning
This module will be refactored at some point, to introduce a
superclass in the same vein as SuperOpanGrad and
SuperOpanHess. This is necessary because
automated execution of external
computation softwares will require some unified mechanism for
indicating whether a particular computation completed successfully,
independent of the
identify of the software package that was executed.
Warning
Further refactoring is also planned for OrcaOutput generally.
Beware relying heavily on the behavior of this class & module.
Superclass
To be implemented
Implemented Subclasses
Note
Not yet actually a subclass of anything
OrcaOutput – Imports output files from ORCA
Subclasses
-
class
opan.output.OrcaOutput(file_path)¶ Container for parsed textual output generated by ORCA.
All implemented results that are found in the indicated output are stored in the
OrcaOutputinstance. If a given quantity was not detectable, it is stored asNonein the corresponding instance variable.Note
In particular, thermochemistry from single atom/ion computations should work, with
Noneor zero/negligible values returned for rotational and vibrational quantities.The verbose contents of the output file are not generally retained within the
OrcaOutputinstance due to the potential for such to involve a tremendously large string. Exceptions include, if present:- THERMOCHEMISTRY section
Contents
Methods
-
__init__(file_path)¶ Initialize
OrcaOutputobject.Imports the data found in the output file found at file_path.
Warning
THIS CLASS PRESENTLY ONLY WORKS ON A VERY SMALL SUBSET OF COMPUTATION TYPES, currently HF, LDA-DFT, GGA-DFT, and mGGA-DFT. MAY work on some double-hybrid or range-separated DFT.
Available data includes:
- SCF energies (incl D3BJ, gCP, COSMO outlying charge corrections)
- Thermochemistry
- Spin expectation values (actual, ideal, and deviation)
Success indicators include:
completed
Checks for the ‘ORCA TERMINATED NORMALLY’ report at the end of the file
converged
Checks for any occurrence of successful SCF convergence in the file (questionable for anything but single-point calculations)
optimized
Checks for any occurrence of “OPTIMIZATION HAS CONVERGED” in the file (questionable for anything but a standalone OPT – i.e., not useful for a mode or internal coordinate scan)
Parameters: file_path – str– Full path to the output file to be parsed.Raises: OutputError– (various typecodes) If indicated output is un-parseably malformed in some fashion
-
en_last()¶ Report the energies from the last SCF present in the output.
Returns a
dictproviding the various energy values from the last SCF cycle performed in the output. Keys are those ofp_en. Any energy value not relevant to the parsed output is assigned asNone.Returns: last_ens – dictofnp.float_– Energies from the last SCF present in the output.
Class Variables
Enumerations
-
class
EN¶ OpanEnumfor the energies reported at the end of SCF cycles.-
D3¶ Grimme’s D3BJ dispersion correction [Gri10]. May or may not play nicely with D3ZERO. Likely non-functional with DFT-NL dispersion.
-
OCC¶ COSMO outlying charge correction
Todo
Need COSMO reference
-
SCFFINAL¶ SCF energy including gCP and D3 corrections
-
SCFOCC¶ SCF energy with only the COSMO outlying charge correction (no dispersion or gCP corrections)
-
-
class
SPINCONT¶ OpanEnumfor the spin contamination values reported after each unrestricted SCF cycle.-
ACTUAL¶ Calculated \(\left<S^2\right>\) expectation value
-
DEV¶ Deviation of \(\left<S^2\right>\) (calculated minus ideal)
-
IDEAL¶ Ideal \(\left<S^2\right>\) expectation value
-
-
class
THERMO¶ OpanEnumfor the quantities reported in the THERMOCHEMISTRY block.-
E_EL¶ Electronic energy from the thermochemistry block, often slightly different than the last
EN.SCFFINALvalue \(\left(\mathrm{E_h}\right)\)
-
E_ROT¶ Thermal rotational internal energy correction \(\left(\mathrm{E_h}\right)\)
-
E_TRANS¶ Thermal translational internal energy correction \(\left(\mathrm{E_h}\right)\)
-
E_VIB¶ Thermal vibrational internal energy correction \(\left(\mathrm{E_h}\right)\)
-
E_ZPE¶ Zero-point energy correction \(\left(\mathrm{E_h}\right)\)
-
H_IG¶ Ideal-gas \(\left(k_\mathrm{B} T\right)\) enthalpy contribution \(\left(\mathrm{E_h}\right)\)
-
PRESS¶ Simulated pressure \(\left(\mathrm{atm}\right)\)
-
QROT¶ Rotational partition function (unitless)
-
TEMP¶ Simulated temperature \(\left(\mathrm K\right)\)
-
TS_EL¶ Electronic \(TS\) entropy contribution \(\left(\mathrm{E_h}\right)\)
-
TS_TRANS¶ Translational \(TS\) entropy contribution \(\left(\mathrm{E_h}\right)\)
-
TS_VIB¶ Vibrational \(TS\) entropy contribution \(\left(\mathrm{E_h}\right)\)
-
Regular Expression Patterns
-
p_en¶ dictofre.compile()for the energies reported at the end of SCF cycles. Keys are inEN.
-
p_spincont¶ dictofre.compile()for the spin contamination block values. Keys are inSPINCONT.
-
p_thermo¶ dictofre.compile()for the quantities extracted from the THERMOCHEMISTRY block. Keys are inTHERMO.
Instance Variables
-
converged¶ bool–Trueif SCF converged ANYWHERE in run.Todo
Update oo.converged with any robustifications
-
en¶ dictoflistofnp.float_– Lists of the various energy values from the parsed output. Dict keys are those ofEN, above. Any energy type not found in the output is assigned as an empty list.
-
optimized¶ bool–Trueif any OPT converged ANYWHERE in run. Fine for OPT, but ambiguous for scans.Todo
Update oo.optimized with any robustifications
-
spincont¶ dictoflistofnp.float_– Lists of the various values from the spin contamination calculations in the output, if present. Empty lists if absent. Dict keys are those ofSPINCONT, above.