An odd issue extending the PES example

Dear all,

I’m attempting to extend the PES example from the manual to benzene-neon. One thing I’ve noticed is it does not update the r value, it just redos the 2.5 value. I tested the example with Ne-Ne as in the manual and it worked fine.

My input is attached

Any line starting with the # character is a comment line

#! Sample HF/cc-pVDZ H2O computation

memory 20000 mb

molecule dimer {
0 1
C
C 1 R12
C 1 R12 2 120.000000
H 2 R24 1 120.000000 3 180.000000
H 3 R24 1 120.000000 2 180.000000
C 2 R12 1 120.000000 3 0.000000
H 6 R24 2 120.000000 1 180.000000
C 6 R12 2 120.000000 4 180.000000
C 8 R12 6 120.000000 7 180.000000
H 1 R24 2 120.000000 6 180.000000
H 8 R24 9 120.000000 3 180.000000
H 9 R24 8 120.000000 6 180.000000
X 2 R12 6 60.000000 7 180.0000

Ne 13 R 2 90.00000 6 90.0000
R12 = 1.397
R24 = 1.080
}

Rvals=[2.5, 3.0, 4.0]

set basis aug-cc-pVDZ
set freeze_core True
set scf_type df

Initialize a blank dictionary of counterpoise corrected energies

#(Need this for the syntax below to work)
ecp = {}

for R in Rvals:
dimer.R = R
ecp[R] = energy(‘mp2’, bsse_type = ‘cp’)
psi4.print_out("\n")
psi4.print_out(“CP-corrected DFMP2/aug-cc-pVDZ interaction energies\n\n”)
psi4.print_out(" R [Ang] E_int [kcal/mol] \n")
psi4.print_out("-----------------------------------------------------\n")
for R in Rvals:
e = ecp[R] * psi_hartree2kcalmol
psi4.print_out(" %3.1f %10.6f\n" % (R, e))

The problem is that the distance being varied ® is defined as being between the Ne and a dummy atom. Unfortunately, the first thing Psi4 does with the molecule block, regardless of input format (zmat, Cartesian, etc.) is convert it to Cartesian. During this step, the dummy atom is discarded – so, when you set dimer.R = R before your energy() call, you are setting a non-existent value, as far as Psi4 is concerned. This can be remedied by doing the scan the long way – by making separate input files for each value of the intermolecular separation.

The other option is to define your geometry using Cartesian coordinates, and use some trigonometry like in this example to perform your scan.