ASE Manual Release 3.6.1.2825 CAMd - CampOS Wiki
ASE Manual Release 3.6.1.2825 CAMd - CampOS Wiki
ASE Manual Release 3.6.1.2825 CAMd - CampOS Wiki
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>ASE</strong> <strong>Manual</strong>, <strong>Release</strong> 3.6.1.2828<br />
Parameters<br />
label: str Prefix to use for filenames (label.txt, ...). Default is ‘dftb’.<br />
write_dftb: boolean True: a minimal input file (name of which is always ‘dftb_in.hsd’) is written based on<br />
values given here. False: input file for dftb+ is not written. User must have generated file ‘dftb_in.hsd’ in<br />
the working directory. Use write_dftb=False to use your own ‘dftb_in.hsd’-file.<br />
charge: float Total charge of the system.<br />
include_dispersion: boolean True: Default dispersion parameters are written in the file ‘dftb_in.hsd’ (requires<br />
that also write_dftb_input_file==True) False: dispersion parameters are not written here.<br />
do_spin_polarized: boolean True: Spin polarized calculation False: Spin unpolarized calculation<br />
unpaired_electrons: float Number of spin unpaired electrons in the system. Relevant only if<br />
do_spin_polarized==True<br />
fermi_temperature: float Fermi temperature for electrons.<br />
scc: boolean True: Do charge self consistent dftb+ False: No SCC, charges on atoms are not iterated<br />
Example1: Geometry Optimization<br />
#!/usr/bin/env python<br />
import os<br />
from ase import Atoms<br />
from ase.calculators.dftb import Dftb<br />
from ase.optimize import QuasiNewton<br />
from ase.io import write<br />
d = 1.10<br />
test = Atoms(’2O’, positions=[(0., 0., 0.), (0., 0., d)])<br />
test.set_pbc([False, False, False])<br />
test.set_calculator(Dftb(label=’o2’,write_dftb=True,do_spin_polarized=True,unpaired_electrons=2.0,<br />
dyn = QuasiNewton(test, trajectory=’test.traj’)<br />
dyn.run(fmax=0.01)<br />
write(’test.final.xyz’, test)<br />
Example2: Geometry Optimization using your own ‘dftb_in.hsd’ file<br />
#!/usr/bin/python<br />
from ase.io import read, write<br />
from ase.calculators.dftb import Dftb<br />
from ase.optimize import QuasiNewton<br />
system = read(’h2o_1.xyz’)<br />
system.set_calculator(Dftb(label=’dftb’,write_dftb=False))<br />
qn = QuasiNewton(system)<br />
qn.run(fmax=0.005)<br />
write(’final.xyz’, system)<br />
write(’final.traj’, system)<br />
Input file for example 2 (h2o_1.xyz)<br />
118 Chapter 7. Documentation for modules in <strong>ASE</strong>