psi4_step package#
Submodules#
psi4_step.bsse module#
The Psi4 counterpoise (BSSE) sub-step.
Computes the counterpoise-corrected (Boys–Bernardi) energy and gradient of
an N-fragment complex, with independent per-fragment charge, as a thin
wrapper around Psi4’s own native N-fragment counterpoise driver
(bsse_type=['cp', 'nocp'] on energy()/gradient()). Unlike
orca_step’s BSSE sub-step, this does not use
seamm_bsse.generate_job_specs()/combine() – Psi4 already does that
2N + 1-equivalent orchestration internally and hands back an
already-full-cluster-indexed corrected energy/gradient in one call
(confirmed empirically; see the seamm_bsse design doc,
docs/developer_guide/campaigns/2026-08-03/bsse_architecture.rst).
seamm_bsse.Fragment/validate_fragments are reused here only for the
fragment-definition/charge-validation layer, for parameter/GUI consistency
with the ORCA sub-step – generate_job_specs/combine go unused.
Unlike the other psi4_step sub-steps, this one builds its own
fragment-aware, ---separated molecule block: Psi4._convert_structure
reads the single global “current” configuration, with no concept of
fragments/ghosts.
- class psi4_step.bsse.BSSE(flowchart=None, title='BSSE', extension=None, logger=<Logger psi4_step.bsse (WARNING)>)[source]#
Bases:
EnergyA counterpoise (BSSE) correction with Psi4, wrapping its native N-fragment
bsse_typedriver.See also
TkBSSE,BSSEParameters,Energy- analyze(indent='', data=None, out=[], table=None)[source]#
Read the counterpoise-corrected results (written by
get_input()’s Psi4-side code to<self.directory>/bsse.json, since the Psi4 subprocess runs in the shared main node’s directory, not this sub-step’s own) and store/report them.
- description_text(P=None, configuration=None)[source]#
Prepare information about what this node will do
- get_input()[source]#
The Psi4 input for the counterpoise correction: a fragment-aware molecule block, then a
bsse_type=['cp', 'nocp']energy()/gradient()call – Psi4’s native N-fragment counterpoise driver, notseamm_bsse.generate_job_specs()/combine()(whichorca_stepneeds, but Psi4 does not: ‘nocp’ alongside ‘cp’ costs no extra energy evaluations, since both reuse the same underlying 1-body/N-body sub-calculations, and gives the uncorrected total/interaction energies orca_step also reports).
psi4_step.bsse_parameters module#
Control parameters for the Psi4 BSSE (counterpoise) sub-step.
Extends the Energy parameters (level of theory) with the fragment definition and per-fragment charges the counterpoise correction needs. Mirrors orca_step’s BSSEParameters (same “fragments”/”fragment atoms”/”fragment charges” grammar), since both sub-steps share seamm_bsse.Fragment/ validate_fragments for parsing/validating the fragment definition.
- class psi4_step.bsse_parameters.BSSEParameters(defaults={}, data=None)[source]#
Bases:
EnergyParametersThe counterpoise (BSSE) parameters: the Energy parameters plus the fragment definition.
- 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.", '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. 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'}}#
- unused = ('spin-restricted', 'use damping', 'damping percentage', 'damping convergence', 'use level shift', 'level shift', 'level shift convergence', 'use soscf', 'soscf starting convergence', 'soscf convergence', 'soscf max iterations', 'soscf print iterations', 'convergence error', 'stability analysis', 'density', 'orbitals', 'selected orbitals')#
Parameters that this kind of step never uses.
psi4_step.bsse_step module#
Stevedore helper for the Psi4 BSSE (counterpoise) sub-step.
psi4_step.derivatives module#
Which Psi4 calculations have analytic gradients, and how the integrals are done.
Psi4 (1.11) picks the code for a gradient from the method, the reference, the
algorithm of the correlation integrals (mp2_type, mp_type or cc_type:
conventional, density fitted or Cholesky decomposed) and qc_module. When no code
fits, Psi4 does not stop: it quietly differentiates energies instead, which for a
correlated method costs many times more – every energy of a Hessian, roughly the
square of the number of coordinates. So the step decides here, writes the options
Psi4 needs, asks for energies explicitly where there is no analytic gradient, and
says so in the output.
The rules follow psi4/driver/procrouting/proc.py (the select_* functions):
conventional CCSD(T):
ccenergy, RHF or UHF, only withqc_module ccenergyset, and all-electron (ccenergyrefuses frozen core);conventional CCSD and EOM-CCSD:
ccenergy, all-electron;conventional MP2, MP2.5, MP3 and LCCD:
occ, RHF or UHF, all-electron;conventional CCD: no gradient (nor energy);
density-fitted MP2, MP2.5, MP3, LCCD, CCD, CCSD and CCSD(T): RHF or UHF, frozen core or not (
dfmp2ordfocc). The step setsqc_module occfor DF-CCSD and DF-CCSD(T), so that the energy comes from the same code as the gradient (Psi4 would otherwise take an RHF energy fromfnocc) and UHF DF-CCSD(T) works at all;Cholesky-decomposed integrals: no analytic gradient for any correlated method;
the orbital-optimized methods: analytic, conventional or density fitted;
HF and DFT: analytic.
- class psi4_step.derivatives.GradientRoute(analytic: bool, options: list = <factory>, reason: str = '')[source]#
Bases:
objectHow Psi4 gets the gradient: analytically or from energies.
- analytic: bool#
- options: list#
- reason: str = ''#
- psi4_step.derivatives.INTEGRAL_CHOICES = {'Cholesky decomposition': 'CD', 'conventional': 'CONV', 'density fitting': 'DF'}#
The step’s choices for the correlation integrals, as Psi4’s values.
- psi4_step.derivatives.MODEL_PREFIX = {'CD': 'CD-', 'CONV': 'CONV-', 'DF': 'DF-'}#
How the model name shows integrals other than the method’s default.
- psi4_step.derivatives.TYPE_KEYWORD = {'ccd': ('cc_type', 'CONV'), 'ccsd': ('cc_type', 'CONV'), 'ccsd(t)': ('cc_type', 'CONV'), 'lccd': ('cc_type', 'CONV'), 'mp2': ('mp2_type', 'DF'), 'mp2.5': ('mp_type', 'DF'), 'mp3': ('mp_type', 'DF'), 'olccd': ('cc_type', 'CONV'), 'omp2': ('mp2_type', 'DF'), 'omp2.5': ('mp_type', 'CONV'), 'omp3': ('mp_type', 'CONV')}#
The Psi4 option that sets each method’s correlation integrals, and its default. (Psi4 treats MP2.5 and MP3 as density fitted unless mp_type is set.)
- psi4_step.derivatives.gradient_route(method, reference, frozen_core, integrals=None)[source]#
The route Psi4 takes to the gradient of
method.- Parameters:
method (str) – Psi4’s name for the method, e.g. “ccsd(t)” or “dft”.
reference (str) – “rhf”, “uhf”, “rohf”, “rks” or “uks”.
frozen_core (bool) – Whether the core orbitals are frozen.
integrals (str, optional) – “CONV”, “DF” or “CD” (see
integral_type()); by default Psi4’s default for the method.
- Return type:
- psi4_step.derivatives.integral_options(method, reference, choice='default', fitting_basis='default')[source]#
The Psi4 ‘set’ lines for the correlation integrals of
method.
- psi4_step.derivatives.integral_type(method, choice='default')[source]#
Psi4’s correlation-integral type for
method: “CONV”, “DF” or “CD”.- Parameters:
method (str) – Psi4’s name for the method.
choice (str) – The step’s setting: “default” (Psi4’s default for the method), “conventional”, “density fitting” or “Cholesky decomposition”.
- Returns:
None for methods without correlation integrals (HF, DFT, …).
- Return type:
str or None
psi4_step.energy module#
Setup and run Psi4
- psi4_step.energy.CLEAN_GRADIENTS = '# Psi4\'s optimize() keeps the previous step\'s scratch files,\n# which can make a correlated gradient wrong: clean them before\n# each gradient (SEAMM, 2026-11-08).\nimport sys as _sys\n_driver = _sys.modules["psi4.driver.driver"]\nif not getattr(_driver.gradient, "_seamm_clean", False):\n _gradient = _driver.gradient\n\n def _clean_gradient(*args, **kwargs):\n core.clean()\n return _gradient(*args, **kwargs)\n\n _clean_gradient._seamm_clean = True\n _driver.gradient = _clean_gradient\n'#
Psi4 1.11’s optimize() does not clean the scratch files between its steps, and a correlated gradient computed with the previous geometry’s files present can be wrong: AE CCSD(T)/cc-pCVTZ (ccenergy) of CH4 by 4.7e-5 Eh/bohr near the minimum, ten times the true gradient (thermo’s job 5652, 2026-11-08). The SCF guess file is kept, so the previous orbitals are still read.
- class psi4_step.energy.Energy(flowchart=None, title='Energy', extension=None, logger=<Logger psi4_step.energy (WARNING)>)[source]#
Bases:
Node- analyze(indent='', data=None, out=[], table=None)[source]#
Parse the output and generating the text output and store the data in variables for other stages to access
- calculate_enthalpy_of_formation(data)[source]#
Calculate the enthalpy of formation from the results of a calculation.
This uses tabulated values of the enthalpy of formation of the atoms for the elements and tabulated energies calculated for atoms with the current method.
- Parameters:
data (dict) – The results of the calculation.
- cc_amplitude_convergence(P)[source]#
Psi4’s r_convergence for the correlated method, or None for Psi4’s own.
- description_text(P=None, calculation_type='Single-point energy', configuration=None)[source]#
Prepare information about what this node will do
- get_input(calculation_type='energy', restart=None)[source]#
Get the input for an energy calculation for Psi4
- property git_revision#
The git version of this module.
- gradient_route(configuration)[source]#
How Psi4 gets this step’s gradients (see psi4_step.derivatives).
- property header#
A printable header for this section of output
- integral_choice(P)[source]#
The setting for the correlation integrals, if it applies, else “default”.
- property model#
The model chemistry
- static reference(method, P, configuration)[source]#
The SCF reference: rhf, rohf or uhf; rks or uks for DFT.
- property version#
The semantic version of this module.
- psi4_step.energy.UNCORRELATED = ('dft', 'hf', 'scf', 'efp')#
Methods without correlation, whose gradients do not need clean scratch files
psi4_step.energy_parameters module#
Global control parameters for Psi4
- psi4_step.energy_parameters.ANALYTIC = 'analytic where available'#
How a step that needs gradients or Hessians gets them (Optimization and Thermochemistry): analytic gradients where Psi4 has them, else finite differences of energies; or finite differences of energies regardless.
- class psi4_step.energy_parameters.EnergyParameters(defaults={}, data=None)[source]#
Bases:
ParametersThe control parameters for the energy.
- applies(key, values=None, _seen=None)[source]#
As seamm.Parameters.applies, plus: the parameters that this kind of step does not use never apply; the frozen-core choice applies only to methods with a frozen core (the correlated ones), and the dispersion correction only to functionals that have dispersion corrections.
- choices(key, values=None)[source]#
The dispersion corrections are those of the functional; CCD needs density-fitted or Cholesky-decomposed integrals.
- implied(values=None)[source]#
A functional implies a dispersion correction it has: if the current one is not available, the first real correction (as the dialog chooses). CCD implies density fitting unless Cholesky decomposition is chosen.
- not_applicable_reason(key, values=None)[source]#
Why a parameter does not apply, for the builder’s messages.
- output = {'density': {'default': 'no', 'default_units': '', 'description': 'Plot total density:', 'enumeration': ('yes', 'no'), 'format_string': '', 'help_text': 'Whether to plot the total charge density.', 'kind': 'boolean'}, 'orbitals': {'default': 'no', 'default_units': '', 'description': 'Plot orbitals:', 'enumeration': ('yes', 'no'), 'format_string': '', 'help_text': 'Whether to plot orbitals.', 'kind': 'boolean'}, 'selected orbitals': {'applies_when': {'orbitals': 'yes'}, 'default': '-1, HOMO, LUMO, +1', 'default_units': '', 'description': 'Selected orbitals:', 'enumeration': ('all', '-1, HOMO, LUMO, +1'), 'format_string': '', 'help_text': 'Which orbitals to plot.', 'kind': 'string'}}#
- parameters = {'CC amplitude convergence': {'default': 'default', 'default_units': '', 'description': 'CC amplitude convergence:', 'enumeration': ('default',), 'format_string': 's', 'help_text': "Convergence of the residuals of the amplitude (and, for gradients, lambda) equations of the correlated method: Psi4's r_convergence. 'default' is Psi4's own (1e-7).", 'kind': 'float'}, 'advanced_functional': {'applies_when': {'advanced_method': ['Kohn-Sham (KS) density functional theory (DFT)']}, 'default': 'B3LYP Hyb-GGA Exchange-Correlation Functional', 'default_units': '', 'description': 'DFT Functional:', 'enumeration': ['B1LYP Hyb-GGA Exchange-Correlation Functional', 'B1PW91 Hyb-GGA Exchange-Correlation Functional', 'B1WC Hyb-GGA Exchange-Correlation Functional', 'B2GPPLYP Double Hybrid Exchange-Correlation Functional', 'B2PLYP Double Hybrid Exchange-Correlation Functional', 'B3LYP Hyb-GGA Exchange-Correlation Functional', 'B3LYP5 Hyb-GGA Exchange-Correlation Functional', 'B3LYPs Hyb-GGA Exchange-Correlation Functional', 'B3P86 Hyb-GGA Exchange-Correlation Functional', 'B3PW91 Hyb-GGA Exchange-Correlation Functional', 'B5050LYP Hyb-GGA Exchange-Correlation Functional', 'B86B95 Hyb-GGA Exchange-Correlation Functional', 'B86BPBE GGA Exchange-Correlation Functional', 'B88B95 Hyb-GGA Exchange-Correlation Functional', 'B97-0 Hyb-GGA Exchange-Correlation Functional', 'B97-1 Hyb-GGA Exchange-Correlation Functional', 'B97-1p Hyb-GGA Exchange-Correlation Functional', 'B97-2 Hyb-GGA Exchange-Correlation Functional', 'B97-3 Hyb-GGA Exchange-Correlation Functional', 'b97-d', 'B97-GGA1 GGA Exchange-Correlation Functional', 'B97-K Hyb-GGA Exchange-Correlation Functional', 'b97m-d3bj', 'B97M-V GGA Exchange-Correlation Functional', 'BB1K Hyb-GGA Exchange-Correlation Functional', 'BHandH Hyb-GGA Exchange-Correlation Functional', 'BHandHLYP Hyb-GGA Exchange-Correlation Functional', 'BLYP GGA Exchange-Correlation Functional', 'BOP GGA Exchange-Correlation Functional', 'BP86 GGA Exchange-Correlation Functional', 'CAM-B3LYP Hyb-GGA Exchange-Correlation Functional', 'CAP0 Hyb-GGA Exchange-Correlation Functional', 'core-dsd-blyp', 'Dispersionless Hybrid Meta-GGA XC Functional', 'Dispersionless Hybrid Meta-GGA XC Functional + d09', 'Dispersionless Hybrid Meta-GGA XC Functional + d10', 'DSD-BLYP SCS Double Hybrid XC Functional', 'DSD-PBEB95 SCS Double Hybrid Meta-GGA XC Functional', 'DSD-PBEP86 SCS Double Hybrid XC Functional', 'DSD-PBEPBE SCS Double Hybrid XC Functional', 'EDF1 GGA Exchange-Correlation Functional', 'EDF2 Hyb-GGA Exchange-Correlation Functional', 'FT97 GGA Exchange-Correlation Functional', 'GAM GGA Minnesota Exchange-Correlation Functional', 'HCTH120 GGA Exchange-Correlation Functional', 'HCTH147 GGA Exchange-Correlation Functional', 'HCTH407 GGA Exchange-Correlation Functional', 'HCTH407P GGA Exchange-Correlation Functional', 'HCTH93 GGA Exchange-Correlation Functional', 'HCTHP14 GGA Exchange-Correlation Functional', 'HCTHP76 GGA Exchange-Correlation Functional', 'hf', 'hf+d', 'Hartree Fock based 3C composite method with minimal basis set, gCP and D3(BJ)', 'HJS-B88 Hyb-GGA Exchange-Correlation Functional', 'HJS-B97X Hyb-GGA Exchange-Correlation Functional', 'HJS-PBE Hyb-GGA Exchange-Correlation Functional', 'HJS-PBE-SOL Hyb-GGA Exchange-Correlation Functional', 'HPBEINT Hyb-GGA Exchange-Correlation Functional', 'HSE03 Hyb-GGA Exchange-Correlation Functional', 'HSE06 Hyb-GGA Exchange-Correlation Functional', 'KSDT Exchange-Correlation Functional', 'KT2 GGA Exchange-Correlation Functional', 'LC-VV10 GGA Exchange-Correlation Functional', 'LRC-WPBE GGA Exchange-Correlation Functional', 'LRC-wPBEh Hyb-GGA Exchange-Correlation Functional', 'M05 Meta-GGA XC Functional', 'Heavily Parameterized Hybrid M05-2X Meta-GGA XC Functional', 'M06 Meta-GGA XC Functional', 'Hybrid M06-2X Meta-GGA XC Functional', 'Minnesota M06-HF Hybrid XC Functional', 'M06-L Meta-GGA XC Functional', 'Minnesota M08-HX Hybrid XC Functional', 'Minnesota M08-SO Hybrid XC Functional', 'M11 Meta-GGA XC Functional', 'M11-L Meta-GGA XC Functional', 'MB3LYP-RC04 Hyb-GGA Exchange-Correlation Functional', 'MGGA_MS0 Meta-GGA XC Functional', 'MGGA_MS1 Meta-GGA XC Functional', 'MGGA_MS2 Meta-GGA XC Functional', 'MGGA_MS2h Hybrid Meta-GGA XC Functional', 'MGGA_MVS Meta-GGA XC Functional', 'MGGA_MV2h Hybrid Meta-GGA XC Functional', 'MN12-L Meta-GGA XC Functional', 'MN12-SX Meta-GGA Hybrid Screened Exchange-Correlation Functional', 'MN15 Hybrid Meta-GGA Exchange-Correlation Functional', 'MN15-L Meta-GGA XC Functional', 'MOHLYP GGA Exchange-Correlation Functional', 'MOHLYP2 GGA Exchange-Correlation Functional', 'mPW1B95 Hyb-GGA Exchange-Correlation Functional', 'mPW1K Hyb-GGA Exchange-Correlation Functional', 'mPW1LYP Hybrid GGA Exchange-Correlation Functional', 'mPW1PBE Hybrid GGA Exchange-Correlation Functional', 'mPW1PW Hyb-GGA Exchange-Correlation Functional', 'mPW3LYP Hyb-GGA Exchange-Correlation Functional', 'mPW3PW Hyb-GGA Exchange-Correlation Functional', 'mPWB1K Hyb-GGA Exchange-Correlation Functional', 'mPWLYP1M Hyb-GGA Exchange-Correlation Functional', 'mPWLYP1W GGA Exchange-Correlation Functional', 'mPWPW GGA Exchange-Correlation Functional', 'N12 nonseparable GGA Exchange-Correlation Functional', 'N12-SX Hybrid nonseparable GGA Exchange-Correlation Functional', 'O3LYP Hyb-GGA Exchange-Correlation Functional', 'oblyp-e', 'PBE GGA Exchange, One-parameter Progressive correlation Functional', 'opbe-d', 'opwlyp-d', 'otpss-d', 'PBE GGA Exchange-Correlation Functional', 'PBE0 Hyb-GGA Exchange-Correlation Functional', 'PBE0-13 Hyb-GGA Exchange-Correlation Functional', 'PBE0-2 Double Hybrid Exchange-Correlation Functional', 'pbe0-dh', 'PBE1W GGA Exchange-Correlation Functional', 'PBE50 Hybrid GGA Exchange-Correlation Functional', 'PBE Hybrid based 3C composite method with a small basis set, gCP and D3(BJ)', 'PBELYP1W GGA Exchange-Correlation Functional', 'PKZB Meta-GGA XC Functional', 'PTPSS SOS Double Hybrid XC Functional', 'PW6B95 Hybrid Meta-GGA XC Functional', 'PW86B95 Hyb-GGA Exchange-Correlation Functional', 'PW86PBE GGA Exchange-Correlation Functional', 'PW91 GGA Exchange-Correlation Functional', 'PWB6K Hyb-GGA Exchange-Correlation Functional', 'PWPB95 SOS Double Hybrid XC Functional', 'revB3LYP Hyb-GGA Exchange-Correlation Functional', 'revPBE GGA Exchange-Correlation Functional', 'revPBE0 Hybrid GGA Exchange-Correlation Functional', 'revised TPSS Meta-GGA XC Functional', 'revTPSSh Hyb-GGA Exchange-Correlation Functional', 'RPBE GGA Exchange-Correlation Functional', 'SB98-1a Hyb-GGA Exchange-Correlation Functional', 'SB98-1b Hyb-GGA Exchange-Correlation Functional', 'SB98-1c Hyb-GGA Exchange-Correlation Functional', 'SB98-2a Hyb-GGA Exchange-Correlation Functional', 'SB98-2b Hyb-GGA Exchange-Correlation Functional', 'SB98-2c Hyb-GGA Exchange-Correlation Functional', 'SOGGA Exchange + PBE Correlation Functional', 'SOGGA11 Exchange-Correlation Functional', 'SOGGA11-X Hybrid Exchange-Correlation Functional', 'SVWN3 (RPA) LSDA Functional', 'TETER93 Exchange-Correlation Functional', 'TH-FC GGA Exchange-Correlation Functional', 'TH-FCFO GGA Exchange-Correlation Functional', 'TH-FCO GGA Exchange-Correlation Functional', 'TH-FL GGA Exchange-Correlation Functional', 'TH1 GGA Exchange-Correlation Functional', 'TH2 GGA Exchange-Correlation Functional', 'TH3 GGA Exchange-Correlation Functional', 'TH4 GGA Exchange-Correlation Functional', 'TPSS Meta-GGA XC Functional', 'TPSSh Hyb-GGA Exchange-Correlation Functional', 'TPSSLYP1W GGA Exchange-Correlation Functional', 'TUNED-CAM-B3LYP Hyb-GGA Exchange-Correlation Functional', 'VSXC Meta-GGA XC Functional', 'VV10 GGA Exchange-Correlation Functional', 'wB97 GGA Exchange-Correlation Functional', 'wB97M-V Hyb-GGA Exchange-Correlation Functional', 'wB97X Hyb-GGA Exchange-Correlation Functional', 'wB97X-V Hyb-GGA Exchange-Correlation Functional', 'PBE SR-XC Functional (HJS Model)', 'PBE0 SR-XC Functional (HJS Model)', 'X1B95 Hyb-GGA Exchange-Correlation Functional', 'X3LYP Hyb-GGA Exchange-Correlation Functional', 'XB1K Hyb-GGA Exchange-Correlation Functional', 'XLYP GGA Exchange-Correlation Functional', 'ZLP GGA Exchange-Correlation Functional'], 'format_string': 's', 'help_text': 'The exchange-correlation functional to use.', 'kind': 'enumeration'}, 'advanced_method': {'applies_when': {'level': 'advanced'}, 'default': 'Kohn-Sham (KS) density functional theory (DFT)', 'default_units': '', 'description': 'Method:', 'enumeration': ['effective fragment potential (EFP)', 'Kohn-Sham (KS) density functional theory (DFT)', 'Hartree-Fock (HF) self consistent field (SCF)', 'HF with dispersion, BSSE, and basis set corrections', 'PBEh with dispersion, BSSE, and basis set corrections', 'density cumulant functional theory', '2nd-order Møller–Plesset perturbation theory (MP2)', '3rd-order Møller–Plesset perturbation theory (MP3)', 'MP3 with frozen natural orbitals', 'average of MP2 and MP3', '4th-order MP perturbation theory (MP4) less triples', 'MP4 (less triples) with frozen natural orbitals', 'full MP4', 'full MP4 with frozen natural orbitals', 'nth-order Møller–Plesset (MP) perturbation theory', 'nth-order z-averaged perturbation theory (ZAPT)', 'orbital-optimized second-order MP perturbation theory', 'spin-component scaled OMP2', 'a special version of SCS-OMP2 for nucleobase interactions', 'a special version of SCS-OMP2 (from ethene dimers)', 'spin-opposite scaled OMP2', 'A special version of SOS-OMP2 for pi systems', 'orbital-optimized third-order MP perturbation theory', 'spin-component scaled OMP3', 'a special version of SCS-OMP3 for nucleobase interactions', 'a special version of SCS-OMP3 (from ethene dimers)', 'spin-opposite scaled OMP3', 'A special version of SOS-OMP3 for pi systems', 'orbital-optimized MP2.5', 'coupled electron pair approximation variant 0', 'CEPA(0) with frozen natural orbitals', 'coupled electron pair approximation variant 1', 'CEPA(1) with frozen natural orbitals', 'coupled electron pair approximation variant 3', 'CEPA(3) with frozen natural orbitals', 'averaged coupled-pair functional', 'ACPF with frozen natural orbitals', 'averaged quadratic coupled cluster', 'AQCC with frozen natural orbitals', 'quadratic CI singles doubles (QCISD)', 'QCISD with frozen natural orbitals', 'Linear CCD', 'LCCD with frozen natural orbitals', 'orbital optimized LCCD', 'approximate coupled cluster singles and doubles (CC2)', 'coupled cluster doubles (CCD)', 'coupled cluster singles and doubles (CCSD)', 'Brueckner coupled cluster doubles (BCCD)', 'CCSD with frozen natural orbitals', 'QCISD with perturbative triples', 'QCISD(T) with frozen natural orbitals', 'CCSD with perturbative triples (CCSD(T))', 'CCSD with asymmetric perturbative triples (CCSD(AT))', 'BCCD with perturbative triples', 'CCSD(T) with frozen natural orbitals', 'approximate CC singles, doubles, and triples (CC3)', 'expert full control over ccenergy module', 'expert full control over dfocc module', 'configuration interaction (CI) singles and doubles (CISD)', 'CISD with frozen natural orbitals', 'CI singles, doubles, and triples (CISDT)', 'CI singles, doubles, triples, and quadruples (CISDTQ)', 'nth-order CI', 'full configuration interaction (FCI)', 'expert full control over detci module', 'complete active space self consistent field (CASSCF)', 'restricted active space self consistent field (RASSCF)', 'multiconfigurational self consistent field (SCF)', 'Mukherjee multireference coupled cluster (Mk-MRCC)', 'density matrix renormalization group SCF', 'density matrix renormalization group CASPT2', 'density matrix renormalization group CI', '0th-order symmetry adapted perturbation theory (SAPT)', '0th-order SAPT with special exchange scaling', '0th-order functional and/or intramolecular SAPT', '2nd-order SAPT, traditional definition', 'SAPT including all 2nd-order terms', 'SAPT including perturbative triples', 'SAPT including all 3rd-order terms', 'SAPT2+ with CC-based dispersion', 'SAPT2+(3) with CC-based dispersion', 'SAPT2+3 with CC-based dispersion', 'SAPT including all 2nd-order terms and MP2 correction', 'SAPT including perturbative triples and MP2 correction', 'SAPT including all 3rd-order terms and MP2 correction', 'SAPT2+ with CC-based dispersion and MP2 correction', 'SAPT2+(3) with CC-based dispersion and MP2 correction', 'SAPT2+3 with CC-based dispersion and MP2 correction', '0th-order SAPT plus charge transfer (CT) calculation', 'SAPT2 plus CT', 'SAPT2+ plus CT', 'SAPT2+(3) plus CT', 'SAPT2+3 plus CT', 'SAPT2+(CCD) plus CT', 'SAPT2+(3)(CCD) plus CT', 'SAPT2+3(CCD) plus CT', '2nd-order algebraic diagrammatic construction (ADC)', 'EOM-CC2', 'equation of motion (EOM) CCSD', 'EOM-CC3'], 'format_string': 's', 'help_text': 'The computational method to use.', 'kind': 'enumeration'}, 'convergence error': {'default': 'yes', 'default_units': '', 'description': 'Error if not converged:', 'enumeration': ('yes', 'no'), 'format_string': 's', 'help_text': 'Whether to throw an error if not converged.', 'kind': 'boolean'}, 'correlation fitting basis': {'applies_when': {'correlation integrals': 'density fitting'}, 'default': 'default', 'default_units': '', 'description': 'Fitting basis:', 'enumeration': ('default',), 'format_string': 's', 'help_text': "The auxiliary basis for the density-fitted correlation integrals (Psi4's df_basis_cc). 'default' uses the RI basis that matches the orbital basis, e.g. cc-pVTZ-RI for cc-pVTZ.", 'kind': 'string'}, 'correlation integrals': {'default': 'default', 'default_units': '', 'description': 'Correlation integrals:', 'enumeration': ('default', 'conventional', 'density fitting', 'Cholesky decomposition'), 'format_string': 's', 'help_text': "How the integrals of the correlated method are done. 'default' is Psi4's default for the method: density fitting for MP2, MP2.5 and MP3, conventional for the coupled-cluster methods. Density fitting is much faster and gives analytic gradients with frozen core (via DFOCC), but changes the energies slightly, so the model's name starts with 'DF-'. Cholesky decomposition has no analytic gradients.", 'kind': 'enumeration'}, 'create tables': {'default': 'yes', 'default_units': '', 'description': 'Create tables as needed:', 'enumeration': ('yes', 'no'), 'format_string': '', 'help_text': 'Whether to create tables as needed for results being saved into tables.', 'kind': 'boolean'}, 'damping convergence': {'applies_when': {'use damping': 'yes'}, 'default': 0.0, 'default_units': '', 'description': 'Damp to convergence:', 'enumeration': (), 'format_string': 's', 'help_text': 'Convergence level to stop damping. 0 = always damp.', 'kind': 'float'}, 'damping percentage': {'applies_when': {'use damping': 'yes'}, 'default': 20.0, 'default_units': '', 'description': 'Percent damping:', 'enumeration': (), 'format_string': 's', 'help_text': 'Percent of previous density to use to damp oscillations.', 'kind': 'float'}, 'density convergence': {'default': 'default', 'default_units': '', 'description': 'Density convergence criterion:', 'enumeration': ('default',), 'format_string': 's', 'help_text': 'Criterion for convergence of the density, default 10^-6 for SCF, 10^-8 optimization.', 'kind': 'float'}, 'dispersion': {'default': 'd3bj', 'default_units': '', 'description': 'Dispersion correction:', 'enumeration': ['none', 'd3bj', 'd3mbj', 'nl'], 'format_string': 's', 'help_text': 'The dispersion correction to use.', 'kind': 'enumeration'}, 'energy convergence': {'default': 'default', 'default_units': '', 'description': 'Energy convergence criterion:', 'enumeration': ('default',), 'format_string': 's', 'help_text': 'Criterion for convergence of the energy, default 10^-6 for SCF, 10^-8 optimization.', 'kind': 'float'}, 'freeze-cores': {'default': 'yes', 'default_units': '', 'description': 'Freeze core orbitals:', 'enumeration': ('yes', 'no'), 'format_string': 's', 'help_text': 'Whether to freeze the core orbitals in correlated methods', 'kind': 'enumeration'}, 'functional': {'applies_when': {'method': ['Kohn-Sham (KS) density functional theory (DFT)']}, 'default': 'B3LYP Hyb-GGA Exchange-Correlation Functional', 'default_units': '', 'description': 'DFT Functional:', 'enumeration': ['B3LYP Hyb-GGA Exchange-Correlation Functional', 'PBE GGA Exchange-Correlation Functional', 'PBE0 Hyb-GGA Exchange-Correlation Functional'], 'format_string': 's', 'help_text': 'The exchange-correlation functional to use.', 'kind': 'enumeration'}, 'level': {'default': 'recommended', 'description': 'The level of disclosure in the interface', 'enumeration': ('recommended', 'advanced'), 'format_string': 's', 'help_text': "How much detail to show in the GUI. Currently 'recommended' or 'advanced', which shows everything.", 'kind': 'string'}, 'level shift': {'applies_when': {'use level shift': 'yes'}, 'default': 5.0, 'default_units': 'E_h', 'description': 'Level shift:', 'enumeration': (), 'format_string': 's', 'help_text': 'The amount to shift the occupied orbitals down.', 'kind': 'float'}, 'level shift convergence': {'applies_when': {'use level shift': 'yes'}, 'default': 0.01, 'default_units': '', 'description': 'Stop when converged to:', 'enumeration': (), 'format_string': 's', 'help_text': 'Convergence level to stop level shifting.', 'kind': 'float'}, 'maximum iterations': {'default': 100, 'default_units': '', 'description': 'Maximum iterations:', 'enumeration': (), 'format_string': 's', 'help_text': 'Maximum number of SCF iterations.', 'kind': 'integer'}, 'method': {'applies_when': {'level': 'recommended'}, 'default': 'Kohn-Sham (KS) density functional theory (DFT)', 'default_units': '', 'description': 'Method:', 'enumeration': ['Kohn-Sham (KS) density functional theory (DFT)', 'Hartree-Fock (HF) self consistent field (SCF)', '2nd-order Møller–Plesset perturbation theory (MP2)', '3rd-order Møller–Plesset perturbation theory (MP3)', 'Linear CCD', 'coupled cluster singles and doubles (CCSD)', 'CCSD with perturbative triples (CCSD(T))'], 'format_string': 's', 'help_text': 'The computational method to use.', 'kind': 'enumeration'}, 'results': {'default': {}, 'default_units': '', 'description': 'results', 'enumeration': (), 'format_string': '', 'help_text': 'The results to save to variables or in tables. ', 'kind': 'dictionary'}, 'soscf convergence': {'applies_when': {'use soscf': 'yes'}, 'default': 0.001, 'default_units': '', 'description': 'Microiteration convergence:', 'enumeration': (), 'format_string': 's', 'help_text': 'Convergence level for SOSCF microiterations.', 'kind': 'float'}, 'soscf max iterations': {'applies_when': {'use soscf': 'yes'}, 'default': 5, 'default_units': '', 'description': 'Maximum microiterations:', 'enumeration': (), 'format_string': 's', 'help_text': 'Maximum number of SOSCF microiterations.', 'kind': 'integer'}, 'soscf print iterations': {'applies_when': {'use soscf': 'yes'}, 'default': 'no', 'default_units': '', 'description': 'Print microiterations:', 'enumeration': ('yes', 'no'), 'format_string': 's', 'help_text': 'Print information about the SOSCF microiterations.', 'kind': 'boolean'}, 'soscf starting convergence': {'applies_when': {'use soscf': 'yes'}, 'default': 0.01, 'default_units': '', 'description': 'Start when converged to:', 'enumeration': (), 'format_string': 's', 'help_text': 'Convergence level to start second order SCF.', 'kind': 'float'}, 'spin-restricted': {'default': 'default', 'default_units': '', 'description': 'Spin-restricted:', 'enumeration': ('default', 'yes', 'no'), 'format_string': 's', 'help_text': 'Whether to restrict the spin (RHF, ROHF, RKS) or not (UHF, UKS). Default is restricted for singlets, unrestricted otherwise.', 'kind': 'enumeration'}, 'stability analysis': {'default': 'no', 'default_units': '', 'description': 'Do stability analysis:', 'enumeration': ('yes', 'no'), 'format_string': 's', 'help_text': 'Analyze the stability of the SCF/DFT wavefunction.', 'kind': 'boolean'}, 'use damping': {'default': 'no', 'default_units': '', 'description': 'Damp the iterations:', 'enumeration': ('yes', 'no'), 'format_string': 's', 'help_text': 'Whether to damp the iterations using a fraction of the previous density to damp oscillations.', 'kind': 'boolean'}, 'use level shift': {'default': 'no', 'default_units': '', 'description': 'Use a level shift:', 'enumeration': ('yes', 'no'), 'format_string': 's', 'help_text': 'Whether to use a level shift to help convergence.', 'kind': 'boolean'}, 'use soscf': {'default': 'no', 'default_units': '', 'description': 'Use second order SCF:', 'enumeration': ('yes', 'no'), 'format_string': 's', 'help_text': 'Whether to use the second order SCF to help convergence.', 'kind': 'boolean'}}#
- unused = ()#
Parameters that this kind of step never uses.
psi4_step.energy_step module#
Main module.
psi4_step.initialization module#
Setup and run Psi4
- class psi4_step.initialization.Initialization(flowchart=None, title='Initialization', extension=None)[source]#
Bases:
Node- analyze(indent='', data={}, out=[])[source]#
Parse the output and generating the text output and store the data in variables for other stages to access
- property git_revision#
The git version of this module.
- property header#
A printable header for this section of output
- property version#
The semantic version of this module.
psi4_step.initialization_parameters module#
Global control parameters for Psi4
- class psi4_step.initialization_parameters.InitializationParameters(defaults={}, data=None)[source]#
Bases:
ParametersThe control parameters for initializing Psi4
- parameters = {'basis': {'default': '6-31G**', 'default_units': '', 'description': 'Basis:', 'enumeration': ('6-31G', '6-31G(d)', '6-31G(d,p)', '6-31+G', '6-31+G(d)', '6-31+G(d,p)', '6-311G', '6-311G(d)', '6-311G(d,p)', '6-311+G', '6-311+G(d)', '6-311+G(d,p)', 'cc-pVDZ', 'cc-pVTZ', 'cc-pVQZ', 'def2-SV(P)', 'def2-SVP', 'def2-TZVP', 'def2-TZVPP', 'def2-QZVP', 'def2-QZVPP'), 'format_string': 's', 'help_text': 'The basis set to use.', 'kind': 'enumeration'}, 'symmetry_tolerance': {'default': '0.00001', 'default_units': None, 'description': 'Symmetry tolerance:', 'enumeration': (), 'format_string': '.1e', 'help_text': 'The tolerance used when determining the symmetry.', 'kind': 'float'}}#
psi4_step.initialization_step module#
Main module.
psi4_step.installer module#
Installer for the Psi4 plug-in.
This handles any further installation needed after installing the Python package psi4-step.
- class psi4_step.installer.Installer(*args: Any, **kwargs: Any)[source]#
Bases:
InstallerBaseHandle further installation needed after installing psi4-step.
The Python package psi4-step should already be installed, using pip, conda, or similar. This plug-in-specific installer then checks for the Psi4 executable, installing it if needed, and registers its location in seamm.ini.
There are a number of ways to determine which are the correct Psi4 executables to use. The aim of this installer is to help the user locate the executables. There are a number of possibilities
The correct executables are already available.
If they are already registered in seamm.ini there is nothing else to do.
They may be in the current path, in which case they need to be added to seamm.ini.
If a module system is in use, a module may need to be loaded to give access to Psi4.
They cannot be found automatically, so the user needs to locate the executables for the installer.
Psi4 is not installed on the machine. In this case they can be installed in a Conda environment. There is one choice
They can be installed in a separate environment, seamm-psi4 by default.
psi4_step.optimization module#
Setup and run Psi4
- class psi4_step.optimization.Optimization(flowchart=None, title='Optimization', extension=None, logger=<Logger psi4_step.optimization (WARNING)>)[source]#
Bases:
Energy- BOHR = 0.52917721067#
Psi4’s (CODATA 2014) Bohr radius in Ångström
- analyze(indent='', data=None, out=[], table=None)[source]#
Parse the output and generating the text output and store the data in variables for other stages to access
- description_text(P=None, calculation_type='Geometry optimization', configuration=None)[source]#
Prepare information about what this node will do
psi4_step.optimization_parameters module#
Global control parameters for Psi4
- class psi4_step.optimization_parameters.OptimizationParameters(defaults={}, data=None)[source]#
Bases:
EnergyParametersThe control parameters for the energy.
- parameters = {'coordinates': {'default': 'Internal', 'default_units': '', 'description': 'Type of coordinates:', 'enumeration': ('Internal', 'Cartesian', 'Both'), 'format_string': 's', 'help_text': 'The typ of coordinates to use in the minimization.', 'kind': 'enumeration'}, 'derivatives': {'default': 'analytic where available', 'default_units': '', 'description': 'Derivatives:', 'enumeration': ('analytic where available', 'finite differences of energies'), 'format_string': 's', 'help_text': 'How the gradients (and so the Hessian) are found: analytically where Psi4 can for this method, or by finite differences of energies, which costs many more calculations but needs only energies -- a check on, or a way around, an analytic gradient.', 'kind': 'enumeration'}, 'geometry convergence': {'default': 'QChem', 'default_units': '', 'description': 'Convergence criteria:', 'enumeration': ['CFOUR', 'Gaussian loose', 'Gaussian', 'Gaussian tight', 'Gaussian very tight', 'MOLPRO', 'NWChem loose', 'NWChem', 'NWChem tight', 'QChem', 'TURBOMOLE', 'Interfragment tight', 'Custom'], 'format_string': '', 'help_text': 'The criteria to use for convergence.', 'kind': 'string'}, 'hessian update': {'default': 'bfgs', 'default_units': '', 'description': 'Hessian update:', 'enumeration': ('bfgs', 'ms', 'powell', 'none'), 'format_string': 's', 'help_text': 'The algorithm for updating the Hessian.', 'kind': 'enumeration'}, 'max geometry steps': {'default': '6*nAtoms', 'default_units': '', 'description': 'Maximum steps:', 'enumeration': ('6*nAtoms',), 'format_string': '', 'help_text': "The maximum number of steps to take in the optimization. 'default' is based on the system size, giving a reasonable limit in most cases.", 'kind': 'integer'}, 'optimization method': {'default': 'Rational Function Optimization', 'default_units': '', 'description': 'Method:', 'enumeration': ['Rational Function Optimization', 'Newton-Raphson', 'Steepest Descents', 'Static Linesearch'], 'format_string': 's', 'help_text': 'The optimization method to use.', 'kind': 'enumeration'}, 'recalc hessian': {'default': 'never', 'default_units': '', 'description': 'Recalculate Hessian:', 'enumeration': ('every step', 'at beginning', 'never'), 'format_string': '', 'help_text': 'How often to recalculate the Hessian (in steps). Smaller values help convergence but are expensive.', 'kind': 'integer'}}#
- unused = ('subsequent structure handling',)#
Parameters that this kind of step never uses.
psi4_step.optimization_step module#
Main module.
psi4_step.optimizer module#
Acclerated optimization using MOPAC for Hessians.
psi4_step.psi4 module#
Non-graphical part of the Psi4 step in a SEAMM flowchart
- class psi4_step.psi4.Psi4(flowchart=None, title='Psi4', namespace='org.molssi.seamm.psi4', extension=None)[source]#
Bases:
NodeThe non-graphical part of a Psi4 step in a flowchart.
- options#
It contains a two item tuple containing the populated namespace and the list of remaining argument strings.
- Type:
tuple
- subflowchart#
A SEAMM Flowchart object that represents a subflowchart, if needed.
- Type:
seamm.Flowchart
- parameters#
The control parameters for Psi4.
- Type:
See also
TkPsi4,Psi4,Psi4Parameters- analyze(indent='', **kwargs)[source]#
Do any analysis of the output from this step.
Also print important results to the local step.out file using ‘printer’.
- Parameters:
indent (str) – An extra indentation for the output
- property basis#
The basis set
- description_text(P=None)[source]#
Create the text description of what this step will do. The dictionary of control values is passed in as P so that the code can test values, etc.
- Parameters:
P (dict) – An optional dictionary of the current values of the control parameters.
- Returns:
description – A description of the current step.
- Return type:
str
- property extended_model#
The extended_model chemistry
- property git_revision#
The git version of this module.
- property model#
The model chemistry
- record_timing(configuration, ce, control, wall, result)[source]#
Append this run’s timing record (
~/.seamm.d/timing/psi4.csv) withtiming_descriptors(); never raises.
- run()[source]#
Run a Psi4 step.
- Returns:
next_node – The next node object in the flowchart.
- Return type:
seamm.Node
- property version#
The semantic version of this module.
- psi4_step.psi4.TIMING_SPEC = {'default_alpha': 0.8, 'klass': ['method'], 'multiplier': None, 'size': ['nbf', 'n_electrons', 'n_atoms'], 'task': 'task', 'units': 'scf_runs'}#
basis functions, electrons and atoms as size variables, the method as the class, the task, SCF runs as the unit. Written beside the records when a run is recorded.
- Type:
What the cost model is made of (seamm_exec.timing_model.Spec as plain data)
- psi4_step.psi4.dehumanize(memory, suffix='B')[source]#
Unscale memory from its human readable form e.g:
‘1.20 MB’ => 1200000 ‘1.17 GB’ => 1170000000
- psi4_step.psi4.humanize(memory, suffix='B', kilo=1024)[source]#
Scale memory to its proper format e.g:
1253656 => ‘1.20 MiB’ 1253656678 => ‘1.17 GiB’
- psi4_step.psi4.timing_descriptors(control, out_text=None, configuration=None)[source]#
The descriptors of a Psi4 run for its timing record (seamm_exec’s campaign of 2026-10-05): the structure, the number of calculations in the input, the method/functional and basis of the first (from the sub-steps’ parameters), and from the output the basis functions, electrons, SCF iterations and Psi4’s own wall time.
psi4_step.psi4_metadata module#
This file contains metadata describing the results from Psi4
- psi4_step.psi4_metadata.optimization_convergence = {'CFOUR': 'CFOUR', 'Custom': '', 'Gaussian': 'GAU', 'Gaussian loose': 'GAU_LOOSE', 'Gaussian tight': 'GAU_TIGHT', 'Gaussian very tight': 'GAU_VERYTIGHT', 'Interfragment tight': 'INTERFRAG_TIGHT', 'MOLPRO': 'MOLPRO', 'NWChem': 'GAU', 'NWChem loose': 'NWCHEM_LOOSE', 'NWChem tight': 'GUA_TIGHT', 'QChem': 'QCHEM', 'TURBOMOLE': 'TURBOMOLE'}#
Properties that Psi4 produces. metadata[“results”] describes the results that this step can produce. It is a dictionary where the keys are the internal names of the results within this step, and the values are a dictionary describing the result. For example:
metadata["results"] = { "total_energy": { "calculation": [ "energy", "optimization", ], "description": "The total energy", "dimensionality": "scalar", "methods": [ "ccsd", "ccsd(t)", "dft", "hf", ], "property": "total energy#QuickMin#{model}", "type": "float", "units": "E_h", }, }
Fields#
- calculation[str]
Optional metadata describing what subtype of the step produces this result. The subtypes are completely arbitrary, but often they are types of calculations which is why this is name calculation. To use this, the step or a substep define self._calculation as a value. That value is used to select only the results with that value in this field.
- descriptionstr
A human-readable description of the result.
- dimensionalitystr
The dimensions of the data. The value can be “scalar” or an array definition of the form “[dim1, dim2,…]”. Symmetric tringular matrices are denoted “triangular[n,n]”. The dimensions can be integers, other scalar results, or standard parameters such as n_atoms. For example, ‘[3]’, [3, n_atoms], or “triangular[n_aos, n_aos]”.
- methodsstr
Optional metadata like the calculation data. methods provides a second level of filtering, often used for the Hamiltionian for ab initio calculations where some properties may or may not be calculated depending on the type of theory.
- propertystr
An optional definition of the property for storing this result. Must be one of the standard properties defined either in SEAMM or in this steps property metadata in data/properties.csv.
- typestr
The type of the data: string, integer, or float.
- unitsstr
Optional units for the result. If present, the value should be in these units.
psi4_step.psi4_parameters module#
Control parameters for the Psi4 step in a SEAMM flowchart
- class psi4_step.psi4_parameters.Psi4Parameters(defaults={}, data=None)[source]#
Bases:
ParametersThe control parameters for Psi4.
The developer will add a dictionary of Parameters to this class. The keys are parameters for the current plugin, which themselves might be dictionaries.
You need to replace the ‘time’ example below with one or more definitions of the control parameters for your plugin and application.
- Parameters:
parameters ({'kind', 'default', 'default_units', 'enumeration',)
'format_string' – A dictionary containing the parameters for the current step. Each key of the dictionary is a dictionary that contains the the following keys: kind, default, default_units, enumeration, format_string, description and help text.
description' – A dictionary containing the parameters for the current step. Each key of the dictionary is a dictionary that contains the the following keys: kind, default, default_units, enumeration, format_string, description and help text.
help_text'} – A dictionary containing the parameters for the current step. Each key of the dictionary is a dictionary that contains the the following keys: kind, default, default_units, enumeration, format_string, description and help text.
parameters['kind'] (custom) – Specifies the kind of a variable. While the ‘kind’ of a variable might be a numeric value, it may still have enumerated custom values meaningful to the user. For instance, if the parameter is a convergence criterion for an optimizer, custom values like ‘normal’, ‘precise’, etc, might be adequate. In addition, any parameter can be set to a variable of expression, indicated by having ‘$’ as the first character in the field. For example, $OPTIMIZER_CONV.
parameters['default'] ('integer' or 'float' or 'string' or 'boolean' or) – ‘enum’ The default value of the parameter, used to reset it.
parameters['default_units'] (str) – The default units, used for resetting the value.
parameters['enumeration'] (tuple) – A tuple of enumerated values.
parameters['format_string'] (str) – A format string for ‘pretty’ output.
parameters['description'] (str) – A short string used as a prompt in the GUI.
parameters['help_text'] (tuple) – A longer string to display as help for the user.
See also
Psi4,TkPsi4,Psi4,Psi4Parameters,Psi4StepExamples
parameters = { "time": { "default": 100.0, "kind": "float", "default_units": "ps", "enumeration": tuple(), "format_string": ".1f", "description": "Simulation time:", "help_text": ("The time to simulate in the dynamics run.") }, }
- parameters = {'time': {'default': 100.0, 'default_units': 'ps', 'description': 'Simulation time:', 'enumeration': (), 'format_string': '.1f', 'help_text': 'The time to simulate in the dynamics run.', 'kind': 'float'}}#
psi4_step.psi4_step module#
- class psi4_step.psi4_step.Psi4Step(flowchart=None, gui=None)[source]#
Bases:
objectHelper class needed for the stevedore integration.
This must provide a description() method that returns a dict containing a description of this node, and create_node() and create_tk_node() methods for creating the graphical and non-graphical nodes.
- Parameters:
my_description ({description, group, name}) – A human-readable description of this step. It can be several lines long, and needs to be clear to non-expert users. It contains the following keys: description, group, name.
my_description['description'] (tuple) – A description of the Psi4 step. It must be clear to non-experts.
my_description['group'] (str) – Which group in the menus to put this step. If the group does not exist it will be created. Common groups are ‘Building’, ‘Calculations’, ‘Control’ and ‘Data’.
my_description['name'] (str) – The name of this step, to be displayed in the menus.
- create_node(flowchart=None, **kwargs)[source]#
Create and return the new node object.
- Parameters:
flowchart (seamm.Node) – A non-graphical SEAMM node
**kwargs (keyworded arguments) – Various keyworded arguments such as title, namespace or extension representing the title displayed in the flowchart, the namespace for the plugins of a subflowchart and the extension, respectively.
- Return type:
See also
Psi4
- create_tk_node(canvas=None, **kwargs)[source]#
Create and return the graphical Tk node object.
- Parameters:
canvas (tk.Canvas) – The Tk Canvas widget
**kwargs (keyworded arguments) – Various keyworded arguments such as tk_flowchart, node, x, y, w, h representing a graphical flowchart object, a non-graphical node for a step, and dimensions of the graphical node.
- Return type:
See also
TkPsi4
- my_description = {'description': 'An interface for Psi4', 'group': 'Simulations', 'name': 'Psi4'}#
psi4_step.thermochemistry module#
Non-graphical part of the Thermochemistry step in a Psi4 flowchart
- class psi4_step.thermochemistry.Thermochemistry(flowchart=None, title='Thermochemistry', extension=None, logger=<Logger psi4_step.thermochemistry (WARNING)>)[source]#
Bases:
EnergyThe non-graphical part of a Thermochemistry step in a flowchart.
- parser#
The parser object.
- Type:
configargparse.ArgParser
- options#
It contains a two item tuple containing the populated namespace and the list of remaining argument strings.
- Type:
tuple
- subflowchart#
A SEAMM Flowchart object that represents a subflowchart, if needed.
- Type:
seamm.Flowchart
- parameters#
The control parameters for Thermochemistry.
See also
TkThermochemistry,Thermochemistry,ThermochemistryParameters- analyze(indent='', **kwargs)[source]#
Do any analysis of the output from this step.
Also print important results to the local step.out file using “printer”.
- Parameters:
indent (str) – An extra indentation for the output
- description_text(P=None, configuration=None)[source]#
Create the text description of what this step will do. The dictionary of control values is passed in as P so that the code can test values, etc.
- Parameters:
P (dict) – An optional dictionary of the current values of the control parameters.
- Returns:
A description of the current step.
- Return type:
str
- property git_revision#
The git version of this module.
- property header#
A printable header for this section of output
- property version#
The semantic version of this module.
psi4_step.thermochemistry_parameters module#
Control parameters for the Thermochemistry step in a Psi4 flowchart
- class psi4_step.thermochemistry_parameters.ThermochemistryParameters(defaults={}, data=None)[source]#
Bases:
EnergyParametersThe control parameters for Thermochemistry.
You need to replace the “time” entry in dictionary below these comments with the definitions of parameters to control this step. The keys are parameters for the current plugin,the values are dictionaries as outlined below.
Examples
parameters = { "time": { "default": 100.0, "kind": "float", "default_units": "ps", "enumeration": tuple(), "format_string": ".1f", "description": "Simulation time:", "help_text": ("The time to simulate in the dynamics run.") }, }
- parameters{str: {str: str}}
A dictionary containing the parameters for the current step. Each key of the dictionary is a dictionary that contains the the following keys:
- parameters[“default”] :
The default value of the parameter, used to reset it.
- parameters[“kind”]enum()
Specifies the kind of a variable. One of “integer”, “float”, “string”, “boolean”, or “enum”
While the “kind” of a variable might be a numeric value, it may still have enumerated custom values meaningful to the user. For instance, if the parameter is a convergence criterion for an optimizer, custom values like “normal”, “precise”, etc, might be adequate. In addition, any parameter can be set to a variable of expression, indicated by having “$” as the first character in the field. For example, $OPTIMIZER_CONV.
- parameters[“default_units”]str
The default units, used for resetting the value.
- parameters[“enumeration”]: tuple
A tuple of enumerated values.
- parameters[“format_string”]: str
A format string for “pretty” output.
- parameters[“description”]: str
A short string used as a prompt in the GUI.
- parameters[“help_text”]: str
A longer string to display as help for the user.
See also
Thermochemistry,TkThermochemistry,Thermochemistry,ThermochemistryParameters,ThermochemistryStep- static energy_settings()[source]#
The Energy step’s calculation settings, which apply only when not using the parameters of the previous step (a rule shared by the dialog and the flowchart builder, see seamm.Parameters).
- not_applicable_reason(key, values=None)[source]#
Why a parameter does not apply: first, because the previous step’s parameters are used.
- parameters = {'P': {'default': 1.0, 'default_units': 'bar', 'description': 'Pressure:', 'enumeration': (), 'format_string': '.2f', 'help_text': 'The pressure for the thermochemistry.', 'kind': 'float'}, 'T': {'default': 298.15, 'default_units': 'K', 'description': 'Temperature:', 'enumeration': (), 'format_string': '.2f', 'help_text': 'The temperature for the thermochemistry.', 'kind': 'float'}, 'derivatives': {'default': 'analytic where available', 'default_units': '', 'description': 'Derivatives:', 'enumeration': ('analytic where available', 'finite differences of energies'), 'format_string': 's', 'help_text': 'How the gradients (and so the Hessian) are found: analytically where Psi4 can for this method, or by finite differences of energies, which costs many more calculations but needs only energies -- a check on, or a way around, an analytic gradient.', 'kind': 'enumeration'}, 'use existing parameters': {'default': 'yes', 'default_units': None, 'description': 'Use existing parameters', 'enumeration': ('yes', 'no'), 'format_string': '', 'help_text': 'Whether to use existing parameters from the previous step', 'kind': 'boolean'}}#
psi4_step.thermochemistry_step module#
- class psi4_step.thermochemistry_step.ThermochemistryStep(flowchart=None, gui=None)[source]#
Bases:
objectHelper class needed for the stevedore integration.
This must provide a description() method that returns a dict containing a description of this node, and create_node() and create_tk_node() methods for creating the graphical and non-graphical nodes.
The dictionary for the description is the class variable just below these comments. The felds are as follows:
- my_description{str, str}
A human-readable description of this step. It can be several lines long, and needs to be clear to non-expert users. It contains the following keys: description, group, name.
- my_description[“description”]tuple
A description of the Thermochemistry step. It must be clear to non-experts.
- my_description[“group”]str
Which group in the menus to put this step. If the group does not exist it will be created. Common groups are “Building”, “Control”, “Custom”, “Data”, and “Simulations”.
- my_description[“name”]str
The name of this step, to be displayed in the menus.
- create_node(flowchart=None, **kwargs)[source]#
Create and return the new node object.
- Parameters:
flowchart (seamm.Node) – A non-graphical SEAMM node
**kwargs (keyword arguments) – Various keyword arguments such as title, namespace or extension representing the title displayed in the flowchart, the namespace for the plugins of a subflowchart and the extension, respectively.
- Return type:
- create_tk_node(canvas=None, **kwargs)[source]#
Create and return the graphical Tk node object.
- Parameters:
canvas (tk.Canvas) – The Tk Canvas widget
**kwargs (keyword arguments) – Various keyword arguments such as tk_flowchart, node, x, y, w, h representing a graphical flowchart object, a non-graphical node for a step, and dimensions of the graphical node.
- Return type:
- description()[source]#
Return a description of what this step does.
- Returns:
description
- Return type:
dict(str, str)
- my_description = {'description': 'An interface for Thermochemistry', 'group': 'Calculation', 'name': 'Thermochemistry'}#
psi4_step.tk_bsse module#
The graphical part of a Psi4 BSSE (counterpoise) sub-step.
- class psi4_step.tk_bsse.TkBSSE(tk_flowchart=None, node=None, canvas=None, x=120, y=20, w=200, h=50, my_logger=<Logger psi4_step.tk_bsse (WARNING)>)[source]#
Bases:
TkEnergyGraphical Psi4 BSSE sub-step: the energy dialog’s level-of-theory controls plus the fragment definition.
- create_dialog(title='Edit Psi4 BSSE Step')[source]#
Create the edit dialog: the Energy superclass builds the level-of-theory ‘calculation’/’convergence’ frames; this adds a ‘fragments’ frame alongside them, reactive to the ‘fragments’ mode (the ‘Fragment atoms’ field only applies when it is ‘specified’).
psi4_step.tk_energy module#
The graphical part of a Psi4 Energy node
psi4_step.tk_initialization module#
The graphical part of a Psi4 Initialization node
- class psi4_step.tk_initialization.TkInitialization(tk_flowchart=None, node=None, canvas=None, x=120, y=20, w=200, h=50, my_logger=<Logger psi4_step.tk_initialization (WARNING)>)[source]#
Bases:
TkNode
psi4_step.tk_optimization module#
The graphical part of a Psi4 Optimization node
- class psi4_step.tk_optimization.TkOptimization(tk_flowchart=None, node=None, canvas=None, x=120, y=20, w=200, h=50, my_logger=<Logger psi4_step.tk_optimization (WARNING)>)[source]#
Bases:
TkEnergy- create_dialog(title='Edit Psi4 Optimization Step')[source]#
Create the edit dialog!
This is reasonably complicated, so a bit of description is in order. The superclass Energy creates the dialog along with the calculation parameters in a ‘calculation’ frame..
This method adds a second frame for controlling the optimizer.
The layout is handled in part by the Energy superclass, which handles the calculation frame. Our part is handled by two methods:
reset_dialog does the general layout of the main frames.
reset_optimization handles the layout of the optimization section.
psi4_step.tk_psi4 module#
The graphical part of a Psi4 step
- class psi4_step.tk_psi4.TkPsi4(tk_flowchart=None, node=None, namespace='org.molssi.seamm.psi4.tk', canvas=None, x=None, y=None, w=200, h=50)[source]#
Bases:
TkNodeThe graphical part of a Psi4 step in a flowchart.
- namespace#
The namespace of the current step.
- Type:
str
- node#
The corresponding node of the non-graphical flowchart
- Type:
Node
- dialog#
The Pmw dialog object
- Type:
Dialog
- sub_tk_flowchart#
A graphical Flowchart representing a subflowchart
- Type:
TkFlowchart
- self[widget]#
A dictionary of tk widgets built using the information contained in Psi4_parameters.py
- Type:
dict
See also
Psi4,TkPsi4,Psi4Parameters- create_dialog()[source]#
Create the dialog. A set of widgets will be chosen by default based on what is specified in the Psi4_parameters module.
See also
TkPsi4.reset_dialog
- from_flowchart(tk_flowchart=None, flowchart=None)[source]#
Recreate the graphics from the non-graphical flowchart.
This is only used in nodes that contain sub-flowcharts.
- Parameters:
tk_flowchart (seamm.tk_Flowchart) – A graphical representation of the SEAMM Flowchart
flowchart (seamm.Flowchart) – A non-graphical representation of the SEAMM Flowchart
- handle_dialog(result)[source]#
Handle the closing of the edit dialog
What to do depends on the button used to close the dialog. If the user closes it by clicking the ‘x’ of the dialog window, None is returned, which we take as equivalent to cancel.
- Parameters:
result (None or str) – The value of this variable depends on what the button the user clicked.
- update_flowchart(tk_flowchart=None, flowchart=None)[source]#
Update the nongraphical flowchart.
This is only used in nodes that contain sub-flowcharts What to do depends on the button used to close the dialog. If the user closes it by clicking the ‘x’ of the dialog window, None is returned, which we take as equivalent to cancel.
- Parameters:
tk_flowchart (seamm.tk_Flowchart) – A graphical representation of the SEAMM Flowchart
flowchart (seamm.Flowchart) – A non-graphical representation of the SEAMM Flowchart
psi4_step.tk_thermochemistry module#
The graphical part of a Thermochemistry step
- class psi4_step.tk_thermochemistry.TkThermochemistry(tk_flowchart=None, node=None, canvas=None, x=None, y=None, w=200, h=50, my_logger=<Logger psi4_step.tk_thermochemistry (WARNING)>)[source]#
Bases:
TkEnergyThe graphical part of a Thermochemistry step in a flowchart.
- tk_flowchart#
The flowchart that we belong to.
- Type:
TkFlowchart = None
- node#
The corresponding node of the non-graphical flowchart
- Type:
Node = None
- canvas#
The Tk Canvas to draw on
- Type:
tkCanvas = None
- dialog#
The Pmw dialog object
- Type:
Dialog
- x#
The x-coordinate of the center of the picture of the node
- Type:
int = None
- y#
The y-coordinate of the center of the picture of the node
- Type:
int = None
- w#
The width in pixels of the picture of the node
- Type:
int = 200
- h#
The height in pixels of the picture of the node
- Type:
int = 50
- self[widget]#
A dictionary of tk widgets built using the information contained in Thermochemistry_parameters.py
- Type:
dict
See also
Thermochemistry,TkThermochemistry,ThermochemistryParameters- create_dialog()[source]#
Create the dialog. A set of widgets will be chosen by default based on what is specified in the Thermochemistry_parameters module.
- Parameters:
None
- Return type:
None
See also
- edit()[source]#
Present a dialog for editing this step’s parameters. Look at the flowchart to see if a previous step was a calculation.
- reset_dialog(widget=None, row=0)[source]#
Layout the widgets in the dialog.
The widgets are chosen by default from the information in Thermochemistry_parameter.
This function simply lays them out row by row with aligned labels. You may wish a more complicated layout that is controlled by values of some of the control parameters. If so, edit or override this method
- Parameters:
widget (Tk Widget = None)
- Return type:
None
See also
Module contents#
psi4_step A step for Psi4 in a SEAMM flowchart