# TURBOMOLE NO2+ HF single point energy

from chemsh       import *
from chemsh.utils import testutils

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

# default: convergence='tightscf'
turbomole = TURBOMOLE(frag=no2, method="hf", basis="SVP", charge=1)

sp = SP(theory=turbomole, gradients=True)
sp.run()

ecalc = sp.result.energy

fname = "no2p_energy_hf"
with open("./tcl_results.dat", "r") as tclres:
    for l in tclres:
        if fname + ".chm" in l:
            eref = float(l.split(":")[-1])

testutils.validate(ecalc, eref)
