from chemsh       import *
from chemsh.utils import testutils

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

pyscf = PySCF(frag=no2, method="dft", functional="blyp", basis="3-21g", charge=1)

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

ecalc = sp.result.energy

# Tcl-ChemShell 3.7.1/ORCA 4.2.1 result
# convergence=normalscf from Tcl-ChemShell
#eref = -203.503206424185
# convergence=tightscf
#eref = -203.503206433785
# ORCA 5.0.3 
#eref = -203.50318654

#pyscf reference
eref = -203.503185594

testutils.validate(ecalc, eref)
