Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

General response functions

Linear response functions

A general linear response function

Ω^;V^ωγ\langle\langle \hat{\Omega}; \hat{V} \rangle \rangle_\omega^\gamma

can be requested, referring to the linear response of the molecular property associated with Ω^\hat{\Omega} due to the perturbation associated with V^\hat{V} and oscillating with the angular frequency ω\omega. The damping term γ\gamma is associated with the inverse lifetime of the excited states.

Python script

import veloxchem as vlx

molecule = vlx.Molecule.read_xyz_string("""4
Hydrogen peroxide
O  -0.65564532 -0.06106286 -0.03621403
O   0.65564532  0.06106286 -0.03621403
H  -0.97628735  0.65082652  0.57474201
H   0.97628735 -0.65082652  0.57474201
""")

basis = vlx.MolecularBasis.read(molecule, "def2-svpd")

scf_drv = vlx.ScfRestrictedDriver()

scf_drv.xcfun = "b3lyp"
scf_results = scf_drv.compute(molecule, basis)

crs = vlx.ComplexResponse()

# available operators
# crs.b_operator = "electric dipole"
# crs.b_operator = "magnetic dipole"
# crs.b_operator = "linear momentum"
# crs.b_operator = "angular momentum"

crs.a_operator = "electric dipole"
crs.b_operator = "magnetic dipole"

crs.a_components = ["x", "y", "z"]
crs.b_components = ["x", "y", "z"]

crs.damping = 0.004556  # 1000 cm-1
crs.frequencies = [0.0656]

crs_results = crs.compute(molecule, basis, scf_results)
                  linear response function
                  ------------------------
      frequency        real        imag
------------------------------------------
xx    0.065600       -0.000588    0.005308
yx    0.065600       -0.004204    0.055644
zx    0.065600        0.000000   -0.000000
xy    0.065600       -0.020577    0.257556
yy    0.065600        0.011233   -0.146043
zy    0.065600       -0.000000    0.000000
xz    0.065600       -0.000000    0.000000
yz    0.065600        0.000000   -0.000000
zz    0.065600       -0.009936    0.130450
------------------------------------------

Quadratic response functions

A general quadratic response function

Ω^;V^1,V^2ω1,ω2γ\langle\langle \hat{\Omega}; \hat{V}_1, \hat{V}_2 \rangle \rangle_{\omega_1, \omega_2}^\gamma

can be requested, referring to the linear response of the molecular property associated with Ω^\hat{\Omega} due to the perturbation associated with V^1\hat{V}_1 and V^2\hat{V}_2 oscillating with the angular frequencies ω1\omega_1 and ω2\omega_2, respectively. The damping term γ\gamma is associated with the inverse lifetime of excited states.

Python script

import veloxchem as vlx

molecule = vlx.Molecule.read_xyz_string("""4
Hydrogen peroxide
O  -0.65564532 -0.06106286 -0.03621403
O   0.65564532  0.06106286 -0.03621403
H  -0.97628735  0.65082652  0.57474201
H   0.97628735 -0.65082652  0.57474201
""")
basis = vlx.MolecularBasis.read(molecule, "def2-svpd")

scf_drv = vlx.ScfRestrictedDriver()

scf_drv.xcfun = "b3lyp"
scf_results = scf_drv.compute(molecule, basis)

qrf_drv = vlx.QuadraticResponseDriver()

qrf_drv.a_operator = "electric dipole"
qrf_drv.b_operator = "magnetic dipole"
qrf_drv.c_operator = "electric dipole"

# available operators
# qrf.b_operator = "electric dipole"
# qrf.b_operator = "magnetic dipole"
# qrf.b_operator = "linear momentum"
# qrf.b_operator = "angular momentum"

qrf_drv.a_component = "z"
qrf_drv.b_component = "x"
qrf_drv.c_component = "x"

qrf_drv.b_frequencies = [0.0656, 0.1312]
qrf_drv.c_frequencies = [0.0656, 0.1312]

qrf_drv.damping = 0.004556  # 1000 cm-1

qrf_results = qrf_drv.compute(molecule, basis, scf_results)
                             quadratic response function
                             ---------------------------
             w1          w2         real        imag
--------------------------------------------------------
zxx     0.065600    0.065600       -0.076106    0.894113
zxx     0.131200    0.131200       -3.887490  -18.883124
--------------------------------------------------------

Cubic response functions

A general cubic response function

Ω^;V^1,V^2,V^3ω1,ω2,ω3γ\langle\langle \hat{\Omega}; \hat{V}_1, \hat{V}_2, \hat{V}_3 \rangle \rangle_{\omega_1, \omega_2, \omega_3}^\gamma

can be requested, referring to the linear response of the molecular property associated with Ω^\hat{\Omega} due to the perturbation associated with V^1\hat{V}_1, V^2\hat{V}_2, and V^3\hat{V}_3 oscillating with the angular frequencies ω1\omega_1, ω2\omega_2, and ω3\omega_3, respectively. The damping term γ\gamma is associated with the inverse lifetime of excited states.

Python script

import veloxchem as vlx

molecule = vlx.Molecule.read_xyz_string("""4
Hydrogen peroxide
O  -0.65564532 -0.06106286 -0.03621403
O   0.65564532  0.06106286 -0.03621403
H  -0.97628735  0.65082652  0.57474201
H   0.97628735 -0.65082652  0.57474201
""")
basis = vlx.MolecularBasis.read(molecule, "def2-svpd")

scf_drv = vlx.ScfRestrictedDriver()

scf_drv.xcfun = "b3lyp"
scf_results = scf_drv.compute(molecule, basis)

crf_drv = vlx.CubicResponseDriver()

crf_drv.a_operator = "electric dipole"
crf_drv.b_operator = "magnetic dipole"
crf_drv.c_operator = "electric dipole"
crf_drv.d_operator = "electric dipole"

# available operators
# crf.b_operator = "electric dipole"
# crf.b_operator = "magnetic dipole"
# crf.b_operator = "linear momentum"
# crf.b_operator = "angular momentum"

crf_drv.a_component = "z"
crf_drv.b_component = "x"
crf_drv.c_component = "x"
crf_drv.d_component = "z"

crf_drv.b_frequencies = [0.0656, 0.1312]
crf_drv.c_frequencies = [0.0656, 0.1312]
crf_drv.d_frequencies = [0.0656, 0.1312]

crf_drv.damping = 0.004556  # 1000 cm-1

crf_results = crf_drv.compute(molecule, basis, scf_results)
                                                cubic response function
                                              ---------------------------
             w1           w2         w3         real            imag
-------------------------------------------------------------------------
zxxz     0.065600    0.065600    0.065600      -15.338804       99.679290
zxxz     0.131200    0.131200    0.131200     -535.667592     3266.107110
-------------------------------------------------------------------------