# ORCA HF single point energy

from chemsh       import *
from chemsh.utils import testutils

water = Fragment(coords="water.cjson")


# default: convergence='tightscf'
orca = ORCA(frag=water, method="hf", basis="3-21g")

opt = Opt(theory=orca,
          algorithm="lbfgs", tolerance=0.0003, trust_radius="energy",
          maxcycle=100, maxene=100, maxstep=1.0)
          
opt.run()

ecalc = opt.result.energy

# Tcl-ChemShell 3.7.1/ORCA 4.2.1 result
# convergence=normalscf
#eref = -75.585959732308
# convergence=tightscf
#eref = -75.585959742887
# ORCA 5.0.3
eref = -75.58595974


testutils.validate(ecalc, eref)
