Using the Atomic Simulation Environment

AICCM is a calculator that needs to be plugged into the Atomic Simulation Environment (ASE). If you are not familiar with ASE, consider ASE Tutorials first. Most of the tutorials will use the EMT potential. You can set AICCM as a calculator for some calculations, but be aware that not all calls from the ASE are supported.

Defining a molecule

The ASE can handle all sorts of input formats. The most common are xyz files. The following file “H2O.xyz” defines the water molecule.

XYZ file: coordinates in Angstrom
H          0.7510000000          0.1940000000          0.0000000000
O          0.0000000000         -0.3880000000          0.0000000000
H         -0.7510000000          0.1940000000          0.0000000000

There are many programs that allow drawing of molecules. The use of GabEdit is recommended.

Setting up the first calculation with AICCM

Inputs for AICCM are Python scripts. All input parameters are organized in Python dictionaries. You can run the following example by adding the highlighted source code to a file or run it directly by typing the commands into the Python interpreter. For the latter, IPython is highly recommended. The first step is to import the required Python modules from the ASE and AICCM:

from ase import io
from aiccm import aseinterface

Assuming you have created a file “H2O.xyz” before you can now read in the coordinates of the molecule:

molecule = io.read('H2O.xyz')

The next step is to set up the calculator. In this example the slow Python implementation of one- and two-electron integrals is used. In the “output” section, if “txt” equals “-”, the output is written to the standard out (normally printed to the screen). If a filename is given, a file is created and the output is written there. The function “set_calculator” attaches the calculator to the molecule:

calc_AICCM = aseinterface.AICCM(
    basis = {
           'name'           : 'STO-3G',
           'format'         : 'turbomole',
    calculator = {
                  'method' : 'HF',
    converger = {
               'converger'   : None,
    integration = {
                 'integrals' : 'pyints',
                 'ERI'       : 'pyints',
                 'tolerance' : 12,
    output = {
              'txt'        : '-',
              #'txt'        : 'AICCM_H2O.out',
              'printlevel' : 'low',
              'printbasis' : True,

Calling the function “get_potential_energy” starts the calculation:

E = molecule.get_potential_energy()

Saving the wavefunction to a file

It is possible to write the converged wavefunction to disk. The dictionary allows the following options to be set:

wavefunction = {
   'store'    : True,
   'compress' : False,
   'filename' : 'myWavefunction.abw',

AICCM writes the wavefunction to a file with the name set the keyword “filename” “store” is set to “True”. The file “myWavefunction.abw” is a binary file and it contains atoms, basis and wavefunction (“abw file”) and also all AICCM input parameters. If the keyword “compress” is set to “True” and the bz2 compression module is available in your Python installation, the file will be compressed. In that case the the extension ”.bz2” is automatically appended to the given filename.

Reading a converged wavefunction from a file

A converged wavefunction from an abw file can be used to restart a calculation. Simply initialize AICCM giving the filename of the abw file:

calc = GPAW('myWavefunction.abw')

Please note that if the wavefunction was successfully compressed during the write, the extension ”.bz2” was automatically appended and has to be added now:

calc = GPAW('myWavefunction.abw.bz2')