psi4.driver.optimize

psi4.driver.optimize(name, **kwargs)[source]

Function to perform a geometry optimization.

Aliases:opt()
Returns:float – Total electronic energy of optimized structure in Hartrees.
Returns:(float, Wavefunction) – energy and wavefunction when return_wfn specified.
Raises:psi4.ConvergenceError if |optking__geom_maxiter| exceeded without reaching geometry convergence.
PSI variables:
Parameters:
  • name (string) –

    'scf' || 'mp2' || 'ci5' || etc.

    First argument, usually unlabeled. Indicates the computational method to be applied to the database. May be any valid argument to energy().

  • molecule (molecule) –

    h2o || etc.

    The target molecule, if not the last molecule defined.

  • return_wfn (boolean) –

    'on' || \(\Rightarrow\) 'off' \(\Leftarrow\)

    Indicate to additionally return the Wavefunction calculation result as the second element (after float energy) of a tuple.

  • func (function) –

    \(\Rightarrow\) gradient \(\Leftarrow\) || energy || cbs

    Indicates the type of calculation to be performed on the molecule. The default dertype accesses 'gradient' or 'energy', while 'cbs' performs a multistage finite difference calculation. If a nested series of python functions is intended (see Function Intercalls), use keyword opt_func instead of func.

  • mode (string) –

    \(\Rightarrow\) 'continuous' \(\Leftarrow\) || 'sow' || 'reap'

    For a finite difference of energies optimization, indicates whether the calculations required to complete the optimization are to be run in one file ('continuous') or are to be farmed out in an embarrassingly parallel fashion ('sow'/'reap'). For the latter, run an initial job with 'sow' and follow instructions in its output file. For maximum flexibility, return_wfn is always on in 'reap' mode.

  • dertype (dertype) –

    'gradient' || 'energy'

    Indicates whether analytic (if available) or finite difference optimization is to be performed.

  • hessian_with (string) –

    'scf' || 'mp2' || etc.

    Indicates the computational method with which to perform a hessian analysis to guide the geometry optimization.

Warning

Optimizations where the molecule is specified in Z-matrix format with dummy atoms will result in the geometry being converted to a Cartesian representation.

Note

Analytic gradients area available for all methods in the table below. Optimizations with other methods in the energy table proceed by finite differences.

name calls method
efp efp-only optimizations
scf Hartree–Fock (HF) or density functional theory (DFT) [manual]
hf HF self consistent field (SCF) [manual]
dcft density cumulant functional theory [manual]
mp2 2nd-order Møller–Plesset perturbation theory (MP2) [manual] [details]
mp3 3rd-order Møller–Plesset perturbation theory (MP3) [manual] [details]
mp2.5 average of MP2 and MP3 [manual] [details]
omp2 orbital-optimized second-order MP perturbation theory [manual]
omp3 orbital-optimized third-order MP perturbation theory [manual]
omp2.5 orbital-optimized MP2.5 [manual]
lccd Linear CCD [manual] [details]
olccd orbital optimized LCCD [manual]
ccd coupled cluster doubles (CCD) [manual]
ccsd coupled cluster singles and doubles (CCSD) [manual] [details]
ccsd(t) CCSD with perturbative triples (CCSD(T)) [manual] [details]
eom-ccsd equation of motion (EOM) CCSD [manual]
name calls method DFT [manual]
b3lyp B3LYP Hybrid-GGA Exchange-Correlation Functional (VWN1-RPA)
b3lyp-d  
b3lyp-d3  
b3lyp-d3bj  
b3lyp-d3m  
b3lyp-d3mbj  
b3lyp5 B3LYP5 Hybrid-GGA Exchange-Correlation Functional (VWN5)
b3_x Becke88 GGA Exchange (B3LYP weighting)
b86bpbe B86BPBE GGA Exchange-Correlation Functional
b88_x Becke88 GGA Exchange
b97-0 B97-0 Hybrid-GGA Exchange-Correlation Functional
b97-1 B97-1 Hybrid-GGA Exchange-Correlation Functional
b97-2 B97-2 Hybrid-GGA Exchange-Correlation Functional
b97-d  
b97-d3  
b97-d3bj  
b97-d3m  
b97-d3mbj  
blyp BLYP GGA Exchange-Correlation Functional
blyp-d  
blyp-d3  
blyp-d3bj  
blyp-d3m  
blyp-d3mbj  
bp86 BP86 GGA Exchange-Correlation Functional
bp86-d  
bp86-d3  
bp86-d3bj  
bp86-d3m  
bp86-d3mbj  
ft97 FT97 GGA Exchange-Correlation Functional
ft97b_x Filitov and Theil 1997 Exchange
ft97_c FT97 Correlation (Involves Ei functions)
hcth HCTH Pure-GGA Exchange-Correlation Functional
hcth120 HCTH120 Pure-GGA Exchange-Correlation Functional
hcth120-d3  
hcth120-d3bj  
hcth147 HCTH147 Pure-GGA Exchange-Correlation Functional
hcth407 HCTH407 Pure-GGA Exchange-Correlation Functional
hf Hartree Fock as Roothan prescribed
hf+d  
hf-d3  
hf-d3bj  
hf3c Hartree Fock as Roothan prescribed plus 3C
hf_x Hartree-Fock Exchange Functional
lyp_c LYP Correlation
m05 Heavily Parameterized Hybrid Meta-GGA XC Functional
m05-2x Heavily Parameterized Hybrid Meta-GGA XC Functional
m05-2x-d3  
m05-d3  
p86_c P86 Correlation (PZ81 LSDA + P86 GGA)
pbe PBE GGA Exchange-Correlation Functional
pbe-d  
pbe-d3  
pbe-d3bj  
pbe-d3m  
pbe-d3mbj  
pbe0 PBE0 Hybrid GGA Exchange-Correlation Functional
pbe0-d  
pbe0-d3  
pbe0-d3bj  
pbe0-d3m  
pbe0-d3mbj  
pbea_c New Implementation of PBEC in wPBEc-sr.
pbeh3c PBE-3C Hybrid GGA Exchange-Correlation Functional
pbesol_x PBEsol GGA Exchange Hole (Parameter Free)
pbe_c PBE Correlation
pbe_x PBE GGA Exchange Hole (Parameter Free)
pw86pbe PW86PBE GGA Exchange-Correlation Functional
pw91 PW91 GGA Exchange-Correlation Functional
pw91_c PW91 Correlation
pw91_x PW91 Parameterized GGA Exchange
pw92a_c New Implementation of PW92C in wPBEc-sr.
pw92_c  
pz81_c PZ81 Correlation
rpbe_x RPBE GGA Exchange Hole (Parameter Free)
sogga Second Order GGA Exchange-Correlation Functional
sogga_x Second Order GGA Exchange Hole (Parameter Free)
svwn SVWN3 (RPA) LSDA Functional
s_x Slater LSDA Exchange
vwn3rpa_c VWN3 LSDA Correlation, RPA Parameters, VWN1 Spin Polarization
vwn3_c VWN3 LSDA Correlation, QMC Parameters, VWN1 Spin Polarization
vwn5rpa_c VWN5 LSDA Correlation, RPA Parameters, VWN5 Spin Polarization
vwn5_c VWN5 LSDA Correlation, QMC Parameters, VWN5 Spin Polarization
dldf Dispersionless Hybrid Meta-GGA XC Functional
dldf+d Dispersionless Hybrid Meta-GGA XC Functional
dldf+d09 Dispersionless Hybrid Meta-GGA XC Functional
name calls method in Stanton and Gauss’s CFOUR program [manual]
c4-scf Hartree–Fock (HF)
c4-mp2 2nd-order Møller–Plesset perturbation theory (non-density-fitting) (MP2)
c4-mp3 3rd-order Møller–Plesset perturbation theory (MP3)
c4-mp4(sdq) 4th-order MP perturbation theory (MP4) less triples
c4-mp4 full MP4
c4-cc2 approximate coupled cluster singles and doubles (CC2)
c4-ccsd coupled cluster singles and doubles (CCSD)
c4-cc3 approximate CC singles, doubles, and triples (CC3)
c4-ccsd(t) CCSD with perturbative triples (CCSD(T))
c4-ccsdt coupled cluster singles, doubles, and triples (CCSDT)
cfour expert full control over cfour program
Examples:
1
2
>>> # [1] Analytic hf optimization
>>> optimize('hf')
1
2
3
4
>>> # [2] Finite difference mp5 optimization with gradient
>>> #     printed to output file
>>> e, wfn = opt('mp5', return_wfn='yes')
>>> wfn.gradient().print_out()
1
2
3
>>> # [3] Forced finite difference hf optimization run in
>>> #     embarrassingly parallel fashion
>>> optimize('hf', dertype='energy', mode='sow')
1
2
>>> # [4] Can automatically perform complete basis set extrapolations
>>> optimize('MP2/cc-pV([D,T]+d)Z')
1
2
3
4
>>> # [5] Can automatically perform delta corrections that include extrapolations
>>> # even with a user-defined extrapolation formula. See sample inputs named
>>> # cbs-xtpl* for more examples of this input style
>>> optimize("MP2/aug-cc-pv([d,t]+d)z + d:ccsd(t)/cc-pvdz", corl_scheme=myxtplfn_2)