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).
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:
RuntimeErrorA 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
taskthat produced the result, its timing record is appended too (seamm_exec.record_task_timing), as the ORCA step’s own runs do.
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:
EnergyA 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.
- 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:
EnergyParametersThe 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.
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:
ORCABaseA 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_thermochemistryreference database – the ORCA counterpart ofgaussian_step.Substep.calculate_energy_of_formation, extended with temperature-dependent enthalpy/Gibbs energy of formation.Always computes
data["E atomization"]anddata["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 computesdata["DfHT"]anddata["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_thermochemistryisn’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
- 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_methodindata/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.
- 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 endfor a DLPNO double hybrid, whose ‘!’ keyword is the parent functional (seeorca_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 byrun_orca.
- 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
directoryfrom 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:
ParametersThe 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.
- 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', 'B97-3C', 'BLYP', 'BP86', 'GLYP', 'MPWLYP', 'MPWPW', 'OLYP', 'PBE', 'PW91', 'PWP', 'REVPBE', 'RPBE', 'RPW86PBE', 'XLYP', 'B97M-D3BJ', 'B97M-D4', 'B97M-V', 'M06L', 'R2SCAN', 'R2SCAN-3C', 'REVTPSS', 'RSCAN', 'SCANFUNC', 'TPSS', 'B1LYP', 'B1P86', 'B3LYP', 'B3LYP-3C', 'B3LYP/G', 'B3P86', 'B3PW91', 'BHANDHLYP', 'M06', 'M062X', 'MPW1LYP', 'MPW1PW', 'O3LYP', 'PBE0', 'PBEH-3C', '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-3C', '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', 'CCSD(T)', 'DLPNO-CCSD(T)', 'CCSD(T)-F12D/RI', 'DLPNO-CCSD(T)-F12D', 'DFT'), '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 double hybrid's gradient (forces, optimization, numerical frequencies) always runs with at least VERYTIGHTSCF: with TIGHTSCF ORCA 6.1.1 computes some of them 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'}}#
- renamed_methods = {'CCSD(T)-F12D': 'CCSD(T)-F12D/RI'}#
- unused = ()#
Parameters that this kind of step never uses.
orca_step.energy_step module#
Stevedore helper for the ORCA Energy sub-step.
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:
EnergyA 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.
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:
EnergyParametersThe 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, most DFT functionals, MP2), 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 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.
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).
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:
EnergyA geometry optimization with ORCA.
See also
TkOptimization,OptimizationParameters,Energy
orca_step.optimization_parameters module#
Control parameters for an ORCA geometry optimization.
- class orca_step.optimization_parameters.OptimizationParameters(defaults={}, data=None)[source]#
Bases:
EnergyParametersOptimization 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.
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:
ORCABaseThe 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
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:
NodeCommon 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.Taskthatrun_orca_job()runs, built without running it, so that a step can run several at once (a BSSE correction’s sub-jobs) in oneTaskSet.keynames it in thatTaskSet; the other arguments are those ofrun_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 fromtiming_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. Seerun_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 thekeepdensitykeyword) into an AIMPACorca.wfxwavefunction file for a following Atomic Charges step. Requires the ORCA input to includekeepdensity. “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/%maxcorepreamble is emitted here (applying to every sub-calculation); the caller supplies the%Compound ... endblock and any files it references (the.cmpscript, the geometry).- Parameters:
compound_block (str) – The
%Compound "..." ... endblock fororca.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
Nonefor 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)whenengradis 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_orcaand a BSSE counterpoise correction’s per-fragment sub-jobs both drive: geometry/charge/multiplicity come from arguments instead ofself.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) isself.directory– the node’s own job directory, asrun_orcauses.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_2aimto convert the retained density into an AIMPACorca.wfxin 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): a double-hybrid gradient’s ‘!’ line with its SCF convergence raised toDOUBLE_HYBRID_GRADIENT_SCF, and a note saying so (None if nothing changed).With TightSCF, ORCA 6.1.1 gets about 0.8 % of double-hybrid gradients with exact exchange wrong – their forces do not sum to zero, by up to 1.55 eV/Å – and VeryTightSCF fixes them at 2-17 % more time (science, 2026-10-09). Every double-hybrid gradient gets it, not just those with exact exchange, so that the fragments of one 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.engradfile, 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
basisgives 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_textcannot 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
%maxcoremakes 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.methodis 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.
gradientis every centre’s (ghosts included) in E_h/bohr;output_textthe 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), elseestimated_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 forquantile=0.95for 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/basisstring; the method and basis come from it unlessbasisis 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"forseamm_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,gradientorenergy(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,%paland%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/basisstring, 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.
- class orca_step.orca_step.ORCAStep(flowchart=None, gui=None)[source]#
Bases:
objectHelper 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(). Seeorca_step.batch.
- classmethod can_run_task(configuration, model_chemistry, **kwargs)[source]#
Whether
get_task()can run this structure (molecules only).
- classmethod get_executor_config(executor, seamm_options)[source]#
How to launch ORCA (and its MDI engine) on this machine.
Reads
<root>/orca.inifor the current executor to find theorcabinary (falling back to the PATH), and addsmdi_script– the absolute path to the bundleddata/orca_mdi.pyengine. That script imports only packages present in the SEAMM environment (pymdi, numpy, seamm_util) and runs theorcabinary itself, so no separate conda environment is needed.
- classmethod get_mdi_engine_command(executor, seamm_options, *, method, basis='def2-SVP', port, hostname='localhost', charge=0, multiplicity=1, n_atoms=None, ncores=1, engine_name='ORCA', extra_args=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 bundledorca_mdi.py, the orca binary, and the method/basis/charge/multiplicity flags – is supplied here so the driver hardwires no ORCA knowledge.methodshould be the real ORCA keyword (themdi_method_argfromget_model_chemistry_options(), not an aliased functional name). A DLPNO double hybrid is launched as its parent functional plus the engine’s--dlpnoflag.
- 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, soperiodic_onlyreturns nothing.mdi_onlykeeps only the methods drivable through theorca_mdi.pyengine – those with an analytic gradient (the engine always requests EnGrad); each such option carries the real ORCA keyword and basis inmdi_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 abse: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/2021forDLPNO-REVDSD-PBEP86-D4/2021), or None if method is not one. See the DLPNO note inmetadata.py.
- 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 (seeEnergy._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 have an analytic gradient but NO analytic Hessian (they need NumFreq); (DLPNO-)CCSD(T) and the non-self-consistent double hybrids have neither. Everything else with an analytic gradient (HF, MP2, the ordinary DFT functionals) has 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, "D4")for a “<functional>-D4” model-chemistry method whose functional is inD4_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.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.inisection (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:
TkEnergyGraphical 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_keysbelow.
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:
TkNodeThe graphical part of an ORCA Energy sub-step.
See also
Energy,EnergyParameters- 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:
TkEnergyGraphical 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.
orca_step.tk_optimization module#
The graphical part of an ORCA Optimization sub-step.
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:
TkNodeGraphical ORCA node. Opens a sub-flowchart canvas where ORCA capabilities (Energy, Optimization, …) are added, mirroring the Gaussian/MOPAC steps.
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.