Frequently Asked Questions

ASE-GUI

See also the ase.gui.

How do I export images from a trajectory to png or pov files?

With ase-gui, you can choose File ‣ Save, but this is not fun if you need to do it for many images. Here is how to do it on the command line for a number of images:

ase gui images.traj@0 -o image0.pov
ase gui images.traj@1 -o image1.pov
ase gui images.traj@2 -o image2.pov

If you have many images, it will be easier to do it using the Python interpreter:

>>> from ase.io import read, write
>>> for n, image in enumerate(read('images.traj@:3')):
...     write('image%d.pov' % n, image, run_povray=True, pause=False,
...           rotation='-90x,10z')

Here, we also:

  • run povray to generate png files

  • disable pausing between the images

  • set a rotation (choose View ‣ Rotate … in ase-gui to select the best rotation angles)

Try:

>>> help(write)

to see all possibilities or read more here.

General

How should I cite ASE?

If you find ASE useful in your research please cite:

Ask Hjorth Larsen, Jens Jørgen Mortensen, Jakob Blomqvist,
Ivano E. Castelli, Rune Christensen, Marcin Dułak, Jesper Friis,
Michael N. Groves, Bjørk Hammer, Cory Hargus, Eric D. Hermes,
Paul C. Jennings, Peter Bjerre Jensen, James Kermode, John R. Kitchin,
Esben Leonhard Kolsbjerg, Joseph Kubal, Kristen Kaasbjerg,
Steen Lysgaard, Jón Bergmann Maronsson, Tristan Maxson, Thomas Olsen,
Lars Pastewka, Andrew Peterson, Carsten Rostgaard, Jakob Schiøtz,
Ole Schütt, Mikkel Strange, Kristian S. Thygesen, Tejs Vegge,
Lasse Vilhelmsen, Michael Walter, Zhenhua Zeng, Karsten Wedel Jacobsen
J. Phys.: Condens. Matter Vol. 29 273002, 2017

An older paper corresponding to an early version of ASE is:

S. R. Bahn and K. W. Jacobsen
Comput. Sci. Eng., Vol. 4, 56-66, 2002

BibTex (:git:`doc/ASE.bib`):

@article{ase-paper,
  author={Ask Hjorth Larsen and Jens Jørgen Mortensen and Jakob Blomqvist and Ivano E Castelli and Rune Christensen and Marcin
Dułak and Jesper Friis and Michael N Groves and Bjørk Hammer and Cory Hargus and Eric D Hermes and Paul C Jennings and Peter
Bjerre Jensen and James Kermode and John R Kitchin and Esben Leonhard Kolsbjerg and Joseph Kubal and Kristen
Kaasbjerg and Steen Lysgaard and Jón Bergmann Maronsson and Tristan Maxson and Thomas Olsen and Lars Pastewka and Andrew
Peterson and Carsten Rostgaard and Jakob Schiøtz and Ole Schütt and Mikkel Strange and Kristian S Thygesen and Tejs
Vegge and Lasse Vilhelmsen and Michael Walter and Zhenhua Zeng and Karsten W Jacobsen},
  title={The atomic simulation environment—a Python library for working with atoms},
  journal={Journal of Physics: Condensed Matter},
  volume={29},
  number={27},
  pages={273002},
  url={http://stacks.iop.org/0953-8984/29/i=27/a=273002},
  year={2017},
  abstract={The atomic simulation environment (ASE) is a software package written in the Python programming language with the aim of setting up, steering, and analyzing atomistic simulations. In ASE, tasks are fully scripted in Python. The powerful syntax of Python combined with the NumPy array library make it possible to perform very complex simulation tasks. For example, a sequence of calculations may be performed with the use of a simple ‘for-loop’ construction. Calculations of energy, forces, stresses and other quantities are performed through interfaces to many external electronic structure codes or force fields using a uniform interface. On top of this calculator interface, ASE provides modules for performing many standard simulation tasks such as structure optimization, molecular dynamics, handling of constraints and performing nudged elastic band calculations.}
}


@Article{ISI:000175131400009,
Author = {S. R. Bahn and K. W. Jacobsen},
Title = {An object-oriented scripting interface to a legacy electronic structure code},
JournalFull = {COMPUTING IN SCIENCE \& ENGINEERING},
Year = {2002},
Volume = {4},
Number = {3},
Pages = {56-66},
Month = {MAY-JUN},
Abstract = {The authors have created an object-oriented scripting interface to a mature density functional theory
code. The interface gives users a high-level, flexible handle on the code without rewriting the
underlying number-crunching code. The authors also discuss the design issues and advantages of
homogeneous interfaces},
Publisher = {IEEE COMPUTER SOC},
Address = {10662 LOS VAQUEROS CIRCLE, PO BOX 3014, LOS ALAMITOS, CA 90720-1314 USA},
Type = {Article},
Language = {English},
Affiliation = {Bahn, SR (Reprint Author), Tech Univ Denmark, Dept Phys, CAMP, Bldg 307, DK-2800 Lyngby, Denmark.
Tech Univ Denmark, Dept Phys, CAMP, DK-2800 Lyngby, Denmark.},
ISSN = {1521-9615},
Keywords-Plus = {MULTISCALE SIMULATION; GOLD ATOMS},
Subject-Category = {Computer Science, Interdisciplinary Applications},
Author-Email = {bahn@fysik.dtu.dk kwj@fysik.dtu.dk},
Number-of-Cited-References = {19},
Journal-ISO = {Comput. Sci. Eng.},
Journal = {Comput. Sci. Eng.},
Doc-Delivery-Number = {543YL},
Unique-ID = {ISI:000175131400009},
DOI = {10.1109/5992.998641},
}