# NWChem NO2+ HF optimisation

from chemsh       import *
from chemsh.utils import testutils

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

nwchem = NWChem(frag=no2, method="hf", basis="3-21g", charge=1)

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

ecalc = opt.result.energy

# Test result from Tcl-ChemShell
eref = -202.460060055579

testutils.validate(ecalc, eref)
