PageRenderTime 13ms CodeModel.GetById 5ms app.highlight 4ms RepoModel.GetById 2ms app.codeStats 0ms

/doc/ase/calculators/dftb_ex1_relax.py

https://gitlab.com/vote539/ase
Python | 19 lines | 18 code | 1 blank | 0 comment | 0 complexity | 08973c17c76c6c28d0ed8fbb5a290bc4 MD5 | raw file
 1from ase.calculators.dftb import Dftb
 2from ase.optimize import QuasiNewton
 3from ase.io import write
 4
 5from ase.structure import molecule
 6test = molecule('H2O')
 7test.set_calculator(Dftb(label='h2o',
 8                         atoms=test,
 9                         Hamiltonian_MaxAngularMomentum_='',
10                         Hamiltonian_MaxAngularMomentum_O='"p"',
11                         Hamiltonian_MaxAngularMomentum_H='"s"',
12                         ))
13
14dyn = QuasiNewton(test, trajectory='test.traj')
15dyn.run(fmax=0.01)
16write('test.final.xyz', test)
17
18
19