Linear response functions¶
A general linear response function
can be requested, referring to the linear response of the molecular property associated with Ω^ due to the perturbation associated with V^ and oscillating with the angular frequency ω. The damping term γ 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)
Self Consistent Field Driver Setup
====================================
Wave Function Model : Spin-Restricted Kohn-Sham
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
Exchange-Correlation Functional : B3LYP
Molecular Grid Level : 4
* Info * Using the B3LYP functional.
P. J. Stephens, F. J. Devlin, C. F. Chabalowski, and M. J. Frisch., J. Phys. Chem. 98, 11623 (1994)
* Info * Using the Libxc library (v7.0.0).
S. Lehtola, C. Steigemann, M. J.T. Oliveira, and M. A.L. Marques., SoftwareX 7, 1–5 (2018)
* Info * Using the following algorithm for XC numerical integration.
J. Kussmann, H. Laqua and C. Ochsenfeld, J. Chem. Theory Comput. 2021, 17, 1512-1521
* Info * Starting Reduced Basis SCF calculation...
* Info * ...done. SCF energy in reduced basis set: -150.576224271426 a.u. Time: 0.04 sec.
Iter. | Kohn-Sham Energy | Energy Change | Gradient Norm | Max. Gradient | Density Change
--------------------------------------------------------------------------------------------
1 -151.430268058325 0.0000000000 0.26871037 0.02049092 0.00000000
2 -151.435599682847 -0.0053316245 0.10508121 0.00778422 0.10799011
3 -151.436292848512 -0.0006931657 0.05664861 0.00334393 0.04237101
4 -151.436603982554 -0.0003111340 0.00234972 0.00016518 0.01609142
5 -151.436604497515 -0.0000005150 0.00030993 0.00002041 0.00081618
6 -151.436604506705 -0.0000000092 0.00002725 0.00000229 0.00014360
7 -151.436604506808 -0.0000000001 0.00000803 0.00000048 0.00001944
8 -151.436604506815 -0.0000000000 0.00000080 0.00000005 0.00000270
*** SCF converged in 8 iterations. Time: 0.20 sec.
Spin-Restricted Kohn-Sham:
--------------------------
Total Energy : -151.4366045068 a.u.
Electronic Energy : -190.5210531676 a.u.
Nuclear Repulsion Energy : 39.0844486607 a.u.
------------------------------------
Gradient Norm : 0.0000008049 a.u.
Ground State Information
------------------------
Charge of Molecule : 0.0
Multiplicity (2S+1) : 1
Magnetic Quantum Number (M_S) : 0.0
Complex Response Solver Setup
===============================
Number of Frequencies : 1
Max. Number of Iterations : 150
Convergence Threshold : 1.0e-04
ERI Screening Threshold : 1.0e-12
Exchange-Correlation Functional : B3LYP
Molecular Grid Level : 4
* Info * Using the B3LYP functional.
P. J. Stephens, F. J. Devlin, C. F. Chabalowski, and M. J. Frisch., J. Phys. Chem. 98, 11623 (1994)
* Info * Using the Libxc library (v7.0.0).
S. Lehtola, C. Steigemann, M. J.T. Oliveira, and M. A.L. Marques., SoftwareX 7, 1–5 (2018)
* Info * Using the following algorithm for XC numerical integration.
J. Kussmann, H. Laqua and C. Ochsenfeld, J. Chem. Theory Comput. 2021, 17, 1512-1521
* Info * 6 gerade trial vectors in reduced space
* Info * 6 ungerade trial vectors in reduced space
*** Iteration: 1 * Residuals (Max,Min): 1.21e-01 and 6.63e-02
* Info * 12 gerade trial vectors in reduced space
* Info * 12 ungerade trial vectors in reduced space
*** Iteration: 2 * Residuals (Max,Min): 1.55e-02 and 5.20e-03
* Info * 18 gerade trial vectors in reduced space
* Info * 17 ungerade trial vectors in reduced space
*** Iteration: 3 * Residuals (Max,Min): 2.00e-03 and 4.07e-04
* Info * 24 gerade trial vectors in reduced space
* Info * 21 ungerade trial vectors in reduced space
*** Iteration: 4 * Residuals (Max,Min): 4.02e-04 and 2.99e-05
* Info * 26 gerade trial vectors in reduced space
* Info * 24 ungerade trial vectors in reduced space
*** Iteration: 5 * Residuals (Max,Min): 7.04e-05 and 2.99e-05
*** Complex response converged in 5 iterations. Time: 0.56 sec
print(" linear response function")
print(" ------------------------")
print(" frequency real imag")
print("-" * 42)
for key, lrf in crs_results["response_functions"].items():
print(f"{key[0]}{key[1]}{key[2]:12.6f}{lrf.real:16.6f}{lrf.imag:12.6f}")
print("-" * 42) 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
can be requested, referring to the linear response of the molecular property associated with Ω^ due to the perturbation associated with V^1 and V^2 oscillating with the angular frequencies ω1 and ω2, respectively. The damping term γ 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)
Self Consistent Field Driver Setup
====================================
Wave Function Model : Spin-Restricted Kohn-Sham
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
Exchange-Correlation Functional : B3LYP
Molecular Grid Level : 4
* Info * Using the B3LYP functional.
P. J. Stephens, F. J. Devlin, C. F. Chabalowski, and M. J. Frisch., J. Phys. Chem. 98, 11623 (1994)
* Info * Using the Libxc library (v7.0.0).
S. Lehtola, C. Steigemann, M. J.T. Oliveira, and M. A.L. Marques., SoftwareX 7, 1–5 (2018)
* Info * Using the following algorithm for XC numerical integration.
J. Kussmann, H. Laqua and C. Ochsenfeld, J. Chem. Theory Comput. 2021, 17, 1512-1521
* Info * Starting Reduced Basis SCF calculation...
* Info * ...done. SCF energy in reduced basis set: -150.576224271426 a.u. Time: 0.03 sec.
Iter. | Kohn-Sham Energy | Energy Change | Gradient Norm | Max. Gradient | Density Change
--------------------------------------------------------------------------------------------
1 -151.430268058325 0.0000000000 0.26871037 0.02049092 0.00000000
2 -151.435599682847 -0.0053316245 0.10508121 0.00778422 0.10799011
3 -151.436292848512 -0.0006931657 0.05664861 0.00334393 0.04237101
4 -151.436603982554 -0.0003111340 0.00234972 0.00016518 0.01609142
5 -151.436604497515 -0.0000005150 0.00030993 0.00002041 0.00081618
6 -151.436604506705 -0.0000000092 0.00002725 0.00000229 0.00014360
7 -151.436604506808 -0.0000000001 0.00000803 0.00000048 0.00001944
8 -151.436604506815 -0.0000000000 0.00000080 0.00000005 0.00000270
*** SCF converged in 8 iterations. Time: 0.20 sec.
Spin-Restricted Kohn-Sham:
--------------------------
Total Energy : -151.4366045068 a.u.
Electronic Energy : -190.5210531676 a.u.
Nuclear Repulsion Energy : 39.0844486607 a.u.
------------------------------------
Gradient Norm : 0.0000008049 a.u.
Ground State Information
------------------------
Charge of Molecule : 0.0
Multiplicity (2S+1) : 1
Magnetic Quantum Number (M_S) : 0.0
Quadratic Response Driver Setup
=================================
ERI Screening Threshold : 1.0e-12
Convergance Threshold : 1.0e-04
Max. Number of Iterations : 150
Damping Parameter : 4.556000e-03
Exchange-Correlation Functional : B3LYP
Molecular Grid Level : 4
Complex Response Solver Setup
===============================
Number of Frequencies : 1
Max. Number of Iterations : 150
Convergence Threshold : 1.0e-04
ERI Screening Threshold : 1.0e-12
Exchange-Correlation Functional : B3LYP
Molecular Grid Level : 4
* Info * Using the B3LYP functional.
P. J. Stephens, F. J. Devlin, C. F. Chabalowski, and M. J. Frisch., J. Phys. Chem. 98, 11623 (1994)
* Info * Using the Libxc library (v7.0.0).
S. Lehtola, C. Steigemann, M. J.T. Oliveira, and M. A.L. Marques., SoftwareX 7, 1–5 (2018)
* Info * Using the following algorithm for XC numerical integration.
J. Kussmann, H. Laqua and C. Ochsenfeld, J. Chem. Theory Comput. 2021, 17, 1512-1521
* Info * 10 gerade trial vectors in reduced space
* Info * 10 ungerade trial vectors in reduced space
*** Iteration: 1 * Residuals (Max,Min): 6.01e-01 and 6.46e-02
* Info * 21 gerade trial vectors in reduced space
* Info * 21 ungerade trial vectors in reduced space
*** Iteration: 2 * Residuals (Max,Min): 8.86e-02 and 5.71e-03
* Info * 31 gerade trial vectors in reduced space
* Info * 31 ungerade trial vectors in reduced space
*** Iteration: 3 * Residuals (Max,Min): 1.24e-02 and 3.78e-04
* Info * 41 gerade trial vectors in reduced space
* Info * 40 ungerade trial vectors in reduced space
*** Iteration: 4 * Residuals (Max,Min): 1.27e-03 and 1.85e-05
* Info * 48 gerade trial vectors in reduced space
* Info * 47 ungerade trial vectors in reduced space
*** Iteration: 5 * Residuals (Max,Min): 1.81e-04 and 1.38e-05
* Info * 50 gerade trial vectors in reduced space
* Info * 49 ungerade trial vectors in reduced space
*** Iteration: 6 * Residuals (Max,Min): 5.86e-05 and 1.38e-05
*** Complex response converged in 6 iterations. Time: 1.04 sec
Fock Matrix Computation
=========================
* Info * Processing 4 Fock builds...
* Info * Time spent in Fock matrices: 0.10 sec
Quadratic response function: << z;x,x >> (0.0656,0.0656)
===========================================================
Real Imaginary
----------------------------------------------------
QRF -0.07610621 0.89411270j
Quadratic response function: << z;x,x >> (0.1312,0.1312)
===========================================================
Real Imaginary
----------------------------------------------------
QRF -3.88748957 -18.88312397j
*** Time spent in quadratic response calculation: 1.18 sec ***
component = qrf_drv.a_component + qrf_drv.b_component + qrf_drv.c_component
print(" quadratic response function")
print(" ---------------------------")
print(" w1 w2 real imag")
print("-" * 56)
for key, qrf in qrf_results.items():
if key[0] == "qrf":
print(
f"{component} {key[1]:12.6f}{key[2]:12.6f}{qrf.real:16.6f}{qrf.imag:12.6f}"
)
print("-" * 56) 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
can be requested, referring to the linear response of the molecular property associated with Ω^ due to the perturbation associated with V^1, V^2, and V^3 oscillating with the angular frequencies ω1, ω2, and ω3, respectively. The damping term γ 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)
Self Consistent Field Driver Setup
====================================
Wave Function Model : Spin-Restricted Kohn-Sham
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
Exchange-Correlation Functional : B3LYP
Molecular Grid Level : 4
* Info * Using the B3LYP functional.
P. J. Stephens, F. J. Devlin, C. F. Chabalowski, and M. J. Frisch., J. Phys. Chem. 98, 11623 (1994)
* Info * Using the Libxc library (v7.0.0).
S. Lehtola, C. Steigemann, M. J.T. Oliveira, and M. A.L. Marques., SoftwareX 7, 1–5 (2018)
* Info * Using the following algorithm for XC numerical integration.
J. Kussmann, H. Laqua and C. Ochsenfeld, J. Chem. Theory Comput. 2021, 17, 1512-1521
* Info * Starting Reduced Basis SCF calculation...
* Info * ...done. SCF energy in reduced basis set: -150.576224271426 a.u. Time: 0.02 sec.
Iter. | Kohn-Sham Energy | Energy Change | Gradient Norm | Max. Gradient | Density Change
--------------------------------------------------------------------------------------------
1 -151.430268058325 0.0000000000 0.26871037 0.02049092 0.00000000
2 -151.435599682847 -0.0053316245 0.10508121 0.00778422 0.10799011
3 -151.436292848512 -0.0006931657 0.05664861 0.00334393 0.04237101
4 -151.436603982554 -0.0003111340 0.00234972 0.00016518 0.01609142
5 -151.436604497515 -0.0000005150 0.00030993 0.00002041 0.00081618
6 -151.436604506705 -0.0000000092 0.00002725 0.00000229 0.00014360
7 -151.436604506808 -0.0000000001 0.00000803 0.00000048 0.00001944
8 -151.436604506814 -0.0000000000 0.00000080 0.00000005 0.00000270
*** SCF converged in 8 iterations. Time: 0.20 sec.
Spin-Restricted Kohn-Sham:
--------------------------
Total Energy : -151.4366045068 a.u.
Electronic Energy : -190.5210531676 a.u.
Nuclear Repulsion Energy : 39.0844486607 a.u.
------------------------------------
Gradient Norm : 0.0000008049 a.u.
Ground State Information
------------------------
Charge of Molecule : 0.0
Multiplicity (2S+1) : 1
Magnetic Quantum Number (M_S) : 0.0
Cubic Response Driver Setup
=============================
ERI Screening Threshold : 1.0e-12
Convergance Threshold : 1.0e-04
Max. Number of Iterations : 150
Damping Parameter : 4.556000e-03
Exchange-Correlation Functional : B3LYP
Molecular Grid Level : 4
Complex Response Solver Setup
===============================
Number of Frequencies : 1
Max. Number of Iterations : 150
Convergence Threshold : 1.0e-04
ERI Screening Threshold : 1.0e-12
Exchange-Correlation Functional : B3LYP
Molecular Grid Level : 4
* Info * Using the B3LYP functional.
P. J. Stephens, F. J. Devlin, C. F. Chabalowski, and M. J. Frisch., J. Phys. Chem. 98, 11623 (1994)
* Info * Using the Libxc library (v7.0.0).
S. Lehtola, C. Steigemann, M. J.T. Oliveira, and M. A.L. Marques., SoftwareX 7, 1–5 (2018)
* Info * Using the following algorithm for XC numerical integration.
J. Kussmann, H. Laqua and C. Ochsenfeld, J. Chem. Theory Comput. 2021, 17, 1512-1521
* Info * 12 gerade trial vectors in reduced space
* Info * 13 ungerade trial vectors in reduced space
*** Iteration: 1 * Residuals (Max,Min): 6.45e-01 and 6.43e-02
* Info * 24 gerade trial vectors in reduced space
* Info * 25 ungerade trial vectors in reduced space
*** Iteration: 2 * Residuals (Max,Min): 1.32e-01 and 5.61e-03
* Info * 36 gerade trial vectors in reduced space
* Info * 37 ungerade trial vectors in reduced space
*** Iteration: 3 * Residuals (Max,Min): 4.35e-02 and 3.46e-04
* Info * 48 gerade trial vectors in reduced space
* Info * 49 ungerade trial vectors in reduced space
*** Iteration: 4 * Residuals (Max,Min): 1.06e-02 and 1.86e-05
* Info * 57 gerade trial vectors in reduced space
* Info * 58 ungerade trial vectors in reduced space
*** Iteration: 5 * Residuals (Max,Min): 7.76e-03 and 1.32e-05
* Info * 59 gerade trial vectors in reduced space
* Info * 60 ungerade trial vectors in reduced space
*** Iteration: 6 * Residuals (Max,Min): 3.22e-03 and 1.32e-05
* Info * 61 gerade trial vectors in reduced space
* Info * 62 ungerade trial vectors in reduced space
*** Iteration: 7 * Residuals (Max,Min): 3.17e-03 and 1.32e-05
* Info * 63 gerade trial vectors in reduced space
* Info * 64 ungerade trial vectors in reduced space
*** Iteration: 8 * Residuals (Max,Min): 1.20e-03 and 1.32e-05
* Info * 65 gerade trial vectors in reduced space
* Info * 66 ungerade trial vectors in reduced space
*** Iteration: 9 * Residuals (Max,Min): 3.05e-04 and 1.32e-05
* Info * 67 gerade trial vectors in reduced space
* Info * 68 ungerade trial vectors in reduced space
*** Iteration: 10 * Residuals (Max,Min): 2.03e-04 and 1.32e-05
* Info * 69 gerade trial vectors in reduced space
* Info * 70 ungerade trial vectors in reduced space
*** Iteration: 11 * Residuals (Max,Min): 5.76e-05 and 1.32e-05
*** Complex response converged in 11 iterations. Time: 1.59 sec
Fock Matrix Computation
=========================
* Info * Processing 16 Fock builds...
* Info * Time spent in Fock matrices: 0.64 sec
Complex Response Solver Setup
===============================
Number of Frequencies : 1
Max. Number of Iterations : 150
Convergence Threshold : 1.0e-04
ERI Screening Threshold : 1.0e-12
Exchange-Correlation Functional : B3LYP
Molecular Grid Level : 4
* Info * Using the B3LYP functional.
P. J. Stephens, F. J. Devlin, C. F. Chabalowski, and M. J. Frisch., J. Phys. Chem. 98, 11623 (1994)
* Info * Using the Libxc library (v7.0.0).
S. Lehtola, C. Steigemann, M. J.T. Oliveira, and M. A.L. Marques., SoftwareX 7, 1–5 (2018)
* Info * Using the following algorithm for XC numerical integration.
J. Kussmann, H. Laqua and C. Ochsenfeld, J. Chem. Theory Comput. 2021, 17, 1512-1521
* Info * 12 gerade trial vectors in reduced space
* Info * 12 ungerade trial vectors in reduced space
*** Iteration: 1 * Residuals (Max,Min): 1.51e-01 and 5.66e-02
* Info * 24 gerade trial vectors in reduced space
* Info * 24 ungerade trial vectors in reduced space
*** Iteration: 2 * Residuals (Max,Min): 2.92e-02 and 1.07e-02
* Info * 36 gerade trial vectors in reduced space
* Info * 36 ungerade trial vectors in reduced space
*** Iteration: 3 * Residuals (Max,Min): 7.14e-03 and 5.37e-04
* Info * 48 gerade trial vectors in reduced space
* Info * 48 ungerade trial vectors in reduced space
*** Iteration: 4 * Residuals (Max,Min): 8.50e-04 and 2.21e-05
* Info * 56 gerade trial vectors in reduced space
* Info * 56 ungerade trial vectors in reduced space
*** Iteration: 5 * Residuals (Max,Min): 1.03e-04 and 8.01e-06
* Info * 58 gerade trial vectors in reduced space
* Info * 58 ungerade trial vectors in reduced space
*** Iteration: 6 * Residuals (Max,Min): 6.08e-05 and 8.01e-06
*** Complex response converged in 6 iterations. Time: 1.25 sec
Fock Matrix Computation
=========================
* Info * Processing 4 Fock builds...
* Info * Time spent in Fock matrices: 0.12 sec
Cubic response function: << z;x,x,z >> (0.0656,0.0656,0.0656)
================================================================
Real Imaginary
----------------------------------------------------
CRF -15.33880394 99.67928962j
Cubic response function: << z;x,x,z >> (0.1312,0.1312,0.1312)
================================================================
Real Imaginary
----------------------------------------------------
CRF -535.66759165 3266.10710970j
*** Time spent in cubic response calculation: 3.70 sec ***
component = (
crf_drv.a_component
+ crf_drv.b_component
+ crf_drv.c_component
+ crf_drv.d_component
)
print(" cubic response function")
print(" ---------------------------")
print(" w1 w2 w3 real imag")
print("-" * 73)
for key, crf in crf_results.items():
if key[0] == "crf":
print(
f"{component} {key[1]:12.6f}{key[2]:12.6f}{key[3]:12.6f}{crf.real:16.6f}{crf.imag:16.6f}"
)
print("-" * 73) 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
-------------------------------------------------------------------------