Hi all,
For a diatomic molecule (H2), I want to use the orbital guess of the previous geometry for a SCF calculation.
I am doing it the following way
import psi4
bondlen_init = 1.0
bondlen_fin = 2.0
bond_gap = 0.1
bond_info = [None]*3
bond_info[0] = bondlen_init
bond_info[1] = bondlen_fin
bond_info[2] = bond_gap
psi4_option = {
'basis': 'cc-pvtz',
'scf_type': 'pk',
'reference': 'rhf',
'guess': 'read',
'SOSCF': True,
'e_convergence': 1e-8,
}
mol = psi4.geometry("""
0 1
H
H 1 R
symmetry c1
units bohr
""")
########################################
ref_point = 1.0
psi4out = 'psi4out_ref.out'
psi4.core.set_output_file(psi4out, False)
mol.R = ref_point
mol.update_geometry()
psi4.set_options(psi4_option)
scf_e, ref_wfn = psi4.energy('scf', mol=mol, return_wfn=True)
########################################
npoint = abs(int(round((bond_info[1]-bond_info[0])/bond_info[2])))+1
for i in range(npoint):
bondlen = bond_info[0]+i*bond_info[2]
ext = format(bondlen, '.2f')
print("calculation started for bond length ==> " + ext)
psi4out = 'psi4out_'+ext+'.out'
psi4.core.set_output_file(psi4out, False)
mol.R = bondlen
mol.update_geometry()
psi4.set_options(psi4_option)
scf_e, ref_wfn = psi4.energy('scf', mol=mol, return_wfn=True)
But in the output, I am getting the following warning:
Unable to find file 180, defaulting to SAD guess.
and thus, it uses SAD guess to start SCF calculation.
Am I missing any keyword in the input to do this correctly?
With regards,
Sudip