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.

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)[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.

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.

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 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.

static single_center_keywords(keyword_line, n_centers)[source]#

‘NoCOSX’ for a one-center job (a lone atom or bare atomic ion), else ‘’.

ORCA 6.1.1 with its default RIJCOSX exchange mis-builds the d-type virtual orbitals of some lone atoms when the SCF starts from scratch: the SCF energy is right, but the MP2 part of a double hybrid is off by ~5 kJ/mol (Na 5.0, Na+ 4.9, Mg 4.6), with no warning. Exact exchange (NoCOSX) is right and cheap for one center. Ghost atoms count as centers, so only a bare fragment qualifies. An exchange scheme the user already chose is respected.

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.

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', 'none', 'def2/J', 'def2/JK'), '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.", 'kind': 'enum'}, '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 or in tables.', 'kind': 'dictionary'}, '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.", '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 SCF convergence threshold ('SThresh' in the '%scf' block), in E_h. 'default' emits nothing, so the SCF-convergence preset above (or ORCA's own default) governs SThresh. Any explicit value -- e.g. ORCA's nominal 1.0e-07 -- is written to '%scf SThresh', overriding whatever the preset would otherwise set. Lower it for a tighter SCF (smoother energies/forces), raise it to converge more loosely.", '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'}}#
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.

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.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, 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')#

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.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.

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')[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().

run_orca(keyword_line, extra_blocks='', extra_files=None, make_wfx=False)[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) – 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.

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)[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.

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.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_step module#

Stevedore helper for the main ORCA node.

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 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='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 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.

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'}#
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.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 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 in D4_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.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.