orca_step package#

Submodules#

orca_step.batch module#

ORCA’s side of the Model Chemistry batch contract.

get_task writes the same ORCA input the MDI engine writes for a structure (the helpers are those of data/orca_mdi.py: method, AutoAux, basis – bse: included – EnGrad, the DLPNO block), and analyze_task reads it back with the engine’s parsers, so the batch path and the MDI path give the same numbers. options adds what fragments need: atom_indices, ghost_atoms, charge and multiplicity.

options["aux_basis"] (or the model chemistry’s) replaces AutoAux with explicit auxiliary basis sets, e.g. “def2/J,def2-TZVPP/C” for a double hybrid – commas, since MBE’s task options separate settings with spaces – or “explicit” for the sets that suit the method and basis, for structures where AutoAux makes the auxiliary basis linearly dependent.

A job with one center, or with any atom of Na, Mg, Zn, B or P (ghosts included), uses exact exchange (NoCOSX), as on every ORCA path (orca_step#44). options["exact_exchange_elements"], or the same key in the model chemistry’s options, changes the element set (“none” for one-center jobs only). options["precision"] = "tight", for finite differences of gradients, adds VeryTightSCF and exact exchange (NoCOSX) for every structure.

An SCF that fails with the basis set nearly linearly dependent is run once more with SThresh 1e-6 (see orca_base.sthresh_retry_command); the task keeps its fingerprint, and orca.sthresh-retry in its directory records the retry. options["sthresh_retry"] (or the model chemistry’s) sets that SThresh, or “no” turns the retry off; options["sthresh"] sets the SThresh of every run.

exception orca_step.batch.AnalysisError[source]#

Bases: RuntimeError

A task’s results lack a requested property.

orca_step.batch.analyze_task(result, model_chemistry, configuration, *, properties=('energy', 'gradients'), options=None, task=None)[source]#

The energy (kJ/mol) and gradients ((n, 3) kJ/mol/Å) of a finished task, converted exactly as the MDI path converts the engine’s atomic units.

Given the task that produced the result, its timing record is appended too (seamm_exec.record_task_timing), as the ORCA step’s own runs do.

orca_step.batch.get_task(configuration, model_chemistry, *, key, properties=('energy', 'gradients'), options=None, resources=None)[source]#

A seamm_exec.Task computing ORCA’s energy (and gradient) for one structure. See the module docstring.

orca_step.bsse module#

An ORCA counterpoise (BSSE) sub-step.

Computes the counterpoise-corrected (Boys–Bernardi) energy and gradient of an N-fragment complex, with independent per-fragment charge. SEAMM generates the 2N + 1 job specs (via seamm_bsse), runs each as an ordinary ORCA job (real atoms + ghost-flagged atoms of the other fragments, or ghost-free for a fragment alone in its own basis), and combines the results into the corrected total energy and gradient. See the campaign design note (docs/developer_guide/campaigns/2026-08-03/bsse_architecture.rst) for the physics, and seamm_bsse itself for the job-spec/combine algebra.

The original ORCA Compound script path (bssegradient.cmp/ bssenergy.cmp, D. G. Liakos & F. Neese – one ORCA process running all 5 sub-calculations of a 2-fragment, neutral-singlet complex internally) is kept in this module and in data/ as the N = 2 regression oracle for the new path (see the architecture doc’s milestone M2), not as a second production code path. _compound_input/run_orca_compound/ _parse_compound_energies below are unused by run() now.

class orca_step.bsse.BSSE(flowchart=None, title='BSSE', extension=None, logger=<Logger orca_step.bsse (WARNING)>)[source]#

Bases: Energy

A counterpoise (BSSE) correction with ORCA.

See also

TkBSSE, BSSEParameters, Energy

analyze(indent='', P=None, data=None, **kwargs)[source]#

Store and report the corrected energy, the uncorrected energy, the BSSE correction, the interaction (binding) energy relative to the separated monomers (corrected and uncorrected, in kJ/mol), the corrected gradient, and the formation-referenced DfE0 computed from the corrected energy.

Unlike Energy, this does NOT parse orca.out for the usual properties: with a Compound job orca.out holds the sub-calculations, whose per-fragment properties would be misleading. Only the corrected energy/gradient (from the EnGrad file), the raw complex energy, and the correction are meaningful.

description_text(P=None)[source]#

Describe what this sub-step will do.

run(keywords=None)[source]#

Run the N-fragment counterpoise correction: generate the 2N + 1 job specs (seamm_bsse), run each as an ordinary ORCA job in its own sub-directory (real atoms + the other fragments’ atoms ghosted, or a fragment alone in its own basis), and combine the results into the corrected total energy and gradient.

Like the other ORCA sub-steps, this is driven by the main ORCA node (which set up printing and cited the plug-in), so it does not call super().run().

orca_step.bsse_parameters module#

Control parameters for the ORCA BSSE (counterpoise) sub-step.

Extends the Energy parameters (level of theory, basis, grid, SCF controls) with the fragment definition and the monomer-relaxation switch that the counterpoise correction needs.

class orca_step.bsse_parameters.BSSEParameters(defaults={}, data=None)[source]#

Bases: EnergyParameters

The counterpoise (BSSE) parameters: the Energy parameters plus the fragment definition and the monomer-optimization switch.

extrapolation = False#

Whether basis-set extrapolation can be used. False for steps that need a gradient or Hessian, which an extrapolated energy does not have.

parameters = {'compute gradient': {'default': 'yes', 'default_units': '', 'description': 'Compute the gradient:', 'enumeration': ('yes', 'no'), 'format_string': '', 'help_text': "Whether to compute the counterpoise-corrected gradient (forces) as well as the energy. 'yes' (the default) is what MLFF training needs. 'no' (energy only) is cheaper and, importantly, allows methods that have no analytic gradient in ORCA -- notably CCSD(T) / DLPNO-CCSD(T) -- for gold-standard counterpoise interaction energies.", 'kind': 'enum'}, 'fragment atoms': {'applies_when': {'fragments': 'specified'}, 'default': '', 'default_units': '', 'description': 'Fragment atoms:', 'enumeration': (), 'format_string': '', 'help_text': "The atoms making up each fragment when 'Fragments' is 'specified': one semicolon-separated group per fragment, each a comma/space list and/or ranges of 1-based atom numbers, e.g. '1-3; 4-6' for two fragments or '1-3; 4-6; 7' for three. The last group may be 'rest' for the atoms in no other group, e.g. '1-3; rest'. Ignored when the fragments are found automatically.", 'kind': 'string'}, 'fragment charges': {'default': '', 'default_units': '', 'description': 'Fragment charges:', 'enumeration': (), 'format_string': '', 'help_text': "The formal charge of each fragment, in the same order as the fragments (the order 'auto' finds molecules, or the semicolon-separated groups in 'Fragment atoms') -- a comma/space separated list of integers, e.g. '1, -1' for a Na+/Cl- pair. Leave empty to use each fragment's net formal charge from the input structure, if the structure format carries one (e.g. an ion marked with an SDF/MOL 'M  CHG' record) -- otherwise all-neutral (the usual case for a neutral H-bonded complex). Every fragment is closed-shell (multiplicity 1); the complex's own charge and multiplicity are checked against these for consistency.", 'kind': 'string'}, 'fragments': {'default': 'auto (molecules)', 'default_units': '', 'description': 'Fragments:', 'enumeration': ('auto (molecules)', 'specified'), 'format_string': '', 'help_text': "How to split the complex into fragments for the counterpoise correction. 'auto (molecules)' uses every separate molecule found in the structure (an error if there are fewer than two -- e.g. a Na+/Cl- pair is two molecules). 'specified' takes the fragments from 'Fragment atoms' below.", 'kind': 'enum'}, 'optimize monomers': {'default': 'no', 'default_units': '', 'description': 'Optimize free monomers:', 'enumeration': ('no', 'yes'), 'format_string': '', 'help_text': "Whether to relax each free monomer before taking the correction (the ORCA script's 'DoOptimization'). 'no' (the default) is correct for a fixed-geometry potential-energy surface or MLFF training target; 'yes' gives the counterpoise correction relative to the relaxed monomers.", 'kind': 'enum'}}#
unused = ('sthresh', 'initial guess', 'save orbital checkpoint', 'checkpoint name', 'extra blocks', 'bond orders', 'Hirshfeld charges', 'polarizability')#

Parameters that this kind of step never uses.

orca_step.bsse_step module#

Stevedore helper for the ORCA BSSE (counterpoise) sub-step.

class orca_step.bsse_step.BSSEStep(flowchart=None, gui=None)[source]#

Bases: object

create_node(flowchart=None, **kwargs)[source]#
create_tk_node(canvas=None, **kwargs)[source]#
description()[source]#
my_description = {'description': 'Counterpoise (BSSE) corrected energy and gradient with ORCA', 'group': 'Calculation', 'name': 'BSSE'}#

orca_step.energy module#

An ORCA single-point energy sub-step.

class orca_step.energy.Energy(flowchart=None, title='Energy', extension=None, logger=<Logger orca_step.energy (WARNING)>)[source]#

Bases: ORCABase

A single-point energy with ORCA.

See also

TkEnergy, EnergyParameters, Optimization

analyze(indent='', P=None, data=None, **kwargs)[source]#

Parse the properties, store them, print a summary, write CSV files, and optionally apply bond orders / Hirshfeld charges to the structure.

calculate_energy_of_formation(P, data, configuration, *, temperature=None)[source]#

Compute formation-referenced energies via the shared seamm_thermochemistry reference database – the ORCA counterpart of gaussian_step.Substep.calculate_energy_of_formation, extended with temperature-dependent enthalpy/Gibbs energy of formation.

Always computes data["E atomization"] and data["DfE0"] (0 K, electronic-only) when an energy is available – these need no frequency calculation. When temperature is given (the Frequencies sub-step’s requested temperature) and data already carries “enthalpy”/”gibbs energy” (kJ/mol absolute totals, as written by the Frequencies sub-step’s thermochemistry parsing), this also computes data["DfHT"] and data["DfGT"] – the enthalpy and Gibbs energy of formation AT that temperature, via seamm_thermochemistry.formation_enthalpy/formation_gibbs_energy.

A missing formation energy must never break an ORCA job: if seamm_thermochemistry isn’t installed, its database isn’t built, or the reference data doesn’t cover this composition/method/basis yet, this returns a short explanatory message instead of raising. A missing DfHT/DfGT dependency (most commonly: no standard-state entropy yet for one of the elements) does not block DfE0 – it is just left out of data and noted in the returned report text.

Parameters:
  • P (dict) – The current parameter values (for the method/basis).

  • data (dict) – The parsed results of the calculation; mutated in place.

  • configuration (molsystem._Configuration) – The system whose composition defines the reference reaction.

  • temperature (float, optional) – Temperature, in K, for DfHT/DfGT. Omit for a plain Energy job (no thermochemistry available).

Returns:

The detailed, citable report (seamm_thermochemistry.format_report) – the DB version, the atomic reference energies/citations used, and each computed quantity – or a short explanatory message if nothing could be computed at all.

Return type:

str

cleanup()[source]#

Nothing to clean up for a single point.

description_text(P=None)[source]#

Describe what this sub-step will do.

static exact_exchange_keywords(keyword_line, symbols, elements=None)[source]#

‘NoCOSX’ when ORCA’s default RIJCOSX is not reliable for a job, else ‘’.

That is a one-center job (a lone atom or bare atomic ion), or one with any atom, ghosts included, of Na, Mg, Zn, B or P (orca_step#44). ORCA 6.1.1’s RIJCOSX mis-builds the d-type virtual orbitals of some lone atoms from scratch (the MP2 part of a double hybrid off by 4.7-13.9 kJ/mol for Na+, Mg2+ and Zn2+, with no warning), and gives spurious forces for Na in molecules (Na-Cl net force 10.8 meV/Å, against 0.06 with exact exchange) and for BF4- and PF6- (9-11 meV/Å). Exact exchange is affordable at these sizes. An exchange scheme the user already chose (e.g. ‘RIJCOSX’ in the extra keywords) is respected, which is how to override the guard. The rule is the MDI engine’s and the batch path’s (exact_exchange_method in data/orca_mdi.py).

extra_input(P)[source]#

Return (extra_blocks, extra_files) for the ORCA input: the BSE basis block (if used), the SCF guess/convergence block, an optional orbital-checkpoint restart, directives for the optional properties (Hirshfeld charges, polarizability), and any user-supplied literal blocks.

final_coordinates(configuration)[source]#

The Cartesian coordinates (Å) of the geometry the energy belongs to: the configuration’s, for a single point.

keyword_line(P)[source]#

Build the ORCA ‘!’ keyword line.

Method and basis come from the model chemistry (if used) or the explicit parameters. When the basis source is the Basis Set Exchange the basis is embedded as a file instead, so its name is omitted from the ‘!’ line. The auxiliary basis and extra keywords always come from this node.

method_blocks(P)[source]#

The ‘%’ blocks the resolved method itself needs (’’ if none) – e.g. %mp2 DLPNO true end for a DLPNO double hybrid, whose ‘!’ keyword is the parent functional (see orca_step.orca_method_keyword).

run(keywords=None)[source]#

Run the single-point energy.

Note: this is a sub-step, driven by the main ORCA node, which has already set up printing and cited the plug-in. So (like the Gaussian step) it does NOT call super().run() – doing so would cite the plug-in a second time. The working directory is created by run_orca.

sthresh_retry(P)[source]#

The SThresh to rerun a failed SCF with, or None (see ‘scf retry’).

store_fingerprints(configuration, data, kinds=('settings',))[source]#

Store the fingerprints of the calculation’s settings with its results (see orca_step.fingerprint): settings fingerprint#ORCA#<model> etc., or the frequency ones for kinds “frequency”.

classmethod wfx_mode(P)[source]#

How to make the wfx file: False for none, True from the SCF orbitals, “all” from all the natural orbitals of the relaxed MP2 density.

orca_step.energy.MP2_DENSITY_CLASSES = ('MP2', 'global double-hybrid', 'range-separated double-hybrid')#

The classes of method with an MP2 part, whose relaxed density ORCA can give

orca_step.energy.WFX_DENSITY_FILE = 'wfx_density.json'#

The record of the density in the wfx file, beside it, for Atomic Charges

orca_step.energy.used_mp2_natural_orbitals(directory)[source]#

Whether orca_2aim made the wfx in directory from the natural orbitals of the MP2 density (orca.mp2nat) rather than the SCF orbitals.

Its log says which: “(mp2nat file orca.mp2nat) … done”, or “(mp2nat file orca.mp2nat not available - using orca.gbw”. The step removes orca.mp2nat afterwards with ORCA’s other intermediate files, so the log is the evidence.

orca_step.energy_parameters module#

Control parameters for an ORCA single-point energy.

class orca_step.energy_parameters.EnergyParameters(defaults={}, data=None)[source]#

Bases: Parameters

The control parameters for an ORCA energy calculation.

The default path takes the method from a preceding Model Chemistry step; the user can turn that off and choose the method and basis explicitly (similar to the Gaussian step). The explicit choices are driven by the step’s metadata.

applies(key, values=None, _seen=None)[source]#

As seamm.Parameters.applies, plus: no extrapolation for F12 methods (they need their own F12 basis) or for steps that need a gradient; the basis and its source are replaced by the extrapolation when it is used; and the basis source is always ORCA’s own for F12 (the Basis Set Exchange has no CABS).

choices(key, values=None)[source]#

F12 methods take only the F12 bases; the functionals are those of the functional type (not the 3c composites, which are methods).

extrapolation = True#

Whether basis-set extrapolation can be used. False for steps that need a gradient or Hessian, which an extrapolated energy does not have.

implied(values=None)[source]#

An F12 method needs an F12 basis from ORCA itself; a functional implies its functional type.

not_applicable_reason(key, values=None)[source]#

Why a parameter does not apply, for the builder’s messages.

parameters = {'Hirshfeld charges': {'default': 'no', 'default_units': '', 'description': 'Hirshfeld charges:', 'enumeration': ('no', 'yes', 'yes, and apply to structure'), 'format_string': '', 'help_text': "Compute Hirshfeld atomic charges (written to a CSV file; printed for small systems). 'apply to structure' also stores them as the atomic charges on the structure.", 'kind': 'enum'}, 'auxiliary basis': {'default': 'AutoAux', 'default_units': '', 'description': 'Auxiliary (fitting) basis:', 'enumeration': ('AutoAux', 'explicit', 'none', 'def2/J', 'def2/JK', 'def2/J def2-SVP/C', 'def2/J def2-TZVP/C', 'def2/J def2-TZVPP/C', 'def2/J def2-QZVPP/C'), 'format_string': '', 'help_text': "The auxiliary/fitting basis. 'AutoAux' generates a fitting basis automatically and is the robust choice for correlated methods (DLPNO, MP2). 'none' omits it. 'explicit' uses def2/J and, for MP2 and double hybrids, the /C set matching the orbital basis. Or one or more of ORCA's auxiliary basis sets, separated by spaces or commas: a /J (or /JK) set for the Coulomb (and exchange) fitting and, for MP2 and double hybrids, a /C set matching the orbital basis, e.g. 'def2/J def2-TZVPP/C'. Use explicit sets when AutoAux fails with linear dependencies in the auxiliary basis.", 'kind': 'string'}, 'basis': {'applies_when': {'use model chemistry': 'no'}, 'default': 'def2-TZVP', 'default_units': '', 'description': 'Basis set:', 'enumeration': ('STO-3G', '3-21G', '6-31G', '6-311G', '6-31G*', '6-31G**', '6-311G*', '6-311G**', '6-31+G*', '6-31+G**', '6-31++G**', '6-311+G*', '6-311++G**', '6-311++G(2d,2p)', '6-311++G(3df,3pd)', 'cc-pVDZ', 'cc-pVTZ', 'cc-pVQZ', 'cc-pV5Z', 'aug-cc-pVDZ', 'aug-cc-pVTZ', 'aug-cc-pVQZ', 'aug-cc-pV5Z', 'cc-pCVDZ', 'cc-pCVTZ', 'cc-pCVQZ', 'cc-pwCVDZ', 'cc-pwCVTZ', 'cc-pwCVQZ', 'cc-pVDZ-F12', 'cc-pVTZ-F12', 'cc-pVQZ-F12', 'def2-SV(P)', 'def2-SVP', 'def2-TZVP(-f)', 'def2-TZVP', 'def2-TZVPP', 'def2-QZVP', 'def2-QZVPP', 'def2-SVPD', 'def2-TZVPD', 'def2-TZVPPD', 'def2-QZVPD', 'def2-QZVPPD', 'ma-def2-SVP', 'ma-def2-TZVP', 'ma-def2-TZVPP', 'ma-def2-QZVPP'), 'format_string': '', 'help_text': "The orbital basis set. Type a name, pick a common one from the list, or press '...' to choose any basis from the Basis Set Exchange (filtered to the elements you need); a Basis Set Exchange choice is stored as 'bse:NAME'. How a typed name is resolved is set by 'Basis set source' below.", 'kind': 'special', 'widget': 'seamm_widgets.BasisSetField'}, 'basis set extrapolation': {'applies_when': {'use model chemistry': 'no'}, 'default': 'none', 'default_units': '', 'description': 'Basis-set extrapolation (CBS):', 'enumeration': ('none', '2/3', '3/4', '4/5'), 'format_string': '', 'help_text': "Extrapolate the energy to the complete-basis-set limit from two successive cardinal numbers (ORCA's Extrapolate keyword): '2/3' uses double- and triple-zeta, '3/4' triple/quadruple, '4/5' quadruple/quintuple. This is a single ORCA job that runs both basis sets and extrapolates the SCF and correlation parts separately. When on, the fixed basis set above is ignored, and gradients are not available (ORCA has no gradient for an extrapolated energy).", 'kind': 'enum'}, 'basis source': {'applies_when': {'use model chemistry': 'no'}, 'default': 'ORCA internal', 'default_units': '', 'description': 'Basis set source:', 'enumeration': ('ORCA internal', 'Basis Set Exchange'), 'format_string': '', 'help_text': "Where the orbital basis comes from. 'ORCA internal' uses ORCA's built-in definition (the basis name goes on the '!' line). 'Basis Set Exchange' fetches the named basis from the Basis Set Exchange and embeds it, for cross-code-identical definitions or bases ORCA does not ship. The auxiliary basis (AutoAux) is unaffected.", 'kind': 'enum'}, 'bond orders': {'default': 'yes', 'default_units': '', 'description': 'Mayer bond orders:', 'enumeration': ('no', 'yes', 'yes, and apply to structure'), 'format_string': '', 'help_text': "Analyze the Mayer bond orders (always written to a CSV file; printed for small systems). 'apply to structure' also replaces the bonds in the structure with single/aromatic/double/triple bonds based on the bond orders.", 'kind': 'enum'}, 'checkpoint name': {'applies_when': {'save orbital checkpoint': 'yes'}, 'default': 'default', 'default_units': '', 'description': 'Checkpoint name:', 'enumeration': (), 'format_string': '', 'help_text': "Where 'Save orbital checkpoint' writes this run's orbitals. 'default' (the default) derives a label automatically from the system's composition, charge, and multiplicity (e.g. 'Co_q0_m4') -- the usual choice, since it naturally gives one checkpoint per atom/electronic state, shared across an inner loop (e.g. over basis sets) for that atom, and reset automatically when an outer loop moves to a new atom. Any other bare name is stored in a 'checkpoints' folder inside this job; an absolute path is used as-is, e.g. to keep the checkpoint outside this job and reuse it across separate flowchart runs.", 'kind': 'string'}, 'extra blocks': {'default': '', 'default_units': '', 'description': 'Extra ORCA blocks:', 'enumeration': (), 'format_string': '', 'help_text': 'Any additional literal ORCA input, inserted verbatim right before the geometry -- after the blocks generated by the controls above. Use this for one-off SCF-stabilization tricks with no dedicated control, e.g. for a difficult atom:\n%scf\n  MaxIter 400\n  Shift Shift 0.3 ErrStart 0.05 end\n  DIISBfac 1.1\nend', 'kind': 'special', 'widget': 'seamm_widgets.LabeledText'}, 'extra keywords': {'default': '', 'default_units': '', 'description': 'Extra keywords:', 'enumeration': (), 'format_string': '', 'help_text': "Any additional ORCA '!' keywords to append, e.g. 'RIJCOSX', 'NoFrozenCore', 'SlowConv'. The SCF tolerance and integration grid have their own controls above.", 'kind': 'string'}, 'extrapolation family': {'applies_when': {'basis set extrapolation': {'not': 'none'}}, 'default': 'cc', 'default_units': '', 'description': 'Extrapolation family:', 'enumeration': ('cc', 'aug-cc', 'def2', 'ANO'), 'format_string': '', 'help_text': "The basis-set family for the extrapolation: 'cc' (cc-pVnZ), 'aug-cc' (aug-cc-pVnZ, with diffuse functions), 'def2' (the Karlsruhe def2 sets), or 'ANO'. Only used when basis-set extrapolation is on.", 'kind': 'enum'}, 'functional': {'applies_when': {'method': 'DFT'}, 'default': 'B3LYP', 'default_units': '', 'description': 'Functional:', 'enumeration': ('PWLDA', 'VWN', 'VWN3', 'VWN5', 'BLYP', 'BP86', 'GLYP', 'MPWLYP', 'MPWPW', 'OLYP', 'PBE', 'PW91', 'PWP', 'REVPBE', 'RPBE', 'RPW86PBE', 'XLYP', 'B97M-D3BJ', 'B97M-D4', 'B97M-V', 'M06L', 'R2SCAN', 'REVTPSS', 'RSCAN', 'SCANFUNC', 'TPSS', 'B1LYP', 'B1P86', 'B3LYP', 'B3LYP/G', 'B3P86', 'B3PW91', 'BHANDHLYP', 'M06', 'M062X', 'MPW1LYP', 'MPW1PW', 'O3LYP', 'PBE0', 'PW1PW', 'PW6B95', 'R2SCAN0', 'R2SCAN50', 'R2SCANH', 'REVPBE0', 'REVPBE38', 'TPSS0', 'TPSSH', 'X3LYP', 'CAM-B3LYP', 'LC-BLYP', 'LC-PBE', 'WB97', 'WB97M-D3BJ', 'WB97M-D4', 'WB97M-D4REV', 'WB97M-V', 'WB97X', 'WB97X-D3', 'WB97X-D3BJ', 'WB97X-D4', 'WB97X-D4REV', 'WB97X-V', 'WR2SCAN', 'B2GP-PLYP', 'B2K-PLYP', 'B2NC-PLYP', 'B2PLYP', 'B2T-PLYP', 'DSD-BLYP', 'DSD-BLYP/2013', 'DSD-PBEB95', 'DSD-PBEP86', 'DSD-PBEP86/2013', 'KPR2SCAN50', 'mPW2PLYP', 'PBE-QIDH', 'PBE0-DH', 'PR2SCAN50', 'PR2SCAN69', 'PWPB95', 'R2SCAN-CIDH', 'R2SCAN-QIDH', 'R2SCAN0-2', 'R2SCAN0-DH', 'REVDOD-PBEP86-D4/2021', 'REVDOD-PBEP86/2021', 'REVDSD-PBEP86-D4/2021', 'REVDSD-PBEP86/2021', 'SCS-B2GP-PLYP21', 'SCS-PBE-QIDH', 'SCS/SOS-B2PLYP21', 'SOS-B2GP-PLYP21', 'SOS-PBE-QIDH', 'RSX-0DH', 'RSX-QIDH', 'SCS-RSX-QIDH', 'SCS-WB2GP-PLYP', 'SCS-WB88PP86', 'SCS-WPBEPP86', 'SCS/SOS-WB2PLYP', 'SOS-RSX-QIDH', 'SOS-WB2GP-PLYP', 'SOS-WB88PP86', 'SOS-WPBEPP86', 'WB2GP-PLYP', 'WB2PLYP', 'WB88PP86', 'WB97M(2)', 'WB97X-2', 'WPBEPP86', 'WPR2SCAN50', 'DLPNO-B2GP-PLYP', 'DLPNO-B2K-PLYP', 'DLPNO-B2NC-PLYP', 'DLPNO-B2PLYP', 'DLPNO-B2T-PLYP', 'DLPNO-DSD-BLYP', 'DLPNO-DSD-BLYP/2013', 'DLPNO-DSD-PBEP86', 'DLPNO-DSD-PBEP86/2013', 'DLPNO-mPW2PLYP', 'DLPNO-PBE-QIDH', 'DLPNO-PBE0-DH', 'DLPNO-PR2SCAN50', 'DLPNO-PR2SCAN69', 'DLPNO-R2SCAN-CIDH', 'DLPNO-R2SCAN-QIDH', 'DLPNO-R2SCAN0-2', 'DLPNO-R2SCAN0-DH', 'DLPNO-REVDOD-PBEP86-D4/2021', 'DLPNO-REVDOD-PBEP86/2021', 'DLPNO-REVDSD-PBEP86-D4/2021', 'DLPNO-REVDSD-PBEP86/2021', 'DLPNO-RSX-0DH', 'DLPNO-RSX-QIDH', 'DLPNO-WB2GP-PLYP', 'DLPNO-WB2PLYP', 'DLPNO-WB88PP86', 'DLPNO-WPBEPP86'), 'format_string': '', 'help_text': "The exchange-correlation functional (an ORCA '!' keyword), restricted to the chosen functional type. Only used when the method is 'DFT'. Double-hybrid functionals need an auxiliary '/C' basis, which 'AutoAux' provides.", 'kind': 'enum'}, 'functional type': {'applies_when': {'method': 'DFT'}, 'default': 'global hybrid', 'default_units': '', 'description': 'Functional type:', 'enumeration': ('local', 'GGA', 'meta-GGA', 'global hybrid', 'range-separated hybrid', 'global double-hybrid', 'range-separated double-hybrid'), 'format_string': '', 'help_text': "ORCA's classification of the density functional (local, GGA, meta-GGA, (range-separated) hybrid, (range-separated) double-hybrid). Picking a type filters the functional list. Only used when the method is 'DFT'.", 'kind': 'enum'}, 'grid': {'default': 'default', 'default_units': '', 'description': 'Integration grid:', 'enumeration': ('default', 'DEFGRID1', 'DEFGRID2', 'DEFGRID3'), 'format_string': '', 'help_text': "ORCA's numerical integration grid preset (for the DFT exchange-correlation and RIJCOSX/COSX grids). 'default' leaves ORCA's own default (DEFGRID2). DEFGRID1 is coarser/faster, DEFGRID3 is finer/more accurate. Only affects methods that use a grid (DFT, RIJCOSX); ignored otherwise.", 'kind': 'enum'}, 'if wavefunction not found': {'applies_when': {'initial guess': ['Previous wavefunction', 'Specified orbitals']}, 'default': 'Throw an error', 'default_units': '', 'description': 'If wavefunction not found:', 'enumeration': ('Throw an error', 'Use default guess', 'Use Hueckel guess', 'Use HCore guess', 'Use PAtom guess', 'Use PModel guess', 'Use SAD guess', 'Use SADNO guess'), 'format_string': '', 'help_text': "What to do when 'Initial guess' above is 'Previous wavefunction' or 'Specified orbitals' but nothing is there to read (e.g. no earlier ORCA step yet, or the first basis set of a loop where 'Specified orbitals' has not been written yet). 'Throw an error' (the default) fails loudly, matching what an explicit wavefunction request implies. Choose one of the 'Use ... guess' options instead to make this safe to leave on for every iteration of a loop, e.g. the first pass through a basis-set escalation.", 'kind': 'enum'}, 'initial guess': {'default': 'default', 'default_units': '', 'description': 'Initial guess:', 'enumeration': ('default', 'Hueckel', 'HCore', 'PAtom', 'PModel', 'SAD', 'SADNO', 'Previous wavefunction', 'Specified orbitals'), 'format_string': '', 'help_text': "ORCA's SCF starting guess ('Guess' in the '%scf' block). 'default' leaves ORCA's own default (SAD for most systems). 'PModel' is often much more stable than SAD for a single atom or ion, where a superposition of atomic densities has little meaning. 'Previous wavefunction' seeds from the nearest earlier ORCA step in this flowchart (its 'orca.gbw'); 'Specified orbitals' seeds from the file named by 'Specified orbitals' below. Either way ORCA projects the orbitals onto this job's basis when it differs (the same trick its own CBS extrapolation uses internally), so this also works across a basis-set escalation. 'If wavefunction not found' below controls what happens when there is nothing to read.", 'kind': 'enum'}, 'method': {'applies_when': {'use model chemistry': 'no'}, 'default': 'DLPNO-CCSD(T)', 'default_units': '', 'description': 'Method:', 'enumeration': ('HF', 'MP2', 'RI-MP2', 'MP2-F12', 'RI-MP2-F12', 'CCSD(T)', 'DLPNO-CCSD(T)', 'CCSD(T)-F12D/RI', 'DLPNO-CCSD(T)-F12D', 'DFT', 'B97-3C', 'R2SCAN-3C', 'B3LYP-3C', 'PBEH-3C', 'WB97X-3C'), 'format_string': '', 'help_text': "The ORCA method. For 'DFT' the exchange-correlation functional is chosen with the two controls below; every other choice is an ORCA '!' keyword on its own.", 'kind': 'enum'}, 'polarizability': {'default': 'no', 'default_units': '', 'description': 'Polarizability:', 'enumeration': ('no', 'yes'), 'format_string': '', 'help_text': 'Compute the dipole polarizability (analytic for HF and DFT). This adds to the cost of the calculation.', 'kind': 'enum'}, 'results': {'default': {}, 'default_units': '', 'description': 'results', 'enumeration': (), 'format_string': '', 'help_text': "The results to save to variables, in tables, or as properties of the configuration. Nothing is stored by default. Storing the energy and gradients adds them to the configuration in the job's database -- three values per atom for the gradients -- and Write Structure then includes them in the files it writes: REF_energy and REF_forces in an extxyz file, and the properties in an SDF file.", 'kind': 'dictionary'}, 'retry sthresh': {'applies_when': {'scf retry': 'yes'}, 'default': '1.0e-06', 'default_units': '', 'description': 'SThresh for the retry:', 'enumeration': ('1.0e-06', '1.0e-05'), 'format_string': '', 'help_text': "The SThresh a failed SCF is retried with. It must be larger than the run's own SThresh (ORCA's default is 1e-7), or there is no retry.", 'kind': 'string'}, 'save orbital checkpoint': {'default': 'no', 'default_units': '', 'description': 'Save orbital checkpoint:', 'enumeration': ('no', 'yes'), 'format_string': '', 'help_text': "After a successful run, copy the converged orbitals ('orca.gbw') to the file named by 'Checkpoint name' below, for a later step to read back -- e.g. with 'Initial guess' = 'Specified orbitals' there, naming the same checkpoint via 'Specified orbitals'. This reaches across a later iteration of an enclosing loop (e.g. over basis sets for the same atom), which 'Previous wavefunction' (a graph walk) cannot: each loop iteration gets its own directory, so the previous iteration is not a preceding node in the flowchart graph.", 'kind': 'enum'}, 'save wavefunction': {'default': 'no', 'default_units': '', 'description': 'Write the wavefunction (wfx) file:', 'enumeration': ('no', 'yes'), 'format_string': '', 'help_text': "Retain the electron density ('keepdensity') and convert it to an AIMPAC wavefunction (.wfx) file with orca_2aim. This analytic wavefunction is read by a following Atomic Charges step (DDEC6 via Chargemol), mirroring the Gaussian wfx path.", 'kind': 'enum'}, 'scf convergence': {'default': 'TIGHTSCF', 'default_units': '', 'description': 'SCF convergence:', 'enumeration': ('default', 'SLOPPYSCF', 'LOOSESCF', 'NORMALSCF', 'STRONGSCF', 'TIGHTSCF', 'VERYTIGHTSCF', 'EXTREMESCF'), 'format_string': '', 'help_text': "ORCA's SCF convergence-tolerance preset. 'default' leaves ORCA's own default (NORMALSCF for a single point; ORCA tightens it to TIGHTSCF for optimizations). The presets run SLOPPYSCF (loosest) -> LOOSESCF -> NORMALSCF -> STRONGSCF -> TIGHTSCF -> VERYTIGHTSCF -> EXTREMESCF (tightest). TIGHTSCF (the default here) is a good choice for smooth energies/forces. A calculation with an MP2 part (a double hybrid or MP2: energies, forces, optimizations, numerical frequencies) always runs with at least VERYTIGHTSCF: the MP2 energy carries the SCF's convergence error at first order, and with TIGHTSCF ORCA 6.1.1 computes some double-hybrid gradients wrongly.", 'kind': 'enum'}, 'scf retry': {'default': 'yes', 'default_units': '', 'description': 'Retry a failed SCF with a larger SThresh:', 'enumeration': ('yes', 'no'), 'format_string': '', 'help_text': "If the SCF does not converge and the basis set is nearly linearly dependent (the smallest eigenvalue of the overlap matrix is below 'SThresh for the retry'), run ORCA once more with that SThresh. The note in the output, the failed output (orca.out.scf-failed) and the file orca.sthresh-retry record that it happened.", 'kind': 'enum'}, 'specified orbitals': {'applies_when': {'initial guess': 'Specified orbitals'}, 'default': 'default', 'default_units': '', 'description': 'Specified orbitals:', 'enumeration': (), 'format_string': '', 'help_text': "Which file 'Initial guess' = 'Specified orbitals' reads from. Same rules as 'Checkpoint name': 'default' derives the label automatically from this system's composition, charge, and multiplicity, matching what a step upstream saved with 'Save orbital checkpoint' left on 'default'; a bare name looks in this job's 'checkpoints' folder; an absolute path is used as-is. This is the one field that may also point at ANOTHER job (reading only -- a job cannot write into another job): 'job://<job number>/<name>' -- or 'job://<job number>/default' to pick up that other job's auto-derived name for this same system, when you do not know what it resolved to.", 'kind': 'string'}, 'sthresh': {'default': 'default', 'default_units': '', 'description': 'SCF SThresh:', 'enumeration': ('default', '1.0e-07'), 'format_string': '', 'help_text': "ORCA's threshold for linear dependence of the basis set ('SThresh' in the '%scf' block): combinations of basis functions whose overlap-matrix eigenvalue is below it are removed. 'default' writes nothing, so ORCA's default (1e-7) applies. Large diffuse basis sets (e.g. def2-QZVPPD) on clusters can be nearly linearly dependent, which can stop the SCF converging; a larger value such as 1e-6 removes more functions and helps it converge.", 'kind': 'string'}, 'use model chemistry': {'default': 'yes', 'default_units': '', 'description': 'Use the global model chemistry:', 'enumeration': ('yes', 'no'), 'format_string': '', 'help_text': "Use the model chemistry defined by a preceding Model Chemistry step (the '_model_chemistry' variable). If ORCA cannot provide it, an error is raised. Turn this off to set the method and basis explicitly below.", 'kind': 'boolean'}, 'wfx density': {'applies_when': {'save wavefunction': 'yes'}, 'default': 'SCF', 'default_units': '', 'description': 'Density in the wfx file:', 'enumeration': ('SCF', 'MP2 relaxed'), 'format_string': '', 'help_text': "For MP2 and double-hybrid methods, the density the wavefunction file holds: the SCF density, or the relaxed MP2 density -- the method's own density -- from its natural orbitals. The relaxed density needs a Z-vector solution, about the cost of a gradient, which a gradient computes anyway. A following Atomic Charges step partitions this density, and says which it is. Not available for other methods, nor for an open-shell DLPNO double hybrid.", 'kind': 'enum'}}#
problems(values=None)[source]#

The base checks, and an auxiliary basis that ORCA would not know.

renamed_methods = {'CCSD(T)-F12D': 'CCSD(T)-F12D/RI'}#
unused = ()#

Parameters that this kind of step never uses.

orca_step.energy_parts module#

The parts of a correlated energy from ORCA: the reference (HF) energy, the CABS singles of F12, the correlation energies and the triples, for composite recipes that combine parts of calculations (composite_step) and for the fragment store, which keeps them with the energy (its byproducts).

The layout (agreed with the thermochemistry science, 2026-11-12):

{"parts version": 1, "units": "E_h",
 "parts": {name: value},              # energies, E_h, as ORCA gives them
 "total": [names],                    # the parts that sum to the energy
 "factors": {"(T) scale f": value},   # dimensionless
 "reference": "RHF" | "UHF" | "QRO",
 "frozen core orbitals": n, "relativistic": "none" | "DKH2" | "X2C",
 "diagnostics": {"T1": ..., "<S**2>": ...},
 "sources": {name: "property file" | "output" | "computed"}}

The parts of each kind of run:

MP2

HF, MP2 correlation

RI-MP2

HF, RI-MP2 correlation

CCSD(T)

HF, CCSD correlation, (T); MP2 correlation (closed-shell RHF)

CCSD(T)-F12D/RI

HF, CABS singles, CCSD correlation, F12 correction, (T); MP2 correlation (closed-shell RHF); factor (T) scale f

DLPNO-CCSD(T)

HF, DLPNO-MP2 correlation, DLPNO-CCSD correlation, DLPNO-(T0)

DLPNO-CCSD(T)-F12D

HF, CABS singles, DLPNO-CCSD correlation, F12 correction, DLPNO-(T0), DLPNO-MP2 correlation; factor (T) scale f (computed)

“HF” is the energy of the reference determinant the correlation is built on: the SCF energy, or for quasi-restricted orbitals (QRO) the QRO determinant’s energy, not the UHF one. For F12 it excludes the CABS singles. “(T)” is never scaled; f = (CCSD correlation + F12 correction) / CCSD correlation, as ORCA prints it for canonical F12 and computed the same way for DLPNO-F12. The DLPNO correlation is everything ORCA’s total includes (weak pairs, PNO corrections). The MP2 energy a CC run prints is reported only for closed-shell RHF; for UHF or QRO it is not a standalone method and is left out.

The parts must reproduce ORCA’s final single-point energy within 2e-9 E_h (the splits are printed to 1e-9 E_h); otherwise no parts are given.

orca_step.energy_parts.SUM_TOLERANCE = 2e-09#

The parts must sum to the final energy within this, E_h

orca_step.energy_parts.energy_parts(output, properties_text)[source]#

The parts of the run’s energy, or None (with the reason logged) when the run has none or they cannot be given safely.

Parameters:
  • output (str) – orca.out.

  • properties_text (str) – orca.property.txt.

orca_step.energy_parts.property_blocks(text)[source]#

{block name: {key: value}} from an ORCA .property.txt: numbers (the last number of an array of one value), integers and strings.

orca_step.energy_step module#

Stevedore helper for the ORCA Energy sub-step.

class orca_step.energy_step.EnergyStep(flowchart=None, gui=None)[source]#

Bases: object

create_node(flowchart=None, **kwargs)[source]#
create_tk_node(canvas=None, **kwargs)[source]#
description()[source]#
my_description = {'description': 'Single-point energy with ORCA', 'group': 'Calculation', 'name': 'Energy'}#

orca_step.fingerprint module#

Fingerprints of the settings of ORCA calculations.

What ORCA’s input holds that does not belong to the settings is removed here, and seamm_util.fingerprint.calculation_record() hashes the rest. The Energy, Optimization and Frequencies sub-steps and the MDI engine (data/orca_mdi.py) all use orca_calculation_record(), so a step and an engine running the same calculation give the same fingerprint.

Removed:

  • the cores and memory (%pal, PALn, %maxcore), file names (%base, %moinp) and output (%output, %elprop, %plots, print keywords);

  • the starting guess (MORead, AutoStart, Guess in %scf), which is not a setting;

  • the task (SP, EnGrad, Opt, Freq, …) and the optimizer (%geom), which do not change the energy at a geometry;

  • the geometry, charge and multiplicity, which belong to the species;

  • the thermochemistry temperature (%freq Temp), which the names of the thermochemical properties carry.

Kept: everything else on the ‘!’ line, in any order (ORCA’s keywords are case-insensitive and unordered), and the other blocks. NoCOSX, which the step and engine add for some elements, is kept: a calculation with exact exchange is not the same level as one with COSX. It is dropped only when ORCA’s output shows that COSX could not have been used anyway (see cosx_is_moot()) – a functional without exact exchange such as r2SCAN-3c, or a basis set without an auxiliary Coulomb basis such as cc-pVTZ-F12 – since the calculation is then the same with or without it. RHF, UHF and similar words are kept too; ORCA chooses from the multiplicity itself, so they are on the ‘!’ line only when the user asked for them.

Basis sets written per element – a Basis Set Exchange basis in basis.bas, or NewGTO, NewAuxJGTO, NewECP, … in %basis – are hashed per element, so that species with different elements can be compared.

orca_step.fingerprint.basis_file_blocks(text)[source]#

The per-element sections of an ORCA-format basis file from the Basis Set Exchange ($DATA, then a line with each element’s name and its shells, $END), as {symbol: [normalized lines]}.

orca_step.fingerprint.cosx_is_moot(out_text)[source]#

Whether ORCA’s output shows that the SCF could not have used COSX, so that COSX or NoCOSX does not change the calculation.

COSX approximates exact (Hartree-Fock) exchange, together with the RI approximation for the Coulomb term. It is moot when the SCF has no exact exchange (a functional that is not hybrid, e.g. r2SCAN-3c), or when ORCA has no auxiliary Coulomb basis for the basis set (e.g. cc-pVTZ-F12), and then uses exact exchange whatever the input says.

Parameters:

out_text (str) – The contents of orca.out.

Returns:

True if COSX is moot; False if COSX was used, could have been, or the output does not say.

Return type:

bool

orca_step.fingerprint.orca_calculation_record(files, version, atomic_numbers=None, coordinates=None, out_text=None, cosx_moot=None)[source]#

The record of an ORCA calculation’s settings, with its fingerprints.

Parameters:
  • files ({str: str or bytes}) – The input files as run: orca.inp and any others, such as basis.bas. Binary files, e.g. an orca.gbw for the guess, are not settings.

  • version (str) – The ORCA version, e.g. “6.1.1” (see orca_version()).

  • atomic_numbers (optional) – The geometry, for its fingerprint.

  • coordinates (optional) – The geometry, for its fingerprint.

  • out_text (str, optional) – The contents of orca.out, which says whether COSX was moot (see cosx_is_moot()). Without it COSX and NoCOSX are hashed.

  • cosx_moot (bool, optional) – Whether COSX is moot, overriding out_text: for predicting the fingerprint of a calculation that has not run (see orca_step.batch.expected_fingerprints()).

Returns:

See seamm_util.fingerprint.calculation_record().

Return type:

dict

orca_step.fingerprint.orca_version(out_text)[source]#

The ORCA version from its output, e.g. “6.1.1”, or None.

orca_step.fingerprint.settings_text(input_text, cosx_moot=False)[source]#

The lines of an ORCA input that make up its settings, and the per-element basis sets in it.

Parameters:
  • input_text (str) – The contents of orca.inp.

  • cosx_moot (bool) – Drop COSX, RIJCOSX and NoCOSX, which do not change the calculation (see cosx_is_moot()).

Returns:

([str], {str – The normalized lines, and the element blocks by symbol.

Return type:

[str]})

orca_step.frequencies module#

An ORCA Frequencies (Hessian / vibrational analysis) sub-step.

Extends the Energy sub-step with ORCA’s Freq (analytic, AnFreq) or NumFreq (numerical) frequency calculation: the Hessian, harmonic vibrational frequencies, IR intensities, and the thermochemistry (zero-point energy, thermal enthalpy, entropy, and Gibbs free energy) at a chosen temperature.

class orca_step.frequencies.Frequencies(flowchart=None, title='Frequencies', extension=None, logger=<Logger orca_step.frequencies (WARNING)>)[source]#

Bases: Energy

A vibrational-frequency (Hessian) calculation with ORCA.

See also

TkFrequencies, FrequenciesParameters, Energy

analyze(indent='', P=None, data=None, **kwargs)[source]#

Store and report the energy plus the frequencies, IR intensities, and thermochemistry, honoring the standard structure-handling options.

description_text(P=None)[source]#

Describe what this sub-step will do.

extra_input(P)[source]#

Add the %freq Temp block (thermochemistry temperature) to the Energy sub-step’s extra ORCA input.

run(keywords=None)[source]#

Add ORCA’s Freq/NumFreq keyword to the energy run.

orca_step.frequencies_parameters module#

Control parameters for the ORCA Frequencies (Hessian) sub-step.

Extends the Energy parameters (level of theory, basis, …) with the choice of analytic vs numerical second derivatives and the thermochemistry temperature.

class orca_step.frequencies_parameters.FrequenciesParameters(defaults={}, data=None)[source]#

Bases: EnergyParameters

The Frequencies parameters: the Energy parameters plus the second- derivative method and the thermochemistry temperature.

extrapolation = False#

Whether basis-set extrapolation can be used. False for steps that need a gradient or Hessian, which an extrapolated energy does not have.

parameters = {'second derivatives': {'default': 'default', 'default_units': '', 'description': 'Second derivatives:', 'enumeration': ('default', 'analytic', 'numerical'), 'format_string': '', 'help_text': "How to compute the Hessian. 'default' uses ORCA's analytic second derivative (AnFreq) when one is available for the method (HF and most DFT functionals), and falls back to the numerical one (NumFreq) otherwise -- the right choice for almost every case. 'analytic' and 'numerical' force one or the other regardless of whether the method has an analytic Hessian: 'analytic' fails for a method without one (e.g. a double hybrid, MP2 or (DLPNO-)CCSD(T)); 'numerical' (finite-differencing the gradient) works for any method that has a gradient, but is considerably more expensive.", 'kind': 'enum'}, 'temperature': {'default': '298.15', 'default_units': 'K', 'description': 'Temperature:', 'enumeration': (), 'format_string': '.2f', 'help_text': "The temperature for the thermochemistry (zero-point energy, thermal corrections, entropy, and Gibbs free energy). The pressure is ORCA's default of 1 atm.", 'kind': 'float'}}#
unused = ('sthresh', 'bond orders', 'Hirshfeld charges', 'polarizability', 'save wavefunction', 'wfx density')#

Parameters that this kind of step never uses.

orca_step.frequencies_step module#

Stevedore helper for the ORCA Frequencies sub-step.

class orca_step.frequencies_step.FrequenciesStep(flowchart=None, gui=None)[source]#

Bases: object

create_node(flowchart=None, **kwargs)[source]#
create_tk_node(canvas=None, **kwargs)[source]#
description()[source]#
my_description = {'description': 'Vibrational frequencies (Hessian) with ORCA', 'group': 'Calculation', 'name': 'Frequencies'}#

orca_step.frozen_core module#

Frozen-core control and scalar-relativistic Hamiltonians for model-chemistry calculations (composite phase 2 §3).

A recipe gives the frozen core as a count of ORBITALS per element (or none, or default for ORCA’s own choice). ORCA counts core ELECTRONS (%method NewNCore Z n end). Only the elements whose count differs from ORCA’s default are written, so a calculation that asks for ORCA’s default has the same input, and the same settings fingerprint, as one that does not say. When anything is written, CheckFrozenCore is pinned on. The elements are written by atomic number: ORCA 6.1.1 reads NewNCore Hf n as hydrogen.

After the run the number of frozen orbitals ORCA reports is checked against the count asked for (check_frozen_core()).

orca_step.frozen_core.NUCLEUS = {'finite': 'true', 'point': 'false'}#

The nucleus models, written explicitly with any relativistic Hamiltonian

orca_step.frozen_core.ORCA_DEFAULT_CORE_ELECTRONS = {1: 0, 2: 0, 3: 0, 4: 0, 5: 2, 6: 2, 7: 2, 8: 2, 9: 2, 10: 2, 11: 2, 12: 2, 13: 10, 14: 10, 15: 10, 16: 10, 17: 10, 18: 10, 19: 10, 20: 10, 21: 10, 22: 10, 23: 10, 24: 10, 25: 10, 26: 10, 27: 10, 28: 10, 29: 10, 30: 10, 31: 18, 32: 18, 33: 18, 34: 18, 35: 18, 36: 18, 37: 18, 38: 18, 39: 28, 40: 28, 41: 28, 42: 28, 43: 28, 44: 28, 45: 28, 46: 28, 47: 28, 48: 28, 49: 36, 50: 36, 51: 36, 52: 36, 53: 36, 54: 36, 55: 36, 56: 36, 57: 36, 58: 36, 59: 36, 60: 36, 61: 36, 62: 36, 63: 36, 64: 36, 65: 36, 66: 36, 67: 36, 68: 36, 69: 36, 70: 36, 71: 46, 72: 46, 73: 46, 74: 46, 75: 46, 76: 46, 77: 46, 78: 46, 79: 46, 80: 46, 81: 68, 82: 68, 83: 68, 84: 68, 85: 68, 86: 68}#

ORCA 6.1.1’s default frozen core, in electrons, by atomic number, as ORCA prints it (“Setting NCore(X) from N to …”), 2026-11-12. Li and Be are not frozen; Na and Mg freeze only 1s; K-Zn freeze 1s-2p.

orca_step.frozen_core.REFERENCES = ('default', 'UHF', 'QRO')#

The references an open-shell correlated calculation can be built on. “default” and “UHF” are ORCA’s own choice (UHF); “QRO” takes quasi-restricted orbitals from the UHF solution. ROHF is not offered: ORCA’s canonical coupled cluster refuses it, and ROHF-NoIter silently gave OH the wrong state (2026-11-12).

orca_step.frozen_core.RELATIVISTIC = {'DKH2': 'DKH2', 'X2C': 'X2C', 'none': None}#

The scalar-relativistic Hamiltonians and their ORCA keywords

orca_step.frozen_core.SCF_METHODS = {'HF', 'RHF', 'ROHF', 'UHF'}#

The method keywords of uncorrelated (SCF) model chemistries

orca_step.frozen_core.check_electron_pairs(frozen_core, atomic_numbers, charge)[source]#

Whether a correlated calculation is of a one-electron system (H, He+, H2+, …), which runs as HF: there is nothing to correlate, so the correlated energy is the HF energy, exact within the basis. ORCA’s MP2 and MDCI modules refuse such a system (“no electrons to correlate”, “number of processes exceeds number of pairs (0)”).

Raises:

ValueError – If the frozen core leaves fewer than two correlated electrons in a system with more than one: no pairs to correlate, but the HF energy would not be the correlated one either.

orca_step.frozen_core.check_frozen_core(expected, parts)[source]#

The reason the run’s frozen core is not the one asked for, or None.

orca_step.frozen_core.check_reference(reference, multiplicity, parts)[source]#

The reason the run’s reference is not the one asked for, or None.

orca_step.frozen_core.correlated_pairs(frozen_core, atomic_numbers, charge)[source]#

The smallest number of correlated electron pairs ORCA’s MDCI module can count for a calculation: m(m + 1)/2 for the m correlated electron pairs (pairs of occupied orbitals i <= j). Exact for a closed shell; an open shell has at least as many. ORCA refuses to run MDCI on more processes than pairs (“Number of processes (2) in parallel calculation exceeds number of pairs (1)” for H2).

orca_step.frozen_core.correlation_electrons(frozen_core, atomic_numbers, charge)[source]#

(electrons, correlated electrons) of a calculation.

orca_step.frozen_core.decontract_block(decontract)[source]#

The %basis block that decontracts the orbital basis, or “”.

orca_step.frozen_core.frozen_core_electrons(frozen_core, atomic_numbers)[source]#

The number of core electrons frozen: ORCA’s default, none, or the count per element asked for (see frozen_core_input()).

orca_step.frozen_core.frozen_core_input(frozen_core, atomic_numbers)[source]#

The ORCA input for a frozen core, and the frozen orbitals expected.

Parameters:
  • frozen_core (None, "default", "none" or {element: orbitals}) – None and “default”: ORCA’s default; “none”: all electrons correlated.

  • atomic_numbers ([int]) – The real atoms of the calculation (not ghosts).

Returns:

Keywords for the ‘!’ line ([] or [“NoFrozenCore”]), a %method block (or “”), and the number of frozen orbitals expected (None for ORCA’s default, which is not checked).

Return type:

(keywords, block, expected)

orca_step.frozen_core.is_correlated(model_chemistry)[source]#

Whether a model chemistry is a correlated wavefunction method (MP2, CCSD(T), their F12 and DLPNO forms), whose energy ORCA’s MP2 and MDCI modules compute.

orca_step.frozen_core.model_chemistry_capabilities(mtype)[source]#

What a model-chemistry calculation of this type can be told (composite recipes check their components against it): the frozen core, a scalar-relativistic Hamiltonian and its nucleus model, and whether the energy comes with its parts (correlated methods), and the reference of an open-shell correlated calculation.

orca_step.frozen_core.one_electron_parts(energy, reference, frozen_core_orbitals, relativistic, f12)[source]#

The energy parts of a one-electron system’s correlated energy, run as HF: the HF energy is the total and the correlation is zero.

The reference is reported as the one asked for: with one electron the UHF, ROHF and quasi-restricted determinants are the same. An F12 method’s CABS singles correction is not included: ORCA computes it only in its F12 correlation modules, which refuse a one-electron system (for the H atom with cc-pVTZ-F12 it would be about -5e-5 E_h, the basis’s HF error).

orca_step.frozen_core.reference_input(reference, multiplicity)[source]#

The block that makes an open-shell correlated calculation use quasi- restricted orbitals, or “”.

Closed-shell calculations, and open-shell ones on ORCA’s default (UHF), get nothing, so asking for a reference changes neither their input nor their settings fingerprint.

orca_step.frozen_core.relativistic_input(relativistic, nucleus=None)[source]#

The ‘!’ keywords and the %rel block of a scalar-relativistic Hamiltonian. The nucleus model is always written when there is one, so the input, and the settings fingerprint, say which was used.

orca_step.installer module#

Installer for the ORCA plug-in.

ORCA is licensed software installed manually from https://www.faccts.de / the ORCA forum, so this installer locates the existing orca executable and registers its full path in seamm.ini (ORCA needs its full path to launch its sub-programs).

class orca_step.installer.Installer(*args: Any, **kwargs: Any)[source]#

Bases: InstallerBase

Locate the ORCA executable and register it in seamm.ini.

exe_version(config)[source]#

Return the ORCA name and version.

ORCA has no stable --version flag (the version is in the run banner), so this just confirms the executable is reachable.

orca_step.metadata module#

Metadata describing ORCA’s methods, basis sets, and results.

This drives the explicit method/basis GUI (like the Gaussian step) and will also back the model-chemistry protocol (get_model_chemistry_options) used by the Model Chemistry step. It is kept deliberately small for now and will be filled out as more of ORCA’s capabilities are exposed.

orca_step.optimization module#

An ORCA geometry-optimization sub-step.

Extends the Energy sub-step by adding the Opt keyword and, after the run, updating the configuration with the optimized geometry.

class orca_step.optimization.Optimization(flowchart=None, title='Optimization', extension=None, logger=<Logger orca_step.optimization (WARNING)>)[source]#

Bases: Energy

A geometry optimization with ORCA.

See also

TkOptimization, OptimizationParameters, Energy

analyze(indent='', P=None, data=None, **kwargs)[source]#

Report the energy, store the optimized geometry according to the structure-handling options, and check that the optimization converged.

description_text(P=None)[source]#

Describe what this sub-step will do.

final_coordinates(configuration)[source]#

The optimized geometry (orca.xyz), which the energy belongs to.

run(keywords=None)[source]#

Run the optimization by adding the Opt keyword to the energy run.

orca_step.optimization_parameters module#

Control parameters for an ORCA geometry optimization.

class orca_step.optimization_parameters.OptimizationParameters(defaults={}, data=None)[source]#

Bases: EnergyParameters

Optimization parameters: the energy parameters plus optimization controls and the standard structure-handling options (where to put the optimized geometry).

extrapolation = False#

Whether basis-set extrapolation can be used. False for steps that need a gradient or Hessian, which an extrapolated energy does not have.

parameters = {'optimization convergence': {'default': 'NormalOpt', 'default_units': '', 'description': 'Convergence:', 'enumeration': ('LooseOpt', 'NormalOpt', 'TightOpt', 'VeryTightOpt'), 'format_string': '', 'help_text': 'The ORCA geometry-optimization convergence preset.', 'kind': 'enum'}}#

orca_step.optimization_step module#

Stevedore helper for the ORCA Optimization sub-step.

class orca_step.optimization_step.OptimizationStep(flowchart=None, gui=None)[source]#

Bases: object

create_node(flowchart=None, **kwargs)[source]#
create_tk_node(canvas=None, **kwargs)[source]#
description()[source]#
my_description = {'description': 'Geometry optimization with ORCA', 'group': 'Calculation', 'name': 'Optimization'}#

orca_step.orca module#

The main ORCA node: holds and drives a sub-flowchart of ORCA capabilities.

class orca_step.orca.ORCA(flowchart=None, title='ORCA', namespace='org.molssi.seamm.orca', extension=None, logger=<Logger orca_step.orca (WARNING)>)[source]#

Bases: ORCABase

The main ORCA node. Like the MOPAC and Gaussian nodes, it owns a sub-flowchart whose nodes are ORCA capabilities (Energy, Optimization, …).

See also

TkORCA, ORCABase

description_text(P=None)[source]#

Describe what the ORCA sub-flowchart will do.

run()[source]#

Run the ORCA sub-flowchart, node by node.

set_id(node_id)[source]#

Set the id of this node and propagate to the sub-flowchart.

orca_step.orca_base module#

Shared base class for the ORCA step and its sub-steps.

Holds the command-line/seamm.ini parser, the geometry block, and the routine that writes the ORCA input, runs ORCA through the flowchart executor, and parses the output. The main ORCA node and the Energy sub-step both inherit from this (Optimization inherits from Energy), mirroring MOPACBase in the MOPAC step.

class orca_step.orca_base.ORCABase(flowchart=None, title='', extension=None, module=None, logger=<Logger seamm.node (WARNING)>, uid=None)[source]#

Bases: Node

Common functionality for ORCA nodes.

create_parser()[source]#

Set up the command-line / seamm.ini parser for the ORCA step.

All ORCA nodes share the [orca-step] section (step_type), so the options are registered once here.

geometry_block(configuration, charge, multiplicity, atom_indices=None, ghost_atoms=None)[source]#

Return the ORCA coordinate block for configuration.

Parameters:
  • atom_indices (Sequence[int] | None) – 0-based atom indices to include, in this order. None (the default) is every atom, in the configuration’s own order – a BSSE sub-job passes a fragment’s (sub-)list instead.

  • ghost_atoms (Container[int] | None) – The subset of atom_indices to write as ORCA ghost centres (the element symbol with a trailing :, e.g. O: – basis functions only, no nucleus/electrons). None/empty writes every atom as real.

property git_revision#

The git version of this module.

property is_runable#

Whether this node actually runs (vs. only contributing input).

orca_job_task(keyword_line, configuration, charge, multiplicity, atom_indices=None, ghost_atoms=None, directory=None, extra_blocks='', extra_files=None, make_wfx=False, key='orca', sthresh_retry=None)[source]#

The seamm_exec.Task that run_orca_job() runs, built without running it, so that a step can run several at once (a BSSE correction’s sub-jobs) in one TaskSet. key names it in that TaskSet; the other arguments are those of run_orca_job().

record_timing(task, result, run_directory, configuration, charge, multiplicity, atom_indices=None, ghost_atoms=None)[source]#

Append this ORCA run’s timing record (~/.seamm.d/timing/orca.csv) – the common columns from the task layer, the descriptors from timing_descriptors(). Never raises; a restored result is not recorded, nor a run retried with a larger SThresh (its time is that of two runs). See seamm_exec’s campaign of 2026-10-05.

run_orca(keyword_line, extra_blocks='', extra_files=None, make_wfx=False, sthresh_retry=None)[source]#

Write the ORCA input for the node’s own configuration, run ORCA, and return the parsed results.

A thin wrapper around run_orca_job() for the common case: the whole of the node’s own system, at its own charge/multiplicity, in the node’s own directory. See run_orca_job() for a sub-job against an explicit geometry/charge/multiplicity/directory (e.g. one of a BSSE correction’s counterpoise sub-jobs).

Parameters:
  • keyword_line (str) – The contents of the ORCA “!” simple-input line (without the “!”).

  • extra_blocks (str) – Any additional % blocks to place before the geometry.

  • extra_files (dict | None) – Extra input files to write into the run directory (e.g. an external basis file referenced by %basis GTOName ... end).

  • make_wfx (bool or "all") – After ORCA finishes, run orca_2aim (shipped alongside ORCA) to convert the density (retained by the keepdensity keyword) into an AIMPAC orca.wfx wavefunction file for a following Atomic Charges step. Requires the ORCA input to include keepdensity. “all” writes every orbital (-useall), as natural orbitals need.

  • sthresh_retry (float | None) – The SThresh to rerun a failed SCF with; see run_orca_job().

Returns:

Parsed results, at least {"energy": <E_h>, "success": bool}.

Return type:

dict

run_orca_compound(compound_block, extra_files=None, engrad='result.engrad', make_wfx=False, wfx_step='orca_Compound_5')[source]#

Write and run an ORCA Compound job, returning (energy, gradient).

Unlike run_orca (a single ! keywords + inline geometry job), a Compound job runs several calculations from a script and writes its own result. The %pal/%maxcore preamble is emitted here (applying to every sub-calculation); the caller supplies the %Compound ... end block and any files it references (the .cmp script, the geometry).

Parameters:
  • compound_block (str) – The %Compound "..." ... end block for orca.inp.

  • extra_files (dict | None) – Files the Compound job reads (e.g. {"bssegradient.cmp": ..., "bsse.xyz": ...}), written into the run directory.

  • engrad (str | None) – The EnGrad file the Compound writes with the final energy and gradient. Pass None for an energy-only job that writes no EnGrad (e.g. a method with no analytic gradient); then (None, None) is returned and the caller gets the energy elsewhere.

Returns:

The energy (E_h) and gradient ([n_atoms][3], E_h/bohr) from the Compound’s EnGrad file, or (None, None) when engrad is None.

Return type:

tuple(float | None, list | None)

run_orca_job(keyword_line, configuration, charge, multiplicity, atom_indices=None, ghost_atoms=None, directory=None, extra_blocks='', extra_files=None, make_wfx=False, sthresh_retry=None)[source]#

Write an ORCA input for an explicit geometry/charge/multiplicity, run ORCA, and return the parsed results.

The primitive run_orca and a BSSE counterpoise correction’s per-fragment sub-jobs both drive: geometry/charge/multiplicity come from arguments instead of self.get_system_configuration()/ self.directory, since a BSSE sub-job is a different atom subset (and, for a ghost-augmented fragment, a different charge) than the node’s own system, run in its own sub-directory so the 2N + 1 jobs of one BSSE correction do not collide.

Parameters:
  • keyword_line (str) – The contents of the ORCA “!” simple-input line (without the “!”).

  • configuration (molsystem.Configuration) – The system to take atoms/coordinates from.

  • charge (int) – The charge/multiplicity for this job – not necessarily configuration.charge/configuration.spin_multiplicity (a BSSE fragment sub-job has its own).

  • multiplicity (int) – The charge/multiplicity for this job – not necessarily configuration.charge/configuration.spin_multiplicity (a BSSE fragment sub-job has its own).

  • atom_indices (Sequence[int] | None) – 0-based atom indices to include, in this order. None (the default) is every atom, in the configuration’s own order.

  • ghost_atoms (Container[int] | None) – The subset of atom_indices to write as ORCA ghost centres. See geometry_block().

  • directory (str | Path | None) – Where to run this job. None (the default) is self.directory – the node’s own job directory, as run_orca uses.

  • extra_blocks (str) – Any additional % blocks to place before the geometry.

  • extra_files (dict | None) – Extra input files to write into the run directory.

  • make_wfx (bool) – After ORCA finishes, run orca_2aim to convert the retained density into an AIMPAC orca.wfx in this job’s directory.

  • sthresh_retry (float | None) – If the SCF fails with the overlap nearly singular, run ORCA again with this SThresh (see sthresh_retry_command()). None: no retry.

Returns:

Parsed results, at least {"energy": <E_h>, "success": bool}.

Return type:

dict

property version#

The semantic version of this module.

orca_step.orca_base.double_hybrid_scf(keyword_line)[source]#

(keyword_line, note): the ‘!’ line of a calculation with an MP2 part (a double hybrid, or MP2 itself) with its SCF convergence raised to DOUBLE_HYBRID_GRADIENT_SCF, and a note saying so (None if nothing changed).

The MP2 part is not variational in the orbitals, so the SCF’s convergence error enters the correlation energy at first order: with TightSCF, revDSD energies of isolated molecules are off by about 0.05-0.1 kJ/mol, an error that does not cancel between monomers and clusters (science, 2026-10-05/16), and ORCA 6.1.1 gets about 0.8 % of double-hybrid gradients with exact exchange wrong, their forces not summing to zero by up to 1.55 eV/Å (2026-10-09). VeryTightSCF fixes both at 2-17 % more time. Every such calculation gets it – energies as well as gradients (science, 2026-11-08), with exact exchange or not – so that all the species of one reaction or many-body expansion share one SCF setting. A tighter preset (EXTREMESCF) is kept. Without a leading ‘!’.

orca_step.orca_base.engrad_gradient(text)[source]#

The gradient (E_h/bohr) of every centre in an orca.engrad file, ghosts included, as [[gx, gy, gz], ...], or None if it cannot be read.

orca_step.orca_base.estimated_basis_functions(basis, atomic_numbers)[source]#

The number of (spherical) basis functions basis gives these atoms, counted from the Basis Set Exchange’s definition when it has the basis, else from a double-zeta-plus-polarization estimate. Ghost centres count like atoms. Cached per basis and element.

orca_step.orca_base.gradient_batching_problem(output_text, keyword_line='')[source]#

Why an ORCA gradient in output_text cannot be trusted, or None.

ORCA 6.1.1 computes the RI-MP2 / double-hybrid gradient wrongly – the energy is unchanged to the last digit – whenever %maxcore makes it split the gradient’s MO loop into more than one batch (“Number of batches necessary … N” with N > 1 in the output). Seen with exact exchange (NoCOSX, which this step chooses for Na, Mg, Zn, B and P): 417 meV/Å rms on Na+(H2O)6 at revDSD/def2-TZVPPD with 4 batches, forces ~2 eV/Å wrong on 35-atom clusters (2026-10-06). A RIJCOSX run does not print the section. The remedy is more memory per process: fewer ranks, a larger %maxcore.

orca_step.orca_base.method_class(method=None, keyword_line='')[source]#

The class of a method, for the timing records: HF, a DFT category from the step’s metadata (local, GGA, meta-GGA, global hybrid, range-separated hybrid, global double-hybrid, range-separated double-hybrid), MP2, DLPNO-CC, CC, semiempirical, or "" if it cannot be told.

method is the step’s method name (B3LYP, DLPNO-CCSD(T), …); when it is not known the ‘!’ line is scanned instead.

orca_step.orca_base.net_force_problem(gradient, output_text='')[source]#

Why a gradient that is not translation-invariant cannot be trusted, or None. gradient is every centre’s (ghosts included) in E_h/bohr; output_text the run’s orca.out, which says whether RIJCOSX was used.

orca_step.orca_base.predicted_seconds(keyword_line, atomic_numbers, *, ghost_numbers=(), model=None, basis=None, charge=0, multiplicity=1, ntasks=1, quantile=0.5, neighbours=None, with_source=False)[source]#

The expected time of an ORCA run, from the fitted cost model when there is one (seamm_exec.timing_model.predict), else estimated_seconds().

The task layer adds its own margin to a task’s estimated_seconds (the bundle walltime is twice the estimate plus ten minutes), so the median is returned by default; ask for quantile=0.95 for a figure to submit as is. The descriptors are those the run’s record will carry, with the basis functions estimated from the basis and the atoms (ghosts included).

Parameters:
  • keyword_line (str) – The ‘!’ line.

  • atomic_numbers (sequence of int) – The real atoms.

  • ghost_numbers (sequence of int) – The ghost centres’ atomic numbers (basis functions, no electrons).

  • model (str, optional) – The type@method/basis string; the method and basis come from it unless basis is given.

  • neighbours (float, optional) – The mean number of atoms within 8 Å of each centre, as the timing record carries it (_neighbours()). The model needs every size variable it was fitted with, so without this a model that uses it gives no prediction and the hand estimate is used.

  • with_source (bool) – Return (seconds, source), the source being "model" or "formula" for seamm_exec.Task.estimate_source; when it is the formula, seamm_exec logs why the model was not used (once per reason).

orca_step.orca_base.task_kind(keyword_line)[source]#

What kind of calculation an ORCA ‘!’ line asks for, for the timing records: numfreq, freq, opt, numgrad, gradient or energy (the most expensive that applies).

orca_step.orca_base.tidy_keyword_line(keyword_line)[source]#

Remove repeated and conflicting keywords from an ORCA ‘!’ line.

ORCA refuses a keyword given twice, ignoring case (e.g. the ‘TIGHTSCF’ from the SCF convergence setting plus a ‘TightSCF’ in the extra keywords). An exact repeat is dropped. Of several presets from one family (SCF convergence, integration grid) only the last is kept: the extra keywords come last, so a preset typed there overrides the setting.

Returns:

The tidied line, and a note for each preset that was overridden.

Return type:

(str, [str])

orca_step.orca_base.timing_descriptors(input_text, output_text, *, model=None, n_atoms=None, n_heavy=None, n_ghosts=0, charge=None, multiplicity=None)[source]#

The descriptors of an ORCA run for its timing record: the numbers a cost model is fitted to (see the seamm_exec campaign of 2026-10-05).

Parameters:
  • input_text (str or None) – orca.inp: the ‘!’ line, %pal and %maxcore.

  • output_text (str or None) – orca.out: electrons, basis functions, SCF runs and cycles, ORCA’s own run time.

  • model (str, optional) – The step’s type@method/basis string, for the method and basis.

  • n_atoms (optional) – Of the system as run (ghosts not counted in the atoms).

  • n_heavy (optional) – Of the system as run (ghosts not counted in the atoms).

  • n_ghosts (optional) – Of the system as run (ghosts not counted in the atoms).

  • charge (optional) – Of the system as run (ghosts not counted in the atoms).

  • multiplicity (optional) – Of the system as run (ghosts not counted in the atoms).

orca_step.orca_step module#

Stevedore helper for the main ORCA node.

orca_step.orca_step.F12_MODEL_CHEMISTRIES = {'CCSD(T)-F12D/RI': {'bases': {'cc-pVTZ-F12': 'cc-pVQZ/C'}, 'blocks': (), 'method': 'CCSD(T)-F12D/RI', 'words': ''}, 'DLPNO-CCSD(T)-F12D(TightPNO,TCutPNO=1e-8)': {'bases': {'cc-pVTZ-F12': 'cc-pVQZ/C'}, 'blocks': ('%mdci TCutPNO 1e-8 end',), 'method': 'DLPNO-CCSD(T)-F12D', 'words': 'TightPNO'}}#

method -> {F12 orbital basis: its RI fitting basis}. The CABS is always <basis>-CABS. Only combinations validated in production are offered: CCSD(T)-F12D/RI with cc-pVTZ-F12 and cc-pVQZ/C is thermo’s canonical F12 (part A, 2026-10-30; the fragment store’s rows from jobs 5608-5620 have exactly these settings).

Type:

The explicitly-correlated (F12) model chemistries offered

class orca_step.orca_step.ORCAStep(flowchart=None, gui=None)[source]#

Bases: object

Helper class for the stevedore integration of the ORCA step.

classmethod analyze_task(result, model_chemistry, configuration, **kwargs)[source]#

The energy (kJ/mol) and gradients (kJ/mol/Å) of a finished task from get_task(). See orca_step.batch.

classmethod can_run_task(configuration, model_chemistry, **kwargs)[source]#

Whether get_task() can run this structure (molecules only).

create_node(flowchart=None, **kwargs)[source]#

Return a new ORCA node.

create_tk_node(canvas=None, **kwargs)[source]#

Return a new graphical ORCA node.

description()[source]#

Return a description of what this step does.

classmethod expected_fingerprints(configuration, model_chemistry, **kwargs)[source]#

The settings fingerprints a calculation of this structure would record, without running it (one, or two when NoCOSX may be moot). See orca_step.batch.expected_fingerprints().

classmethod get_executor_config(executor, seamm_options)[source]#

How to launch ORCA (and its MDI engine) on this machine.

Reads <root>/orca.ini for the current executor to find the orca binary (falling back to the PATH), and adds mdi_script – the absolute path to the bundled data/orca_mdi.py engine. That script imports only packages present in the SEAMM environment (pymdi, numpy, seamm_util) and runs the orca binary itself, so no separate conda environment is needed.

classmethod get_mdi_engine_command(executor, seamm_options, *, method, basis=None, port, hostname='localhost', charge=0, multiplicity=1, n_atoms=None, ncores=1, engine_name='ORCA', extra_args=None, precision=None)[source]#

Build the argv that launches the ORCA MDI engine over TCP.

The transport (TCP, port, hostname) is decided by the driver and passed in; everything ORCA-specific – the bundled orca_mdi.py, the orca binary, and the method/basis/charge/multiplicity flags – is supplied here so the driver hardwires no ORCA knowledge. method should be the real ORCA keyword (the mdi_method_arg from get_model_chemistry_options(), not an aliased functional name). A DLPNO double hybrid is launched as its parent functional plus the engine’s --dlpno flag. precision="tight" adds VeryTightSCF (unless the method words already set the SCF convergence), for finite differences of gradients or Hessians: each SCF starts from the previous geometry’s orbitals, and a loosely converged one leaves noise that depends on that geometry (2026-11-05). It also adds NoCOSX, for exact exchange without COSX’s grid noise (see tight_exchange_words()).

classmethod get_model_chemistry_options(periodic_only=False, mdi_only=False)[source]#

Return the model chemistries ORCA can provide.

Advertises ORCA:<type>@<method>/<basis> for each method in the metadata paired with a curated set of basis sets. ORCA is molecular, so periodic_only returns nothing. mdi_only keeps only the methods drivable through the orca_mdi.py engine – those with an analytic gradient (the engine always requests EnGrad); each such option carries the real ORCA keyword and basis in mdi_method_arg/mdi_basis_arg.

classmethod get_task(configuration, model_chemistry, **kwargs)[source]#

A task computing ORCA’s energy (and gradient) for one structure: the batch half of the Model Chemistry contract. See orca_step.batch.

my_description = {'description': 'An interface for ORCA', 'group': 'Simulations', 'name': 'ORCA'}#
classmethod thermochemistry_reference(model_chemistry)[source]#

(code, method, settings) under which SEAMM’s thermochemistry database holds the atomic references for a model chemistry – the same lookup the Energy sub-step’s own DfE0 uses, for steps such as the MBE step that put ORCA energies on the DfE0 scale.

A DLPNO double hybrid uses its canonical parent’s atoms: DLPNO cannot run H at all (“no pairs to be correlated”), the DLPNO effect on an isolated atom is under 0.07 kJ/mol, and a molecule’s DLPNO error is not a sum of atomic ones. The method is in its model-chemistry spelling (/ as _), as the reference runs were tagged, and the basis without a bse: prefix.

orca_step.orca_step.dlpno_parent(method)[source]#

The canonical double-hybrid ORCA keyword behind a DLPNO pseudo-functional (e.g. REVDSD-PBEP86-D4/2021 for DLPNO-REVDSD-PBEP86-D4/2021), or None if method is not one. See the DLPNO note in metadata.py.

orca_step.orca_step.f12_variant(method)[source]#

The F12 model chemistry for a method name (advertised or un-aliased), or None: its ORCA keyword, extra ‘!’ words, ‘%’ blocks and bases.

orca_step.orca_step.full_orca_path(code)[source]#

The full path of the ORCA executable, which ORCA must be invoked by.

A bare name such as orca (from orca.ini, or empty to mean the PATH) is looked up on the PATH; anything else is returned unchanged. Returns “” if ORCA cannot be found.

orca_step.orca_step.mc_method_alias(functional)[source]#

A model-chemistry-safe spelling of a DFT functional keyword.

The model-chemistry grammar reserves / (it separates method from basis), so functionals whose ORCA keyword contains / – e.g. REVDSD-PBEP86-D4/2021 – cannot appear literally in a model-chemistry string. They are advertised with / replaced by _ (no ORCA functional keyword contains _, so this round-trips) and translated back to the real keyword when the ORCA step consumes the model chemistry (see Energy._method_basis_from_model_chemistry).

orca_step.orca_step.mc_method_unalias(method)[source]#

Inverse of mc_method_alias(): the real ORCA functional keyword for a (possibly aliased) model-chemistry method, or the method unchanged if it is not an aliased functional.

orca_step.orca_step.method_has_analytic_hessian(method)[source]#

Whether ORCA has an analytic Hessian for method (a functional or a QC method keyword).

Double hybrids, MP2 and RI-MP2 have an analytic gradient but NO analytic Hessian (they need NumFreq); (DLPNO-)CCSD(T) and the non-self-consistent double hybrids have neither. HF and the ordinary DFT functionals have an analytic Hessian. Used to decide whether the MDI engine should advertise <HESSIAN.

orca_step.orca_step.orca_method_blocks(method)[source]#

Any ‘%’ input blocks method itself requires (’’ if none): a DLPNO double hybrid needs %mp2 DLPNO true end.

orca_step.orca_step.orca_method_keyword(method)[source]#

The keyword to put on ORCA’s ‘!’ line for method: the parent functional for a DLPNO double hybrid (whose DLPNO-ness goes in a ‘%mp2’ block, see orca_method_blocks()), otherwise method unchanged.

orca_step.orca_step.split_dispersion(method)[source]#

(functional, keyword) for a model-chemistry method with a dispersion correction – “<functional>-D4”, “<functional>-D3ZERO” or “<functional>-D3BJ” for a functional in D4_FUNCTIONALS or D3_FUNCTIONALS – otherwise (method, ""). Case-insensitive; the functional comes back as ORCA spells it. ORCA’s own functionals win: WB97X-D4 is ORCA’s keyword, not WB97X plus D4.

orca_step.orca_step.tight_exchange_words(words)[source]#

words (ORCA ‘!’ keywords) plus NOCOSX, unless they already choose an exchange scheme.

For precision="tight", i.e. finite differences of gradients or Hessians: COSX evaluates the exchange on a grid that moves with the atoms, and the noise it leaves in the gradients (up to 18 meV/Å net force in sound double-hybrid gradients) is magnified in the force constants. Exact exchange leaves none. It does not change a method without exact exchange (GGAs, meta-GGAs), and an exchange scheme already in words (e.g. RIJCOSX in the extra keywords) is kept.

orca_step.resolver module#

Resolve ORCA on the machine that runs it (seamm_exec’s resolver hook).

A task names the program orca and a bare command ({code} orca.inp > ...); where it runs, seamm_exec reads the [local] section of that machine’s <root>/orca.ini and calls resolve() with the task’s share of the machine. This does there what the ORCA step used to do in the evaluator: ORCA must be invoked by its full path, and a parallel run needs the OpenMPI it was built against on the paths (see orca_step.orca_base.mpi_env()).

Registered as the entry point orca in org.molssi.seamm.exec.resolvers.

orca_step.resolver.resolve(config, cmd, env, ce, root)[source]#

(config, cmd, env) for running ORCA here.

Parameters:
  • config (dict) – This machine’s orca.ini section (empty if there is none).

  • cmd ([str]) – The task’s command template.

  • env (dict) – The task’s extra environment.

  • ce (dict) – The task’s computational environment (NTASKS, …).

  • root (str or Path) – The SEAMM root holding orca.ini.

orca_step.tk_bsse module#

The graphical part of an ORCA BSSE (counterpoise) sub-step.

class orca_step.tk_bsse.TkBSSE(tk_flowchart=None, node=None, canvas=None, x=None, y=None, w=200, h=50)[source]#

Bases: TkEnergy

Graphical ORCA BSSE sub-step: the energy dialog’s level-of-theory controls plus the fragment definition and the monomer-optimization switch. The Energy property toggles (bond orders, Hirshfeld, polarizability) and SThresh are not shown – they are not plumbed through the per-fragment BSSE job set. ‘Write the wavefunction (wfx) file’ (for a following Atomic Charges step) IS shown – see _run_detail_keys below.

create_dialog(title='ORCA BSSE')[source]#

Build the dialog and make the fragment controls reactive: the ‘Fragment atoms’ field is shown only when the fragments are ‘specified’.

orca_step.tk_energy module#

The graphical part of an ORCA Energy sub-step.

class orca_step.tk_energy.TkEnergy(tk_flowchart=None, node=None, canvas=None, x=None, y=None, w=200, h=50)[source]#

Bases: TkNode

The graphical part of an ORCA Energy sub-step.

See also

Energy, EnergyParameters

create_dialog(title='ORCA Energy')[source]#

Create the dialog and its widgets.

reset_dialog(widget=None)[source]#

Lay out the widgets. Hide the explicit method/basis controls when the model chemistry is used; for DFT, show the functional-type and functional pulldowns indented one and two levels under Method, mirroring Gaussian.

reset_functionals(widget=None)[source]#

Re-filter the functional list when the functional type changes.

right_click(event)[source]#

Post the node’s popup menu. The base class builds the menu (with the Delete command) but only shows it for the bare TkNode, so each sub-step must add its own items and pop it up – without this, right-clicking a sub-step in the ORCA sub-flowchart shows no menu (so it can’t be deleted). Inherited by the Optimization and BSSE sub-steps.

orca_step.tk_frequencies module#

The graphical part of an ORCA Frequencies sub-step.

class orca_step.tk_frequencies.TkFrequencies(tk_flowchart=None, node=None, canvas=None, x=None, y=None, w=200, h=50)[source]#

Bases: TkEnergy

Graphical ORCA Frequencies sub-step: the energy dialog’s level-of-theory controls plus the second-derivative choice, the thermochemistry temperature, and the standard structure-handling options (where to store the structure and its properties). CBS extrapolation is hidden (an extrapolated energy has no Hessian); the Energy property toggles are not shown.

reset_dialog(widget=None)[source]#

Lay out the energy controls, then the structure-handling options.

orca_step.tk_optimization module#

The graphical part of an ORCA Optimization sub-step.

class orca_step.tk_optimization.TkOptimization(tk_flowchart=None, node=None, canvas=None, x=None, y=None, w=200, h=50)[source]#

Bases: TkEnergy

Graphical ORCA Optimization sub-step: the energy dialog plus the optimization-convergence control.

create_dialog(title='ORCA Optimization')[source]#

Create the dialog and its widgets.

reset_dialog(widget=None)[source]#

Lay out the widgets. Hide the explicit method/basis controls when the model chemistry is used; for DFT, show the functional-type and functional pulldowns indented one and two levels under Method, mirroring Gaussian.

orca_step.tk_orca module#

The graphical part of the main ORCA node: a sub-flowchart editor.

class orca_step.tk_orca.TkORCA(tk_flowchart=None, node=None, namespace='org.molssi.seamm.orca.tk', canvas=None, x=None, y=None, w=200, h=50)[source]#

Bases: TkNode

Graphical ORCA node. Opens a sub-flowchart canvas where ORCA capabilities (Energy, Optimization, …) are added, mirroring the Gaussian/MOPAC steps.

create_dialog()[source]#

Create the dialog holding the sub-flowchart editor.

right_click(event)[source]#

Add an ‘Edit…’ entry to the right-click menu.

Module contents#

orca_step A SEAMM plug-in for ORCA, with a sub-flowchart of capabilities (Energy, Optimization, …), modeled on the MOPAC and Gaussian steps.