I tried running the following geometry optimization of an open-shell system:
with open('Benzyl radical MMFF.xyz') as f:
mol = f.read()
molecule = psi4.geometry(mol)
# Set computation options
psi4.set_options({'basis': '6-31g*',
'reference': 'uhf'})
# Optimize Geometry
psi4.optimize('b3lyp', molecule=molecule)
# Save optimized geometry
optimized_geometry = molecule.save_string_xyz_file()
with open('Benzyl radical B3LYP 6-31G(d,p).xyz', 'w') as f:
f.write(optimized_geometry)
However, somehow it didn’t pick up on using UHF and produced the following error:
Out:
RuntimeError: Fatal Error: RHF: RHF reference is only for singlets. Error occurred in file: [D:\bld\psi4_1689343434894\work\psi4\src\psi4\libscf_solver\rhf.cc](file:///D:/bld/psi4_1689343434894/work/psi4/src/psi4/libscf_solver/rhf.cc) on line: 92
I also tried specifying UHF in the globals like so:
psi4.core.set_global_option('REFERENCE', 'UHF')
But without any luck. Does anyone know where I’m going wrong?