Atomic Simulation Enviornment
Atomic Simulation Enviornment
Atomic Simulation Enviornment
Overview of ASE
The Python language
The Atoms object
Building stuff (molecules, surfaces, ...)
Doing stuff with atoms (MD, optimization, ...)
Databases
Installing ASE
Development of ASE
What is ASE?
ASE is a Python library for working with atoms:
ASE package
Vibrations
Infrared,
Phonons
File IO
xyz, cif, ...
Constraints
Fixed atoms,
bonds, ...
Analysis
DOS, STM images
Atoms
positions,
atomic numbers,
...
Molecular Dynamics
Optimization Reaction paths
NEB, Dimer
http://wiki.fysik.dtu.dk/ase
Calculator
Abinit, ..., VASP
Visualize
from
from
from
from
h2 =
Units: eV and .
What is Python?
http://www.python.org
Interpreted language
Dynamically typed
Easy to read and write, and very expressive
Great for scripting a calculation
Great for small and large programs
Optimized for programmer productivity
Can be extended in C/C++/Fortran
General purpose language
Numpy: Base N-dimensional array package
Scipy: Fundamental library for scientific computing
Matplotlib: Comprehensive 2D Plotting
Sympy: Symbolic mathematics.
Structure of ASE
Constraints
Atoms
...
Calculator
Whats inside?
Positions, atomic numbers, velocities, masses, initial magnetic
moments, charges, tags
Unit cell
Boundary conditions
(Calculator)
(Constraints)
x1, x2 = a.positions[-2:, 0]
# x-coords of
# last two atoms
a.positions[-2:, 0] += 0.1 # translate atoms
a.positions[:, 2].max() # maximum z-coord
bulk()
File IO
xyz, cif, ...
Database
molecule()
Atoms
positions,
atomic numbers,
...
surface()
nanoribbon()
ASEs calculators
Atoms
Calculator
...
DFT, ab initio:
Abinit, Castep, ELK, Exciting, FHI-Aims, Fleur, Gaussian,
GPAW, Jacapo, JDFTx, NWChem, QuantumEspresso,
SIESTA, Turbomole, VASP
(Semi-)empirical potentials:
ASAP, DFTB+, EAM, EMT, Gromacs, Hotbit, LAMMPS,
Lennard-Jones, MOPAC, Morse
Molecular Dynamics
Verlet, Langevin,
NPT, ...
Atoms
positions,
atomic numbers,
...
Reaction paths
NEB, Dimer
Optimization
BFGS, FIRE,
Minima hopping,
Basin hopping, ...
ASE-database
In each row we have:
Taxonomy:
Energy (eV)
2
3
4
5
6
7
3.0
3.5
4.0
Egap (eV)
4.5
5.0
1)
a)
b)
c)
d)
2) Same as above, except that the Fortran code doesnt stop it waits for a new input file with new coordinates
(QuantumEspresso, Dacapo).
3) Python solution (EMT, EAM, ...). For parallel calculations,
the Python interpreter runs on all processes (GPAW, ASAP)
Installing ASE
Requirements: Python and NumPy (ase-gui: PyGTK and
Matplotlib)
$
$
$
$
$
SVN=https://svn.fysik.dtu.dk/projects
svn co $SVN/ase/trunk ase
cd ase
python setup.py install --user
python setup.py test # takes 1 min.
Where is what?
ase/:
Source code.
tools/:
Command-line tools
ase/doc/:
Documentation (source for web-page)
Questions
How to get started?
http://wiki.fysik.dtu.dk/ase
http://docs.scipy.org/doc/numpy
http://www.python.org
How to get help?
Write to the ase-users mailing list.
How is ASE developed?
Mostly by volunteers. Coordination and discussions on the
ase-developers mailing list.
How to contribute?
Please send us bug-reports, patches, code and ideas.
License?
LGPLv2.1+
Thanks
Extra material
How to use sys.argv, other ASE functions, for-loops and string
interpolation:
import sys
from ase.lattice.surface import fcc111
from gpaw import GPAW, PW
a = float(sys.argv[1])
k = int(sys.argv[2])
for n in range(1, 5):
slab = fcc111(Cu, size=(1, 1, n),
a=a, vacuum=5.0)
slab.calc = GPAW(mode=PW(ecut=400),
kpts=(k, k, 1),
txt=Cu%d.txt % n)
slab.get_potential_energy()