File: h2o.py

package info (click to toggle)
python-ase 3.17.0-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 16,340 kB
  • sloc: python: 117,348; makefile: 91
file content (16 lines) | stat: -rwxr-xr-x 445 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
""" test run for DFTB+ calculator
    the tolerance is extremely loose, beause different sk files
    give different results

"""
from ase.calculators.dftb import Dftb
from ase.optimize import QuasiNewton
from ase.build import molecule

test = molecule('H2O')
test.calc = Dftb(label='h2o')

dyn = QuasiNewton(test, trajectory='test.traj')
dyn.run(fmax=0.01)
final_energy = test.get_potential_energy()
assert abs(final_energy + 111.141945) < 1.0