How force PSI4 to automatically print out E_BSSE?

Dear Developers,

If possible and you kindly let me, I am going to respectfully ask a short question regarding CBS extrapolation in PSI4.

Please consider the below PSI4 input file by which the non-corrected and CP-corrected interaction energy is calculated. In this sense, ‘cp’ and ‘nocp’ included in the last line mean, respectively, CP-corrected and non-CP-corrected interaction energy which are automatically printed out at the end of PSI4 output file. Meanwhile, you know much better than me that E_BSSE=(CP-corrected interaction energy)-(non-corrected interaction energy). Unfortunately, PSI4 does not automatically print out this quantity at the end of calculation and this should be performed manually. For a series of many calculations, such calculation could be time-consuming in a manually manner. So, if possible, please change (or add relevant keywords) in the below template so that E_BSSE is also automatically printed out at the end of any CBS calculation with PSI4.

While, myself, tried several keywords, all them failed!

In advance, your highly kind attention is very appreciated and please forgive me for bothering you.

Sincerely,
Saeed


# Karton-type SCF energy and Halkier 2-point correlation energy extrapolation- FOCAL POINT APPROACH

memory 55 gb

molecule dimer {
0 1
F                  0.00003600   -1.10687700    0.00000000
H                 -0.00063900    0.00000000    0.00000000
--
-1 2
F                  0.00003600    1.10687700    0.00000000

units angstrom
no_reorient
symmetry c1
}

set {
freeze_core true
cc_type df       
}

energy("cbs",scf_wfn='scf',scf_basis='aug-cc-pV[DT]Z',scf_scheme='scf_xtpl_karton_2',corl_wfn='mp2', corl_basis='aug-cc-pV[DT]Z', corl_scheme='corl_xtpl_helgaker_2', delta_wfn='ccsd(t)', delta_basis='aug-cc-pVDZ',bsse_type=['cp','nocp'],scf_alpha=4.30,corl_alpha=2.51)

The input file as you posted it does not run. Your second subsystem is inconsistent: fluoride ion is a singlet, so charge -1 and spin multiplicity 2 for an F atom is impossible. In my attempt to reproduce this, I’ve changed your second subsystem to have spin multiplicity 1.

Your question asks “please change (or add relevant keywords) in the below template so that E_BSSE is also automatically printed out at the end of any CBS calculation with PSI4”. You are assuming that the correct way to do this is through keywords. That assumption is incorrect, and if you keep it, you will have many problems using Psi4.

Psi4 converts all input files to valid Python scripts. An important consequence of this is that you can add arbitrary Python code or Psi4 functions to your input file, and they will execute. For the general class of problems of “I want X to print,” the standard solution is:

  1. Make sure that the raw data is accessible somehow. Usually, you access it either by the variable function or by calling wfn.variable, assuming you have a Wavefunction object named wfn.
  2. Calculate the data you need from the raw data.
  3. Print the data.

Following this strategy, you can add
print(variable('NOCP-CORRECTED INTERACTION ENERGY') - variable('CP-CORRECTED INTERACTION ENERGY')) to print to stdout.
core.print_out(str(variable('NOCP-CORRECTED INTERACTION ENERGY') - variable('CP-CORRECTED INTERACTION ENERGY'))) to print to the output file.

You can easily format it any way you like.

For a complete list of nbody variables, see Basis Set Superposition Corrections.

Dear Professor Misiewicz,

MANY MANY thanks for your highest kind attention to prompt reply and guide me with your highly valuable, informative, and novel comments. You so kindly, very patiently, and gentlemanly not only did resolve my problem but, most importantly, nicely taught me the main concepts and foundations need to deeply understand and resolve the problem. Now, in the light of your extremely valuable attention, I learned the way of resolving such problems deeply.
Please, once again, accept my highest and deepest gratitude for your highly valuable time and energy. Really, I hope that in the future I will be able to benefit from your infinite knowledge.

Please also accept my highest apology for the unwanted mistake about the charge and multiplicity of fragment #2 (the Fluorine atom). Please let me very respectfully indicate that this file was generated from another file but in a hurry manner via copy-past and, this unwanted bad mistake happened. Undoubtedly, F(-) should have charge (-1) and spin multiplicity (1).

Sincerely yours,
Saeed