Molecular properties#
Structure optimization#
One of the most commonly calculated properties in theoretical chemistry is the molecular structure. It is quite common to use structures calculated at a cheaper level of theory, typically DFT, as a starting point since ground state energies are relatively insensitive to the geometry. However, in some cases, especially when strong correlation is significant, one may want to use MCSCF structures instead.
The workflow here is very similar to that of VeloxChem, namely first defining the Gradient Driver, and then give it to the optimizer, which itself is based on GeomeTRIC. The MCSCF gradient driver will automatically choose analytical gradients if available for the specific type of MCSCF calculation performed, numerical gradients otherwise.
Let’s illustrate this on a simple O\(_2\) molecule. First, we compute one MCSCF with the \(\pi\) orbitals in the active space.
import veloxchem as vlx
import multipsi as mtp
O2_xyz="""2
O 0.0 0.0 -0.6
O 0.0 0.0 0.6
"""
molecule=vlx.Molecule.from_xyz_string(O2_xyz)
molecule.set_multiplicity(3)
basis = vlx.MolecularBasis.read(molecule,"cc-pvdz")
scfdrv = vlx.ScfUnrestrictedDriver()
scfdrv.compute(molecule, basis)
uhf_orbs = scfdrv.natural_orbitals()
space=mtp.OrbSpace(molecule,uhf_orbs)
space.cas(6,4)
mcscfdrv=mtp.McscfDriver()
mc_results = mcscfdrv.compute(molecule,basis,space)
Self Consistent Field Driver Setup
====================================
Wave Function Model : Spin-Unrestricted Hartree-Fock
Initial Guess Model : Superposition of Atomic Densities
Convergence Accelerator : Two Level Direct Inversion of Iterative Subspace
Max. Number of Iterations : 50
Max. Number of Error Vectors : 10
Convergence Threshold : 1.0e-06
ERI Screening Threshold : 1.0e-12
Linear Dependence Threshold : 1.0e-06
* Info * Starting Reduced Basis SCF calculation...
* Info * ...done. SCF energy in reduced basis set: -149.560614348825 a.u. Time: 0.08 sec.
Iter. | Hartree-Fock Energy | Energy Change | Gradient Norm | Max. Gradient | Density Change
--------------------------------------------------------------------------------------------
1 -149.626803052902 0.0000000000 0.14017320 0.02770855 0.00000000
2 -149.628831998606 -0.0020289457 0.03740027 0.00685532 0.04605541
3 -149.628984003128 -0.0001520045 0.00782897 0.00108779 0.01270091
4 -149.628991892029 -0.0000078889 0.00167006 0.00032454 0.00308450
5 -149.628992297668 -0.0000004056 0.00027796 0.00004990 0.00071931
6 -149.628992313425 -0.0000000158 0.00005776 0.00001136 0.00015635
7 -149.628992314159 -0.0000000007 0.00000596 0.00000098 0.00003463
8 -149.628992314164 -0.0000000000 0.00000047 0.00000009 0.00000254
*** SCF converged in 8 iterations. Time: 0.16 sec.
Spin-Unrestricted Hartree-Fock:
-------------------------------
Total Energy : -149.6289923142 a.u.
Electronic Energy : -177.8517768957 a.u.
Nuclear Repulsion Energy : 28.2227845815 a.u.
------------------------------------
Gradient Norm : 0.0000004670 a.u.
Ground State Information
------------------------
Charge of Molecule : 0.0
Multiplicity (2S+1) : 3
Magnetic Quantum Number (M_S) : 1.0
Expectation value of S**2 : 2.0326
Multi-Configurational Self-Consistent Field Driver
====================================================
Active space definition:
------------------------
Number of inactive (occupied) orbitals: 5
Number of active orbitals: 4
Number of virtual orbitals: 19
This is a CASSCF wavefunction: CAS(6,4)
CI expansion:
-------------
Number of determinants: 6
╭────────────────────────────────────╮
│ Driver settings │
╰────────────────────────────────────╯
Number of states : 1
State-specific calculation
- State of interest : 1
Max. iterations : 50
BFGS window : 5
Convergence thresholds:
- Energy change : 1e-08
- Gradient sq. norm : 1e-08
MCSCF Iterations
-------------------
Iter. | Average Energy | E. Change | Grad. Norm | CI Iter. | Trust rad. | Time
---------------------------------------------------------------------------------
-137.63027225765092
1 -149.645938143 0.0e+00 2.3e-03 0 0.40 0:00:00
-137.63230602679582
2 -149.646683502 -7.5e-04 1.6e-04 0 0.40 0:00:00
-137.62829252009033
3 -149.646744541 -6.1e-05 6.4e-06 0 0.48 0:00:00
-137.6287181111812
4 -149.646745619 -1.1e-06 1.4e-07 0 0.48 0:00:00
-137.62863078951506
5 -149.646745650 -3.1e-08 5.0e-09 0 0.48 0:00:00
-137.62865546193075
6 -149.646745651 -1.5e-09 3.3e-10 0 0.48 0:00:00
** Convergence reached in 6 iterations
-137.62866155027126
7 -149.646745652 -3.0e-10 5.9e-11 0 0.58 0:00:00
Final results
-------------
* State 1
- S^2 : 2.00 (multiplicity = 3.0 )
- Energy : -149.64674565164847
- Natural orbitals
1.94748 1.94748 1.05252 1.05252
Spin Restricted Orbitals
------------------------
Molecular Orbital No. 3:
--------------------------
Occupation: 2.000 Energy: -1.65406 a.u.
( 1 O 2s : -0.33) ( 1 O 3s : -0.27) ( 1 O 1p0 : -0.16)
( 2 O 2s : -0.33) ( 2 O 3s : -0.27) ( 2 O 1p0 : 0.16)
Molecular Orbital No. 4:
--------------------------
Occupation: 2.000 Energy: -1.08903 a.u.
( 1 O 2s : 0.36) ( 1 O 3s : 0.46) ( 2 O 2s : -0.36)
( 2 O 3s : -0.46)
Molecular Orbital No. 5:
--------------------------
Occupation: 2.000 Energy: -0.72394 a.u.
( 1 O 3s : -0.27) ( 1 O 1p0 : 0.46) ( 1 O 2p0 : 0.24)
( 2 O 3s : -0.27) ( 2 O 1p0 : -0.46) ( 2 O 2p0 : -0.24)
Molecular Orbital No. 6:
--------------------------
Occupation: 1.947 Energy: -0.69086 a.u.
( 1 O 1p-1: 0.45) ( 1 O 2p-1: 0.28) ( 2 O 1p-1: 0.45)
( 2 O 2p-1: 0.28)
Molecular Orbital No. 7:
--------------------------
Occupation: 1.947 Energy: -0.69086 a.u.
( 1 O 1p+1: -0.45) ( 1 O 2p+1: -0.28) ( 2 O 1p+1: -0.45)
( 2 O 2p+1: -0.28)
Molecular Orbital No. 8:
--------------------------
Occupation: 1.053 Energy: -0.20891 a.u.
( 1 O 1p-1: -0.52) ( 1 O 2p-1: -0.38) ( 2 O 1p-1: 0.52)
( 2 O 2p-1: 0.38)
Molecular Orbital No. 9:
--------------------------
Occupation: 1.053 Energy: -0.20891 a.u.
( 1 O 1p+1: -0.52) ( 1 O 2p+1: -0.38) ( 2 O 1p+1: 0.52)
( 2 O 2p+1: 0.38)
Molecular Orbital No. 10:
--------------------------
Occupation: 0.000 Energy: 0.47782 a.u.
( 1 O 2s : 0.18) ( 1 O 3s : 1.29) ( 1 O 1p0 : 0.40)
( 1 O 2p0 : 1.23) ( 2 O 2s : -0.18) ( 2 O 3s : -1.29)
( 2 O 1p0 : 0.40) ( 2 O 2p0 : 1.23)
Molecular Orbital No. 11:
--------------------------
Occupation: 0.000 Energy: 1.08939 a.u.
( 1 O 3s : 0.99) ( 1 O 1p0 : -0.71) ( 1 O 2p0 : 1.32)
( 2 O 3s : -0.99) ( 2 O 1p0 : -0.71) ( 2 O 2p0 : 1.32)
Molecular Orbital No. 12:
--------------------------
Occupation: 0.000 Energy: 1.11262 a.u.
( 1 O 1p+1: -0.63) ( 1 O 1p-1: 0.24) ( 1 O 2p+1: 0.59)
( 1 O 2p-1: -0.22) ( 2 O 1p+1: -0.63) ( 2 O 1p-1: 0.24)
( 2 O 2p+1: 0.59) ( 2 O 2p-1: -0.22)
Dipole moment for state 1
---------------------------
X : 0.000001 a.u. 0.000002 Debye
Y : -0.000001 a.u. -0.000001 Debye
Z : 0.000000 a.u. 0.000000 Debye
Total : 0.000001 a.u. 0.000003 Debye
Total MCSCF time: 00:00:00
Now, we optimize the molecule.
opt_drv = mtp.OptimizationDriver(mcscfdrv)
opt_results = opt_drv.compute(molecule, basis, space)
Optimization Driver Setup
===========================
Coordinate System : TRIC
Constraints : No
Max. Number of Steps : 300
Transition State : No
IRC : No
Hessian : never
* Info * Using geomeTRIC for geometry optimization.
L.-P. Wang and C.C. Song, J. Chem. Phys. 2016, 144, 214108
* Info * Computing energy and gradient...
Multi-Configurational Self-Consistent Field Driver
====================================================
Active space definition:
------------------------
Number of inactive (occupied) orbitals: 5
Number of active orbitals: 4
Number of virtual orbitals: 19
This is a CASSCF wavefunction: CAS(6,4)
CI expansion:
-------------
Number of determinants: 6
╭────────────────────────────────────╮
│ Driver settings │
╰────────────────────────────────────╯
Number of states : 1
State-specific calculation
- State of interest : 1
Max. iterations : 50
BFGS window : 5
Convergence thresholds:
- Energy change : 1e-08
- Gradient sq. norm : 1e-08
MCSCF Iterations
-------------------
Iter. | Average Energy | E. Change | Grad. Norm | CI Iter. | Trust rad. | Time
---------------------------------------------------------------------------------
1 -149.646745652 0.0e+00 5.9e-11 0 0.40 0:00:00
** Convergence reached in 1 iterations
2 -149.646745652 -4.3e-11 1.0e-11 0 0.40 0:00:00
Final results
-------------
* State 1
- S^2 : 2.00 (multiplicity = 3.0 )
- Energy : -149.64674565169145
- Natural orbitals
1.94748 1.94748 1.05252 1.05252
Spin Restricted Orbitals
------------------------
Molecular Orbital No. 3:
--------------------------
Occupation: 2.000 Energy: -1.65406 a.u.
( 1 O 2s : 0.33) ( 1 O 3s : 0.27) ( 1 O 1p0 : 0.16)
( 2 O 2s : 0.33) ( 2 O 3s : 0.27) ( 2 O 1p0 : -0.16)
Molecular Orbital No. 4:
--------------------------
Occupation: 2.000 Energy: -1.08903 a.u.
( 1 O 2s : -0.36) ( 1 O 3s : -0.46) ( 2 O 2s : 0.36)
( 2 O 3s : 0.46)
Molecular Orbital No. 5:
--------------------------
Occupation: 2.000 Energy: -0.72394 a.u.
( 1 O 3s : 0.27) ( 1 O 1p0 : -0.46) ( 1 O 2p0 : -0.24)
( 2 O 3s : 0.27) ( 2 O 1p0 : 0.46) ( 2 O 2p0 : 0.24)
Molecular Orbital No. 6:
--------------------------
Occupation: 1.947 Energy: -0.69086 a.u.
( 1 O 1p+1: 0.45) ( 1 O 2p+1: 0.28) ( 2 O 1p+1: 0.45)
( 2 O 2p+1: 0.28)
Molecular Orbital No. 7:
--------------------------
Occupation: 1.947 Energy: -0.69086 a.u.
( 1 O 1p-1: -0.45) ( 1 O 2p-1: -0.28) ( 2 O 1p-1: -0.45)
( 2 O 2p-1: -0.28)
Molecular Orbital No. 8:
--------------------------
Occupation: 1.053 Energy: -0.20891 a.u.
( 1 O 1p+1: 0.43) ( 1 O 1p-1: -0.32) ( 1 O 2p+1: 0.32)
( 1 O 2p-1: -0.24) ( 2 O 1p+1: -0.43) ( 2 O 1p-1: 0.32)
( 2 O 2p+1: -0.32) ( 2 O 2p-1: 0.24)
Molecular Orbital No. 9:
--------------------------
Occupation: 1.053 Energy: -0.20891 a.u.
( 1 O 1p+1: -0.32) ( 1 O 1p-1: -0.43) ( 1 O 2p+1: -0.24)
( 1 O 2p-1: -0.32) ( 2 O 1p+1: 0.32) ( 2 O 1p-1: 0.43)
( 2 O 2p+1: 0.24) ( 2 O 2p-1: 0.32)
Molecular Orbital No. 10:
--------------------------
Occupation: 0.000 Energy: 0.47782 a.u.
( 1 O 2s : 0.18) ( 1 O 3s : 1.29) ( 1 O 1p0 : 0.40)
( 1 O 2p0 : 1.23) ( 2 O 2s : -0.18) ( 2 O 3s : -1.29)
( 2 O 1p0 : 0.40) ( 2 O 2p0 : 1.23)
Molecular Orbital No. 11:
--------------------------
Occupation: 0.000 Energy: 1.08939 a.u.
( 1 O 3s : -0.99) ( 1 O 1p0 : 0.71) ( 1 O 2p0 : -1.32)
( 2 O 3s : 0.99) ( 2 O 1p0 : 0.71) ( 2 O 2p0 : -1.32)
Molecular Orbital No. 12:
--------------------------
Occupation: 0.000 Energy: 1.11262 a.u.
( 1 O 1p+1: 0.24) ( 1 O 1p-1: 0.63) ( 1 O 2p+1: -0.22)
( 1 O 2p-1: -0.58) ( 2 O 1p+1: 0.24) ( 2 O 1p-1: 0.63)
( 2 O 2p+1: -0.22) ( 2 O 2p-1: -0.58)
Dipole moment for state 1
---------------------------
X : 0.000001 a.u. 0.000001 Debye
Y : -0.000000 a.u. -0.000001 Debye
Z : -0.000000 a.u. -0.000000 Debye
Total : 0.000001 a.u. 0.000002 Debye
Total MCSCF time: 00:00:00
MCSCF Gradient Driver Setup
=============================
Gradient Type : Analytical
Molecular Geometry (Angstroms)
--------------------------------
Atom Coordinate X Coordinate Y Coordinate Z
O 0.000000000000 0.000000000000 -0.600000000000
O 0.000000000000 0.000000000000 0.600000000000
Analytical Gradient (Hartree/Bohr)
------------------------------------
Atom Gradient X Gradient Y Gradient Z
O 0.000000244413 0.000000002502 -0.030216635378
O -0.000000244413 -0.000000002502 0.030216635378
*** Time spent in gradient calculation: 1.72 sec ***
* Info * Energy : -149.6467456517 a.u.
* Info * Gradient : 3.021664e-02 a.u. (RMS)
* Info * 3.021664e-02 a.u. (Max)
* Info * Time : 1.77 sec
* Info * Computing energy and gradient...
Multi-Configurational Self-Consistent Field Driver
====================================================
Active space definition:
------------------------
Number of inactive (occupied) orbitals: 5
Number of active orbitals: 4
Number of virtual orbitals: 19
This is a CASSCF wavefunction: CAS(6,4)
CI expansion:
-------------
Number of determinants: 6
╭────────────────────────────────────╮
│ Driver settings │
╰────────────────────────────────────╯
Number of states : 1
State-specific calculation
- State of interest : 1
Max. iterations : 50
BFGS window : 5
Convergence thresholds:
- Energy change : 1e-08
- Gradient sq. norm : 1e-08
MCSCF Iterations
-------------------
Iter. | Average Energy | E. Change | Grad. Norm | CI Iter. | Trust rad. | Time
---------------------------------------------------------------------------------
1 -149.647039753 0.0e+00 8.5e-04 0 0.40 0:00:00
2 -149.647249493 -2.1e-04 4.0e-05 0 0.40 0:00:00
3 -149.647263638 -1.4e-05 1.5e-06 0 0.48 0:00:00
4 -149.647263941 -3.0e-07 3.4e-08 0 0.48 0:00:00
5 -149.647263950 -8.9e-09 1.2e-09 0 0.48 0:00:00
** Convergence reached in 5 iterations
6 -149.647263950 -3.4e-10 9.8e-12 0 0.58 0:00:00
Final results
-------------
* State 1
- S^2 : 2.00 (multiplicity = 3.0 )
- Energy : -149.64726394984973
- Natural orbitals
1.95120 1.95120 1.04880 1.04880
Spin Restricted Orbitals
------------------------
Molecular Orbital No. 3:
--------------------------
Occupation: 2.000 Energy: -1.66834 a.u.
( 1 O 2s : -0.34) ( 1 O 3s : -0.26) ( 1 O 1p0 : -0.17)
( 2 O 2s : -0.34) ( 2 O 3s : -0.26) ( 2 O 1p0 : 0.17)
Molecular Orbital No. 4:
--------------------------
Occupation: 2.000 Energy: -1.08386 a.u.
( 1 O 2s : 0.36) ( 1 O 3s : 0.46) ( 2 O 2s : -0.36)
( 2 O 3s : -0.46)
Molecular Orbital No. 5:
--------------------------
Occupation: 2.000 Energy: -0.72859 a.u.
( 1 O 3s : -0.27) ( 1 O 1p0 : 0.46) ( 1 O 2p0 : 0.24)
( 2 O 3s : -0.27) ( 2 O 1p0 : -0.46) ( 2 O 2p0 : -0.24)
Molecular Orbital No. 6:
--------------------------
Occupation: 1.951 Energy: -0.69815 a.u.
( 1 O 1p-1: -0.45) ( 1 O 2p-1: -0.28) ( 2 O 1p-1: -0.45)
( 2 O 2p-1: -0.28)
Molecular Orbital No. 7:
--------------------------
Occupation: 1.951 Energy: -0.69815 a.u.
( 1 O 1p+1: 0.45) ( 1 O 2p+1: 0.28) ( 2 O 1p+1: 0.45)
( 2 O 2p+1: 0.28)
Molecular Orbital No. 8:
--------------------------
Occupation: 1.049 Energy: -0.20171 a.u.
( 1 O 1p+1: 0.45) ( 1 O 1p-1: -0.30) ( 1 O 2p+1: 0.33)
( 1 O 2p-1: -0.22) ( 2 O 1p+1: -0.45) ( 2 O 1p-1: 0.30)
( 2 O 2p+1: -0.33) ( 2 O 2p-1: 0.22)
Molecular Orbital No. 9:
--------------------------
Occupation: 1.049 Energy: -0.20171 a.u.
( 1 O 1p+1: -0.30) ( 1 O 1p-1: -0.45) ( 1 O 2p+1: -0.22)
( 1 O 2p-1: -0.33) ( 2 O 1p+1: 0.30) ( 2 O 1p-1: 0.45)
( 2 O 2p+1: 0.22) ( 2 O 2p-1: 0.33)
Molecular Orbital No. 10:
--------------------------
Occupation: 0.000 Energy: 0.49680 a.u.
( 1 O 2s : 0.18) ( 1 O 3s : 1.38) ( 1 O 1p0 : 0.39)
( 1 O 2p0 : 1.29) ( 2 O 2s : -0.18) ( 2 O 3s : -1.38)
( 2 O 1p0 : 0.39) ( 2 O 2p0 : 1.29)
Molecular Orbital No. 11:
--------------------------
Occupation: 0.000 Energy: 1.09570 a.u.
( 1 O 3s : 1.01) ( 1 O 1p0 : -0.72) ( 1 O 2p0 : 1.31)
( 2 O 3s : -1.01) ( 2 O 1p0 : -0.72) ( 2 O 2p0 : 1.31)
Molecular Orbital No. 12:
--------------------------
Occupation: 0.000 Energy: 1.11142 a.u.
( 1 O 1p+1: -0.24) ( 1 O 1p-1: -0.63) ( 1 O 2p+1: 0.22)
( 1 O 2p-1: 0.58) ( 2 O 1p+1: -0.24) ( 2 O 1p-1: -0.63)
( 2 O 2p+1: 0.22) ( 2 O 2p-1: 0.58)
Dipole moment for state 1
---------------------------
X : 0.000000 a.u. 0.000000 Debye
Y : -0.000000 a.u. -0.000000 Debye
Z : -0.000000 a.u. -0.000000 Debye
Total : 0.000000 a.u. 0.000000 Debye
Total MCSCF time: 00:00:00
MCSCF Gradient Driver Setup
=============================
Gradient Type : Analytical
Molecular Geometry (Angstroms)
--------------------------------
Atom Coordinate X Coordinate Y Coordinate Z
O -0.000005703805 -0.000000058396 -0.592372883565
O 0.000005703805 0.000000058396 0.592372883565
Analytical Gradient (Hartree/Bohr)
------------------------------------
Atom Gradient X Gradient Y Gradient Z
O -0.000000140314 -0.000000001203 -0.005230603432
O 0.000000140314 0.000000001203 0.005230603431
*** Time spent in gradient calculation: 1.72 sec ***
* Info * Energy : -149.6472639498 a.u.
* Info * Gradient : 5.230603e-03 a.u. (RMS)
* Info * 5.230603e-03 a.u. (Max)
* Info * Time : 1.87 sec
* Info * Computing energy and gradient...
Multi-Configurational Self-Consistent Field Driver
====================================================
Active space definition:
------------------------
Number of inactive (occupied) orbitals: 5
Number of active orbitals: 4
Number of virtual orbitals: 19
This is a CASSCF wavefunction: CAS(6,4)
CI expansion:
-------------
Number of determinants: 6
╭────────────────────────────────────╮
│ Driver settings │
╰────────────────────────────────────╯
Number of states : 1
State-specific calculation
- State of interest : 1
Max. iterations : 50
BFGS window : 5
Convergence thresholds:
- Energy change : 1e-08
- Gradient sq. norm : 1e-08
MCSCF Iterations
-------------------
Iter. | Average Energy | E. Change | Grad. Norm | CI Iter. | Trust rad. | Time
---------------------------------------------------------------------------------
1 -149.647268536 0.0e+00 3.8e-05 0 0.40 0:00:00
2 -149.647277950 -9.4e-06 1.8e-06 0 0.40 0:00:00
3 -149.647278592 -6.4e-07 6.9e-08 0 0.48 0:00:00
4 -149.647278605 -1.4e-08 1.6e-09 0 0.48 0:00:00
5 -149.647278606 -4.1e-10 5.3e-11 0 0.48 0:00:00
** Convergence reached in 5 iterations
6 -149.647278606 -1.4e-11 4.9e-12 0 0.58 0:00:00
Final results
-------------
* State 1
- S^2 : 2.00 (multiplicity = 3.0 )
- Energy : -149.647278605737
- Natural orbitals
1.95195 1.95195 1.04805 1.04805
Spin Restricted Orbitals
------------------------
Molecular Orbital No. 3:
--------------------------
Occupation: 2.000 Energy: -1.67139 a.u.
( 1 O 2s : -0.34) ( 1 O 3s : -0.26) ( 1 O 1p0 : -0.17)
( 2 O 2s : -0.34) ( 2 O 3s : -0.26) ( 2 O 1p0 : 0.17)
Molecular Orbital No. 4:
--------------------------
Occupation: 2.000 Energy: -1.08277 a.u.
( 1 O 2s : 0.36) ( 1 O 3s : 0.46) ( 2 O 2s : -0.36)
( 2 O 3s : -0.46)
Molecular Orbital No. 5:
--------------------------
Occupation: 2.000 Energy: -0.72956 a.u.
( 1 O 3s : 0.28) ( 1 O 1p0 : -0.46) ( 1 O 2p0 : -0.24)
( 2 O 3s : 0.28) ( 2 O 1p0 : 0.46) ( 2 O 2p0 : 0.24)
Molecular Orbital No. 6:
--------------------------
Occupation: 1.952 Energy: -0.69970 a.u.
( 1 O 1p-1: -0.45) ( 1 O 2p-1: -0.28) ( 2 O 1p-1: -0.45)
( 2 O 2p-1: -0.28)
Molecular Orbital No. 7:
--------------------------
Occupation: 1.952 Energy: -0.69970 a.u.
( 1 O 1p+1: -0.45) ( 1 O 2p+1: -0.28) ( 2 O 1p+1: -0.45)
( 2 O 2p+1: -0.28)
Molecular Orbital No. 8:
--------------------------
Occupation: 1.048 Energy: -0.20019 a.u.
( 1 O 1p-1: 0.53) ( 1 O 2p-1: 0.39) ( 2 O 1p-1: -0.53)
( 2 O 2p-1: -0.39)
Molecular Orbital No. 9:
--------------------------
Occupation: 1.048 Energy: -0.20019 a.u.
( 1 O 1p+1: -0.53) ( 1 O 2p+1: -0.39) ( 2 O 1p+1: 0.53)
( 2 O 2p+1: 0.39)
Molecular Orbital No. 10:
--------------------------
Occupation: 0.000 Energy: 0.50077 a.u.
( 1 O 2s : 0.18) ( 1 O 3s : 1.40) ( 1 O 1p0 : 0.38)
( 1 O 2p0 : 1.30) ( 2 O 2s : -0.18) ( 2 O 3s : -1.40)
( 2 O 1p0 : 0.38) ( 2 O 2p0 : 1.30)
Molecular Orbital No. 11:
--------------------------
Occupation: 0.000 Energy: 1.09718 a.u.
( 1 O 3s : -1.01) ( 1 O 1p0 : 0.72) ( 1 O 2p0 : -1.31)
( 2 O 3s : 1.01) ( 2 O 1p0 : 0.72) ( 2 O 2p0 : -1.31)
Molecular Orbital No. 12:
--------------------------
Occupation: 0.000 Energy: 1.11113 a.u.
( 1 O 1p+1: -0.24) ( 1 O 1p-1: -0.63) ( 1 O 2p+1: 0.22)
( 1 O 2p-1: 0.58) ( 2 O 1p+1: -0.24) ( 2 O 1p-1: -0.63)
( 2 O 2p+1: 0.22) ( 2 O 2p-1: 0.58)
Dipole moment for state 1
---------------------------
X : 0.000000 a.u. 0.000000 Debye
Y : -0.000000 a.u. -0.000000 Debye
Z : -0.000000 a.u. -0.000000 Debye
Total : 0.000000 a.u. 0.000000 Debye
Total MCSCF time: 00:00:00
MCSCF Gradient Driver Setup
=============================
Gradient Type : Analytical
Molecular Geometry (Angstroms)
--------------------------------
Atom Coordinate X Coordinate Y Coordinate Z
O -0.000003226141 -0.000000039475 -0.590776214608
O 0.000003226141 0.000000039475 0.590776214654
Analytical Gradient (Hartree/Bohr)
------------------------------------
Atom Gradient X Gradient Y Gradient Z
O 0.000000055898 0.000000000444 0.000398908188
O -0.000000055898 -0.000000000444 -0.000398908189
*** Time spent in gradient calculation: 1.67 sec ***
* Info * Energy : -149.6472786057 a.u.
* Info * Gradient : 3.989082e-04 a.u. (RMS)
* Info * 3.989082e-04 a.u. (Max)
* Info * Time : 1.84 sec
* Info * Computing energy and gradient...
Multi-Configurational Self-Consistent Field Driver
====================================================
Active space definition:
------------------------
Number of inactive (occupied) orbitals: 5
Number of active orbitals: 4
Number of virtual orbitals: 19
This is a CASSCF wavefunction: CAS(6,4)
CI expansion:
-------------
Number of determinants: 6
╭────────────────────────────────────╮
│ Driver settings │
╰────────────────────────────────────╯
Number of states : 1
State-specific calculation
- State of interest : 1
Max. iterations : 50
BFGS window : 5
Convergence thresholds:
- Energy change : 1e-08
- Gradient sq. norm : 1e-08
MCSCF Iterations
-------------------
Iter. | Average Energy | E. Change | Grad. Norm | CI Iter. | Trust rad. | Time
---------------------------------------------------------------------------------
1 -149.647278639 0.0e+00 1.9e-07 0 0.40 0:00:00
2 -149.647278686 -4.7e-08 9.2e-09 0 0.40 0:00:00
3 -149.647278689 -3.2e-09 3.5e-10 0 0.48 0:00:00
** Convergence reached in 3 iterations
4 -149.647278689 -7.0e-11 8.0e-12 0 0.48 0:00:00
Final results
-------------
* State 1
- S^2 : 2.00 (multiplicity = 3.0 )
- Energy : -149.64727868936788
- Natural orbitals
1.95190 1.95190 1.04810 1.04810
Spin Restricted Orbitals
------------------------
Molecular Orbital No. 3:
--------------------------
Occupation: 2.000 Energy: -1.67117 a.u.
( 1 O 2s : -0.34) ( 1 O 3s : -0.26) ( 1 O 1p0 : -0.17)
( 2 O 2s : -0.34) ( 2 O 3s : -0.26) ( 2 O 1p0 : 0.17)
Molecular Orbital No. 4:
--------------------------
Occupation: 2.000 Energy: -1.08284 a.u.
( 1 O 2s : -0.36) ( 1 O 3s : -0.46) ( 2 O 2s : 0.36)
( 2 O 3s : 0.46)
Molecular Orbital No. 5:
--------------------------
Occupation: 2.000 Energy: -0.72949 a.u.
( 1 O 3s : 0.28) ( 1 O 1p0 : -0.46) ( 1 O 2p0 : -0.24)
( 2 O 3s : 0.28) ( 2 O 1p0 : 0.46) ( 2 O 2p0 : 0.24)
Molecular Orbital No. 6:
--------------------------
Occupation: 1.952 Energy: -0.69959 a.u.
( 1 O 1p-1: -0.45) ( 1 O 2p-1: -0.28) ( 2 O 1p-1: -0.45)
( 2 O 2p-1: -0.28)
Molecular Orbital No. 7:
--------------------------
Occupation: 1.952 Energy: -0.69959 a.u.
( 1 O 1p+1: -0.45) ( 1 O 2p+1: -0.28) ( 2 O 1p+1: -0.45)
( 2 O 2p+1: -0.28)
Molecular Orbital No. 8:
--------------------------
Occupation: 1.048 Energy: -0.20029 a.u.
( 1 O 1p+1: -0.53) ( 1 O 2p+1: -0.40) ( 2 O 1p+1: 0.53)
( 2 O 2p+1: 0.40)
Molecular Orbital No. 9:
--------------------------
Occupation: 1.048 Energy: -0.20029 a.u.
( 1 O 1p-1: 0.53) ( 1 O 2p-1: 0.40) ( 2 O 1p-1: -0.53)
( 2 O 2p-1: -0.40)
Molecular Orbital No. 10:
--------------------------
Occupation: 0.000 Energy: 0.50049 a.u.
( 1 O 2s : 0.18) ( 1 O 3s : 1.40) ( 1 O 1p0 : 0.38)
( 1 O 2p0 : 1.30) ( 2 O 2s : -0.18) ( 2 O 3s : -1.40)
( 2 O 1p0 : 0.38) ( 2 O 2p0 : 1.30)
Molecular Orbital No. 11:
--------------------------
Occupation: 0.000 Energy: 1.09707 a.u.
( 1 O 3s : 1.01) ( 1 O 1p0 : -0.72) ( 1 O 2p0 : 1.31)
( 2 O 3s : -1.01) ( 2 O 1p0 : -0.72) ( 2 O 2p0 : 1.31)
Molecular Orbital No. 12:
--------------------------
Occupation: 0.000 Energy: 1.11115 a.u.
( 1 O 1p-1: 0.67) ( 1 O 2p-1: -0.62) ( 2 O 1p-1: 0.67)
( 2 O 2p-1: -0.62)
Dipole moment for state 1
---------------------------
X : 0.000000 a.u. 0.000000 Debye
Y : -0.000000 a.u. -0.000000 Debye
Z : -0.000000 a.u. -0.000000 Debye
Total : 0.000000 a.u. 0.000000 Debye
Total MCSCF time: 00:00:00
MCSCF Gradient Driver Setup
=============================
Gradient Type : Analytical
Molecular Geometry (Angstroms)
--------------------------------
Atom Coordinate X Coordinate Y Coordinate Z
O -0.000004387412 -0.000000048500 -0.590889354832
O 0.000004387412 0.000000048500 0.590889354893
Analytical Gradient (Hartree/Bohr)
------------------------------------
Atom Gradient X Gradient Y Gradient Z
O -0.000000099377 -0.000000000771 -0.000005685890
O 0.000000099377 0.000000000771 0.000005685890
*** Time spent in gradient calculation: 1.66 sec ***
* Info * Energy : -149.6472786894 a.u.
* Info * Gradient : 5.686758e-06 a.u. (RMS)
* Info * 5.686758e-06 a.u. (Max)
* Info * Time : 1.77 sec
* Info * Geometry optimization completed.
Final Geometry (Angstroms)
============================
Atom Coordinate X Coordinate Y Coordinate Z
O -0.000004387412 -0.000000048500 -0.590889354832
O 0.000004387412 0.000000048500 0.590889354893
Summary of Geometry Optimization
==================================
Opt.Step Energy (a.u.) Energy Change (a.u.) Displacement (RMS, Max)
-------------------------------------------------------------------------------------
0 -149.646745651691 0.000000000000 0.000e+00 0.000e+00
1 -149.647263949850 -0.000518298158 7.627e-03 7.627e-03
2 -149.647278605737 -0.000014655887 1.597e-03 1.597e-03
3 -149.647278689368 -0.000000083631 1.131e-04 1.131e-04
Statistical Deviation between
Optimized Geometry and Initial Geometry
=========================================
Internal Coord. RMS deviation Max. deviation
-----------------------------------------------------------
Bonds 0.018 Angstrom 0.018 Angstrom
*** Time spent in Optimization Driver: 7.27 sec
We can now use this new geometry in subsequent calculations.
molecule = vlx.Molecule.read_xyz_string(opt_results['final_geometry'])
molecule.set_multiplicity(3)
mc_results = mcscfdrv.compute(molecule,basis,space)
Multi-Configurational Self-Consistent Field Driver
====================================================
Active space definition:
------------------------
Number of inactive (occupied) orbitals: 5
Number of active orbitals: 4
Number of virtual orbitals: 19
This is a CASSCF wavefunction: CAS(6,4)
CI expansion:
-------------
Number of determinants: 6
╭────────────────────────────────────╮
│ Driver settings │
╰────────────────────────────────────╯
Number of states : 1
State-specific calculation
- State of interest : 1
Max. iterations : 50
BFGS window : 5
Convergence thresholds:
- Energy change : 1e-08
- Gradient sq. norm : 1e-08
MCSCF Iterations
-------------------
Iter. | Average Energy | E. Change | Grad. Norm | CI Iter. | Trust rad. | Time
---------------------------------------------------------------------------------
-137.56704249990722
1 -149.647278689 0.0e+00 8.0e-12 0 0.40 0:00:00
** Convergence reached in 1 iterations
-137.56704221745852
2 -149.647278689 -2.0e-12 5.4e-13 0 0.40 0:00:00
Final results
-------------
* State 1
- S^2 : 2.00 (multiplicity = 3.0 )
- Energy : -149.64727868936984
- Natural orbitals
1.95190 1.95190 1.04810 1.04810
Spin Restricted Orbitals
------------------------
Molecular Orbital No. 3:
--------------------------
Occupation: 2.000 Energy: -1.67118 a.u.
( 1 O 2s : 0.34) ( 1 O 3s : 0.26) ( 1 O 1p0 : 0.17)
( 2 O 2s : 0.34) ( 2 O 3s : 0.26) ( 2 O 1p0 : -0.17)
Molecular Orbital No. 4:
--------------------------
Occupation: 2.000 Energy: -1.08284 a.u.
( 1 O 2s : 0.36) ( 1 O 3s : 0.46) ( 2 O 2s : -0.36)
( 2 O 3s : -0.46)
Molecular Orbital No. 5:
--------------------------
Occupation: 2.000 Energy: -0.72950 a.u.
( 1 O 3s : -0.28) ( 1 O 1p0 : 0.46) ( 1 O 2p0 : 0.24)
( 2 O 3s : -0.28) ( 2 O 1p0 : -0.46) ( 2 O 2p0 : -0.24)
Molecular Orbital No. 6:
--------------------------
Occupation: 1.952 Energy: -0.69959 a.u.
( 1 O 1p+1: -0.45) ( 1 O 2p+1: -0.28) ( 2 O 1p+1: -0.45)
( 2 O 2p+1: -0.28)
Molecular Orbital No. 7:
--------------------------
Occupation: 1.952 Energy: -0.69959 a.u.
( 1 O 1p-1: 0.45) ( 1 O 2p-1: 0.28) ( 2 O 1p-1: 0.45)
( 2 O 2p-1: 0.28)
Molecular Orbital No. 8:
--------------------------
Occupation: 1.048 Energy: -0.20030 a.u.
( 1 O 1p-1: -0.53) ( 1 O 2p-1: -0.39) ( 2 O 1p-1: 0.53)
( 2 O 2p-1: 0.39)
Molecular Orbital No. 9:
--------------------------
Occupation: 1.048 Energy: -0.20030 a.u.
( 1 O 1p+1: 0.53) ( 1 O 2p+1: 0.39) ( 2 O 1p+1: -0.53)
( 2 O 2p+1: -0.39)
Molecular Orbital No. 10:
--------------------------
Occupation: 0.000 Energy: 0.50049 a.u.
( 1 O 2s : 0.18) ( 1 O 3s : 1.40) ( 1 O 1p0 : 0.38)
( 1 O 2p0 : 1.30) ( 2 O 2s : -0.18) ( 2 O 3s : -1.40)
( 2 O 1p0 : 0.38) ( 2 O 2p0 : 1.30)
Molecular Orbital No. 11:
--------------------------
Occupation: 0.000 Energy: 1.09707 a.u.
( 1 O 3s : -1.01) ( 1 O 1p0 : 0.72) ( 1 O 2p0 : -1.31)
( 2 O 3s : 1.01) ( 2 O 1p0 : 0.72) ( 2 O 2p0 : -1.31)
Molecular Orbital No. 12:
--------------------------
Occupation: 0.000 Energy: 1.11115 a.u.
( 1 O 1p-1: 0.67) ( 1 O 2p-1: -0.62) ( 2 O 1p-1: 0.67)
( 2 O 2p-1: -0.62)
Dipole moment for state 1
---------------------------
X : 0.000000 a.u. 0.000000 Debye
Y : -0.000000 a.u. -0.000000 Debye
Z : -0.000000 a.u. -0.000000 Debye
Total : 0.000000 a.u. 0.000000 Debye
Total MCSCF time: 00:00:00
Spectroscopy#
State-averaging#
MCSCF is commonly used to simulate spectroscopy and photochemistry. There are several ways to compute excited state properties from a MCSCF calculation. As discussed in the previous section, one way is to use state-averaging:
Let’s go back to our furan calculation. First we compute a SA-CASSCF with 5 states:
furan_xyz="""9
C -0.86213 -0.90784 0.00007
H -1.63433 -1.64264 -0.00003
C 0.50727 -0.90524 0.00007
C 0.92057 0.47886 -0.00003
C -0.22323 1.23186 -0.00003
O -1.35123 0.40376 -0.00013
H 1.17117 -1.74724 0.00017
H 1.93767 0.81866 0.00007
H -0.46573 2.26986 -0.00013
"""
molecule = vlx.Molecule.from_xyz_string(furan_xyz)
basis = vlx.MolecularBasis.read(molecule,"def2-sv(p)")
#We use a previously stored h5 file for the active space
space=mtp.OrbSpace(molecule,"furan-cas.h5")
mcscfdrv=mtp.McscfDriver()
mc_results = mcscfdrv.compute(molecule,basis,space, 5) #state-averaged with 5 states
Multi-Configurational Self-Consistent Field Driver
====================================================
Active space definition:
------------------------
Number of inactive (occupied) orbitals: 15
Number of active orbitals: 5
Number of virtual orbitals: 58
This is a CASSCF wavefunction: CAS(6,5)
CI expansion:
-------------
Number of determinants: 100
╭────────────────────────────────────╮
│ Driver settings │
╰────────────────────────────────────╯
Number of states : 5
State-averaged calculation
- Equal-weights
Max. iterations : 50
BFGS window : 5
Convergence thresholds:
- Energy change : 1e-08
- Gradient sq. norm : 1e-08
MCSCF Iterations
-------------------
Iter. | Average Energy | E. Change | Grad. Norm | CI Iter. | Trust rad. | Time
---------------------------------------------------------------------------------
-221.02436914119917
1 -228.205366929 0.0e+00 1.2e-02 0 0.40 0:00:00
-221.11232242560243
2 -228.213831217 -8.5e-03 2.3e-03 0 0.40 0:00:00
-221.08779067716947
3 -228.215377854 -1.5e-03 1.5e-04 0 0.40 0:00:00
-221.0793666929654
4 -228.215447933 -7.0e-05 7.6e-06 0 0.40 0:00:00
-221.07749077359227
5 -228.215453216 -5.3e-06 3.8e-07 0 0.48 0:00:00
-221.07764228479616
6 -228.215453415 -2.0e-07 1.5e-08 0 0.48 0:00:00
-221.07770568773242
7 -228.215453427 -1.1e-08 9.2e-10 0 0.58 0:00:00
-221.07772067117494
8 -228.215453427 -8.4e-10 1.0e-10 0 0.69 0:00:00
** Convergence reached in 8 iterations
-221.07772185826926
9 -228.215453428 -8.2e-11 6.3e-12 0 0.80 0:00:00
Final results
-------------
* State 1
- S^2 : 0.00 (multiplicity = 1.0 )
- Energy : -228.4783412092752
- Natural orbitals
1.99074 1.94986 1.91215 0.08956 0.05769
* State 2
- S^2 : -0.00 (multiplicity = 1.0 )
- Energy : -228.2309905540425
- Natural orbitals
1.98634 1.42528 1.36764 0.71676 0.50397
* State 3
- S^2 : 0.00 (multiplicity = 1.0 )
- Energy : -228.17818204219557
- Natural orbitals
1.97600 1.92524 1.04985 0.95755 0.09136
* State 4
- S^2 : 0.00 (multiplicity = 1.0 )
- Energy : -228.11206127389696
- Natural orbitals
1.95728 1.39691 1.26196 1.04743 0.33642
* State 5
- S^2 : 0.00 (multiplicity = 1.0 )
- Energy : -228.07769205817388
- Natural orbitals
1.95524 1.05576 1.90502 0.12628 0.95770
Spin Restricted Orbitals
------------------------
Molecular Orbital No. 14:
--------------------------
Occupation: 2.000 Energy: -0.57702 a.u.
( 3 C 1p+1: -0.15) ( 3 C 1p-1: 0.19) ( 4 C 1p+1: -0.23)
( 5 C 1p+1: 0.15) ( 6 O 1p+1: -0.46) ( 6 O 2p+1: -0.34)
( 7 H 1s : -0.18) ( 8 H 1s : -0.18)
Molecular Orbital No. 15:
--------------------------
Occupation: 2.000 Energy: -0.54833 a.u.
( 1 C 1p+1: 0.23) ( 2 H 1s : -0.15) ( 3 C 1p+1: -0.19)
( 3 C 1p-1: -0.32) ( 3 C 2p-1: -0.16) ( 4 C 1p-1: 0.37)
( 4 C 2p-1: 0.17) ( 5 C 1p+1: 0.19) ( 9 H 1s : -0.15)
Molecular Orbital No. 16:
--------------------------
Occupation: 1.936 Energy: -0.59151 a.u.
( 1 C 1p0 : 0.21) ( 3 C 1p0 : 0.18) ( 4 C 1p0 : 0.18)
( 5 C 1p0 : 0.21) ( 6 O 1p0 : 0.42) ( 6 O 2p0 : 0.28)
Molecular Orbital No. 17:
--------------------------
Occupation: 1.554 Energy: -0.35333 a.u.
( 3 C 1p0 : 0.31) ( 3 C 2p0 : 0.24) ( 4 C 1p0 : 0.30)
( 4 C 2p0 : 0.24) ( 6 O 1p0 : -0.42) ( 6 O 2p0 : -0.34)
Molecular Orbital No. 18:
--------------------------
Occupation: 1.488 Energy: -0.26114 a.u.
( 1 C 1p0 : -0.36) ( 1 C 2p0 : -0.28) ( 3 C 1p0 : -0.23)
( 3 C 2p0 : -0.21) ( 4 C 1p0 : 0.24) ( 4 C 2p0 : 0.21)
( 5 C 1p0 : 0.36) ( 5 C 2p0 : 0.28)
Molecular Orbital No. 19:
--------------------------
Occupation: 0.621 Energy: 0.06888 a.u.
( 1 C 1p0 : -0.39) ( 1 C 2p0 : -0.47) ( 3 C 1p0 : 0.19)
( 3 C 2p0 : 0.29) ( 4 C 1p0 : 0.19) ( 4 C 2p0 : 0.29)
( 5 C 1p0 : -0.39) ( 5 C 2p0 : -0.47) ( 6 O 1p0 : 0.31)
( 6 O 2p0 : 0.36)
Molecular Orbital No. 20:
--------------------------
Occupation: 0.400 Energy: 0.17771 a.u.
( 1 C 1p0 : -0.29) ( 1 C 2p0 : -0.42) ( 3 C 1p0 : 0.39)
( 3 C 2p0 : 0.68) ( 4 C 1p0 : -0.39) ( 4 C 2p0 : -0.68)
( 5 C 1p0 : 0.29) ( 5 C 2p0 : 0.42)
Molecular Orbital No. 21:
--------------------------
Occupation: 0.000 Energy: 0.20715 a.u.
( 1 C 3s : 0.72) ( 1 C 2p+1: -0.34) ( 1 C 2p-1: -0.29)
( 2 H 2s : -1.10) ( 3 C 3s : 0.92) ( 3 C 2p+1: 0.27)
( 3 C 2p-1: -0.34) ( 4 C 3s : 0.92) ( 4 C 2p+1: 0.41)
( 5 C 3s : 0.72) ( 5 C 2p-1: 0.43) ( 7 H 2s : -1.21)
( 8 H 2s : -1.21) ( 9 H 2s : -1.10)
Molecular Orbital No. 22:
--------------------------
Occupation: 0.000 Energy: 0.23049 a.u.
( 1 C 3s : -0.72) ( 1 C 2p+1: 0.87) ( 1 C 2p-1: 0.82)
( 2 H 2s : 1.91) ( 3 C 3s : -1.07) ( 3 C 2p-1: -0.29)
( 4 C 3s : 1.07) ( 4 C 2p+1: -0.20) ( 4 C 2p-1: -0.22)
( 5 C 3s : 0.72) ( 5 C 1p-1: 0.16) ( 5 C 2p+1: -0.28)
( 5 C 2p-1: 1.16) ( 7 H 2s : 0.25) ( 8 H 2s : -0.24)
( 9 H 2s : -1.91)
Dipole moment for state 1
---------------------------
X : 0.471344 a.u. 1.198036 Debye
Y : -0.141331 a.u. -0.359227 Debye
Z : 0.000099 a.u. 0.000251 Debye
Total : 0.492077 a.u. 1.250734 Debye
Dipole moment for state 2
---------------------------
X : 0.714621 a.u. 1.816387 Debye
Y : -0.212836 a.u. -0.540974 Debye
Z : -0.000003 a.u. -0.000008 Debye
Total : 0.745643 a.u. 1.895234 Debye
Dipole moment for state 3
---------------------------
X : -0.023581 a.u. -0.059936 Debye
Y : 0.007180 a.u. 0.018249 Debye
Z : -0.000038 a.u. -0.000097 Debye
Total : 0.024650 a.u. 0.062653 Debye
Dipole moment for state 4
---------------------------
X : -0.174732 a.u. -0.444125 Debye
Y : 0.051698 a.u. 0.131403 Debye
Z : -0.000037 a.u. -0.000095 Debye
Total : 0.182220 a.u. 0.463156 Debye
Dipole moment for state 5
---------------------------
X : -0.293265 a.u. -0.745404 Debye
Y : 0.089145 a.u. 0.226583 Debye
Z : -0.000052 a.u. -0.000133 Debye
Total : 0.306514 a.u. 0.779081 Debye
Total MCSCF time: 00:00:02
Now we can compute the transition properties using the InterState module. This module requires the dictionary returned by the MCSCF.
#Compute oscillator strengths
SI=mtp.StateInteraction()
Prop_dict=SI.compute(molecule,basis, mc_results)
List of oscillator strengths greather than 1e-10
From to Energy (eV) Oscillator strength (length and velocity)
1 2 6.73075 3.538251e-03 1.585306e-03
1 3 8.16775 2.119360e-01 1.437357e-01
1 4 9.96698 6.215234e-01 4.429841e-01
1 5 10.90222 4.134625e-01 2.851360e-01
List of rotatory strengths greather than 1e-10
From to Energy (eV) Rot. strength (a.u. and 10^-40 cgs)
1 2 6.73075 1.611898e-07 7.599192e-05
1 3 8.16775 -5.951648e-06 -2.805867e-03
1 4 9.96698 -1.394164e-05 -6.572697e-03
1 5 10.90222 2.556222e-05 1.205115e-02
The function returns a dictionary with the most important values.
print(Prop_dict["energies"])
print(Prop_dict["oscillator_strengths"])
[0.24735066 0.30015917 0.36627994 0.40064915]
[0.00353825 0.21193598 0.62152339 0.41346248]
By default InterState computes properties from the first state to all others, but this can be changed by providing the list of “initial” and “final” states as arguments.
Prop_dict=SI.compute(molecule,basis,mc_results, from_states=[0,1], to_states='all' )
List of oscillator strengths greather than 1e-10
From to Energy (eV) Oscillator strength (length and velocity)
1 2 6.73075 3.538251e-03 1.585306e-03
1 3 8.16775 2.119360e-01 1.437357e-01
1 4 9.96698 6.215234e-01 4.429841e-01
1 5 10.90222 4.134625e-01 2.851360e-01
2 1 -6.73075 -3.538251e-03 -1.585306e-03
2 3 1.43699 2.336494e-02 1.580513e-02
2 4 3.23623 1.119135e-03 3.834218e-04
2 5 4.17146 9.031471e-02 8.060789e-02
List of rotatory strengths greather than 1e-10
From to Energy (eV) Rot. strength (a.u. and 10^-40 cgs)
1 2 6.73075 1.611898e-07 7.599192e-05
1 3 8.16775 -5.951648e-06 -2.805867e-03
1 4 9.96698 -1.394164e-05 -6.572697e-03
1 5 10.90222 2.556222e-05 1.205115e-02
2 1 -6.73075 -1.611898e-07 -7.599192e-05
2 3 1.43699 1.719467e-05 8.106316e-03
2 4 3.23623 -1.513812e-07 -7.136769e-05
2 5 4.17146 -5.940166e-06 -2.800454e-03
Linear response#
Another way to compute excited state properties at the MCSCF level is using linear response. This multiconfigurational linear response (MCLR) requires first a MCSCF calculation of the ground state and then the use of the Mclr_EigenSolver module:
mcscfdrv=mtp.McscfDriver()
mc_results = mcscfdrv.compute(molecule,basis,space) #only ground state!
mcrpa = mtp.Mclr_EigenSolver()
Prop_dict = mcrpa.compute(molecule, basis, mcscfdrv, n_states = 2)
Multi-Configurational Self-Consistent Field Driver
====================================================
Active space definition:
------------------------
Number of inactive (occupied) orbitals: 15
Number of active orbitals: 5
Number of virtual orbitals: 58
This is a CASSCF wavefunction: CAS(6,5)
CI expansion:
-------------
Number of determinants: 100
╭────────────────────────────────────╮
│ Driver settings │
╰────────────────────────────────────╯
Number of states : 1
State-specific calculation
- State of interest : 1
Max. iterations : 50
BFGS window : 5
Convergence thresholds:
- Energy change : 1e-08
- Gradient sq. norm : 1e-08
MCSCF Iterations
-------------------
Iter. | Average Energy | E. Change | Grad. Norm | CI Iter. | Trust rad. | Time
---------------------------------------------------------------------------------
-221.07772185826911
1 -228.478341209 0.0e+00 1.1e-02 0 0.40 0:00:00
-221.0138968391104
2 -228.486966462 -8.6e-03 1.2e-03 0 0.40 0:00:00
-221.01661744826515
3 -228.487913506 -9.5e-04 1.7e-04 0 0.48 0:00:00
-221.00739552678036
4 -228.488006283 -9.3e-05 1.2e-05 0 0.48 0:00:00
-221.00576616495707
5 -228.488013836 -7.6e-06 6.8e-07 0 0.58 0:00:00
-221.00537847654934
6 -228.488014063 -2.3e-07 2.1e-08 0 0.58 0:00:00
-221.00541810283949
7 -228.488014075 -1.2e-08 1.5e-09 0 0.58 0:00:00
-221.00542860526045
8 -228.488014077 -1.3e-09 8.6e-11 0 0.69 0:00:00
** Convergence reached in 8 iterations
-221.0054304134543
9 -228.488014077 -6.2e-11 7.5e-12 0 0.69 0:00:00
Final results
-------------
* State 1
- S^2 : 0.00 (multiplicity = 1.0 )
- Energy : -228.48801407684167
- Natural orbitals
1.99451 1.94212 1.90287 0.09707 0.06342
Spin Restricted Orbitals
------------------------
Molecular Orbital No. 14:
--------------------------
Occupation: 2.000 Energy: -0.55816 a.u.
( 3 C 1p-1: -0.32) ( 4 C 1p+1: 0.19) ( 4 C 1p-1: 0.26)
( 6 O 1p+1: 0.35) ( 6 O 2p+1: 0.26) ( 7 H 1s : 0.20)
( 8 H 1s : 0.20)
Molecular Orbital No. 15:
--------------------------
Occupation: 2.000 Energy: -0.54203 a.u.
( 1 C 1p+1: 0.25) ( 3 C 1p+1: -0.23) ( 3 C 1p-1: -0.18)
( 4 C 1p-1: 0.27) ( 5 C 1p+1: 0.24) ( 6 O 1p+1: -0.34)
( 6 O 2p+1: -0.27)
Molecular Orbital No. 16:
--------------------------
Occupation: 1.995 Energy: -0.58221 a.u.
( 6 O 1p0 : -0.59) ( 6 O 2p0 : -0.43)
Molecular Orbital No. 17:
--------------------------
Occupation: 1.942 Energy: -0.41896 a.u.
( 1 C 1p0 : -0.19) ( 3 C 1p0 : -0.34) ( 3 C 2p0 : -0.23)
( 4 C 1p0 : -0.34) ( 4 C 2p0 : -0.23) ( 5 C 1p0 : -0.19)
( 6 O 2p0 : 0.15)
Molecular Orbital No. 18:
--------------------------
Occupation: 1.903 Energy: -0.30938 a.u.
( 1 C 1p0 : 0.36) ( 1 C 2p0 : 0.28) ( 3 C 1p0 : 0.24)
( 3 C 2p0 : 0.20) ( 4 C 1p0 : -0.24) ( 4 C 2p0 : -0.20)
( 5 C 1p0 : -0.36) ( 5 C 2p0 : -0.28)
Molecular Orbital No. 19:
--------------------------
Occupation: 0.097 Energy: 0.18406 a.u.
( 1 C 1p0 : -0.48) ( 1 C 2p0 : -0.30) ( 3 C 1p0 : 0.30)
( 3 C 2p0 : 0.18) ( 4 C 1p0 : 0.30) ( 4 C 2p0 : 0.18)
( 5 C 1p0 : -0.48) ( 5 C 2p0 : -0.30) ( 6 O 1p0 : 0.28)
( 6 O 2p0 : 0.27)
Molecular Orbital No. 20:
--------------------------
Occupation: 0.063 Energy: 0.28638 a.u.
( 1 C 1p0 : -0.36) ( 1 C 2p0 : -0.24) ( 3 C 1p0 : 0.51)
( 3 C 2p0 : 0.39) ( 4 C 1p0 : -0.51) ( 4 C 2p0 : -0.39)
( 5 C 1p0 : 0.36) ( 5 C 2p0 : 0.24)
Molecular Orbital No. 21:
--------------------------
Occupation: 0.000 Energy: 0.20569 a.u.
( 1 C 3s : -0.62) ( 1 C 2p+1: 0.28) ( 1 C 2p-1: 0.21)
( 2 H 2s : 0.93) ( 3 C 3s : -0.99) ( 3 C 2p+1: -0.30)
( 3 C 2p-1: 0.41) ( 4 C 3s : -0.99) ( 4 C 2p+1: -0.48)
( 4 C 2p-1: -0.18) ( 5 C 3s : -0.62) ( 5 C 2p-1: -0.33)
( 7 H 2s : 1.35) ( 8 H 2s : 1.35) ( 9 H 2s : 0.93)
Molecular Orbital No. 22:
--------------------------
Occupation: 0.000 Energy: 0.23274 a.u.
( 1 C 3s : -0.75) ( 1 C 2p+1: 0.85) ( 1 C 2p-1: 0.79)
( 2 H 2s : 1.89) ( 3 C 3s : -1.12) ( 3 C 2p-1: -0.22)
( 4 C 3s : 1.13) ( 4 C 2p-1: -0.19) ( 5 C 3s : 0.74)
( 5 C 1p-1: 0.16) ( 5 C 2p+1: -0.28) ( 5 C 2p-1: 1.12)
( 7 H 2s : 0.40) ( 8 H 2s : -0.41) ( 9 H 2s : -1.87)
Dipole moment for state 1
---------------------------
X : 0.435396 a.u. 1.106665 Debye
Y : -0.130479 a.u. -0.331644 Debye
Z : 0.000065 a.u. 0.000164 Debye
Total : 0.454526 a.u. 1.155291 Debye
Total MCSCF time: 00:00:02
Multi-Configurational Linear response Eigenvalue Solver
=========================================================
╭────────────────────────────────────╮
│ Driver settings │
╰────────────────────────────────────╯
Number of states : 2
Tamm-Damcoff approximation
Max. iterations : 50
Residual sq. norm threshold : 1e-08
Trial vector settings:
- Lin. dep. threshold : 1e-10
- Min. trial vectors : 6
- Max. trial vectors : 12
Number of parameters:
- CI : 99
- Orbital : 1235
* Initialization time: 00:00:00
MC-TDA Iterations
-----------------
Iter. | Average Energy | Grad. Norm | Converged | CI+Orb vec. | Time
-----------------------------------------------------------------------
1 0.187332156 3.2e-27 2/ 2 2 + 2 0:00:00
** Convergence reached in 1 iterations
Oscillator strength
Transition Energy (Ha) Energy (eV) Length gauge Velocity gauge
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1 0.1608431 4.37676 0.0000000 0.0000000
2 0.2138212 5.81837 0.0000000 0.0000000
Rotatory strength (cgs)
Transition Energy (Ha) Energy (eV) Length gauge Velocity gauge
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1 0.1608431 4.37676 0.0000000 -0.0000000
2 0.2138212 5.81837 -0.0000000 0.0000000
Again, the Prop_dict dictionary gives us access to the most important values.
An advantage of linear response is that unlike state-averaging, the excitation energies does not depend on the number of calculated states (except when the code accidentally converges to a higher solution, in which case increasing the number of states tends to ensure we get actually the lowest ones). Often, linear response provides more accurate excitation energies than state-averaging, the main exception being close to crossing point between the ground and excited states.
Note that currently only the Tamm-Dancoff approximation is available (using the property “mcrpa.tda = True”) which gives a slightly faster but less accurate calculation.