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_smiles("OO")
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.012944    0.172460
yx    0.065600       -0.001355    0.024436
zx    0.065600       -0.184629    2.548857
xy    0.065600        0.013222   -0.185233
yy    0.065600       -0.008363    0.109692
zy    0.065600       -0.018178    0.247708
xz    0.065600        0.120289   -1.685728
yz    0.065600        0.003839   -0.058276
zz    0.065600        0.021634   -0.287929
------------------------------------------

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_smiles("OO")
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.058593    0.734731
zxx     0.131200    0.131200      -11.027214   29.681876
--------------------------------------------------------

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_smiles("OO")
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        2.567207       -4.224185
zxxz     0.131200    0.131200    0.131200    -2782.581532    -1021.676176
-------------------------------------------------------------------------