PageRenderTime 18ms CodeModel.GetById 14ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/doc/ase/calculators/dftb_ex2_relaxbyDFTB.py

https://gitlab.com/vote539/ase
Python | 28 lines | 23 code | 3 blank | 2 comment | 0 complexity | 7629962f36cd5555ececa98214de9575 MD5 | raw file
 1#!/usr/bin/env python
 2#
 3
 4import os
 5
 6from ase import Atoms
 7from ase.calculators.dftb import Dftb
 8from ase.optimize import QuasiNewton
 9from ase.io import write, read
10
11from ase.structure import molecule
12test = molecule('H2O')
13test.set_calculator(Dftb(label='h2o',atoms=test,
14run_manyDftb_steps = True,
15Driver_='ConjugateGradient',
16Driver_MaxForceComponent='1E-4',
17Driver_MaxSteps=1000,
18Hamiltonian_MaxAngularMomentum_ = '',
19Hamiltonian_MaxAngularMomentum_O = '"p"',
20Hamiltonian_MaxAngularMomentum_H = '"s"',
21))
22
23dyn = QuasiNewton(test, trajectory='test.traj')
24dyn.run(fmax=100, steps=0)
25test = read('geo_end.gen')
26write('test.final.xyz', test)
27
28