# MNDO NO2 doublet AM1 (UHF) optimisation

from chemsh       import *
from chemsh.utils import testutils

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

mndo = MNDO(frag=no2, method="am1", scftype="uhf", mult=2)

opt = Opt(theory=mndo,
          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 = -0.026415763385

testutils.validate(ecalc, eref)
