[ase-users] [gpaw-developers] ASE tutorial slides needed
Jens Jørgen Mortensen
jensj at fysik.dtu.dk
Thu Oct 28 16:37:59 CEST 2010
On Wed, 2010-10-27 at 08:59 -0600, Nichols A. Romero wrote:
> Hi,
>
> We are doing an ASE & GPAW tutorial here at ANL. I have gotten some nice GPAW slides
> from a few of you (JJ, Jussi). Many thanks.
>
> Does anyone have any tutorial slides for ASE? Preferably basic usage, e.g. how to
> construct cells, different calculators, etc. It would be useful to have the
> source files (LaTeX, OpenOffice, PowerPoint, whatever).
It's always fun to demonstrate ASE in an interactive Python session.
Last time I did that, I did this in the interpreter:
from ase import Atoms
h2 = Atoms('H2',
[(0, 0, 0),
(0, 0, 0.7)])
from ase.calculators.emt import EMT
h2.set_calculator(EMT())
print h2.get_forces()
from gpaw import GPAW
h2.set_calculator(GPAW())
h2.cell
h2.center(vacuum=2.5)
h2.cell
from ase.visualize import view
view(h2)
from ase.all import *
f = h2.get_forces()
Here are some reStructuredText slides:
The atomic simulation environment (ASE) Python package
------------------------------------------------------
* We use ASE for structure optimization, molecular dynamics, handling
constraints, nudged elastic band calculations, vibrational analysis,
simulated STM images, calculation of Wannier functions, transport
calculations and much more
* Calculators with ASE interface:
.. image:: images/ase.png
:width: 5cm
:align: center
* ASE also has a graphical user interface and a rich set of file-IO
formats
* http://wiki.fysik.dtu.dk/ase
ASE-calculator interface
------------------------
For ASE, a calculator is a black box that can calculate energies,
forces and stresses. From ASE it will get:
* atomic positions
* atomic numbers
* the unit cell
* boundary conditions
and maybe also magnetic moments and charges.
More advanced interface:
* Eigenvalues.
* Electron densities.
* Wave functions.
* ...
Different types of calculators
------------------------------
* 1) ASE writes input file
2) ASE starts Fortran code (maybe in parallel)
3) ASE waits for Fortran code to finish
4) ASE reads output file
* Same as above, except that the Fortran code doesn't stop - it waits
for a new input file with new coordinates.
* Pure Python solution. For parallel calculations, the Python
interpreter runs on all processes.
Jens Jørgen
More information about the ase-users
mailing list