Theory

ASE

https://wiki.fysik.dtu.dk/ase/

The Atomic Simulation Environment (ASE) is an atomic simulation environment enabling its user to do most tasks necessary in computational physics through python scripting.

Introcution to python and ASE

The presentation of the Computational Materials Physics course (TIF035) gives a short introduction to python and ASE. This presentation can be found here. Be aware that this presentation is based on python2 and the version change to python3 contains some changes, but the general concepts are still the same.

Using ASE

ASE can be loaded through the modules on Hebbe and Vera by adding the following lines to your .bashrc:

	module load Python/3.7.2
	module load GCC/8.2.0-2.31.1
	module load OpenMPI/3.1.3
        # Instead of the two above the following module combinations are also possible:
        # icc/2019.1.144-GCC-8.2.0-2.31.1  impi/2018.4.274
        # ifort/2019.1.144-GCC-8.2.0-2.31.1  impi/2018.4.274
	module load ASE/3.18.0-Python-3.7.2

These will give you the default version of ASE. If you want to install your own ASE version, there is a very detailed and fairly simple guide at the webpage wiki.fysik.dtu.dk/ase/download.html .

Here is an example python script showing how to setup a Pd(111) surface and open the ase-gui to view it:

	from ase.build import fcc111
	from ase.visualize import view

	#Now setup Pd
	a0 = 3.996
	k0 = 6
	size = [1,1,3]
	syst = fcc111(symbol='Pd',size=size,a=a0,vacuum=8.0)
	view(syst)

From there the atoms can be exported to POSCAR files, xyz files, ase trajectory files , ... or directly written out in the script.

Installation

If you want to install ASE on your own machine, one very convenient way is to install subversion, e.g. by

	sudo apt-get install subversion

on a Ubuntu machine and then write in a terminal

	export ASE_TAGS=https://svn.fysik.dtu.dk/projects/ase/tags/
	svn co -r 4567 $ASE_TAGS/3.9.1 ase-3.9.1
	ln -s ase-3.9.1 ase

and add

	export PYTHONPATH=$HOME/ase:$PYTHONPATH
	export PATH=$HOME/ase/tools:$PATH

to your .bashrc file. Change paths here to wherever you installed ASE. See ASE Installation guide for more information.

Installation Mac

0. Following the previous guide: "Installation" get via subversion(or in any way) the ase files, and set the required tags in your ~/.bash_profile. Add also the following line to your ~/.bash_profile: export PATH=/usr/local/bin:$PATH source it afterwards by running:

	source ~/.bash_profile

1. You will first have to ensure that homebrew is installed. If not run the following command in a terminal:

	ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

2. Open the apple App Store and install the Xcode developer tools.

3. Install the Xcode command line tools via a terminal by running:

	sudo xcode-select --install

4. For full functionality of ASE with matplotlib install also xquartz from: http://xquartz.macosforge.org/landing/

5. Install brew's python, numpy, pygtk and matplotlib via brew by running the following commands in a terminal:

	brew install python && brew install numpy && brew install pygtk &&   brew install matplotlib --with-pygtk

6. cd into your ASE folder and install it with :

	python setup.py install 

7. Run the tests as described on wiki.fysik.dtu.dk/ase/download.html by issuing two commands:

	mkdir /tmp/testase.$$; cd /tmp/testase.*
	python -c "from ase.test import test; test(verbosity=2, display=True)" 2>&1 | tee testase.log

Alternative: Use pip to install ASE

Be aware: With different versions of python and various subpackages the ASE installation might be sensible to the correct combination of these. Thus it is also recommended to use only one typ of port to install packages -- so either brew or macport.

General

Experiment

Theory

PmWiki

pmwiki.org

edit SideBar

Blix theme adapted by David Gilbert, powered by PmWiki