# MNDO optimisation

from chemsh       import *
from chemsh.utils import testutils

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

mndo = MNDO(frag=water)

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.097110930251

testutils.validate(ecalc, eref)
