Skip to content

Atomic Simulation Environment (ASE)

To compile ASE on DelftBlue:

  1. Load necessary software modules:
    module load 2022r2
    module load python
    
  2. Load necessary Python-specific modules:
    module load py-numpy
    module load py-scipy
    module load py-matplotlib
    module load py-pip
    
  3. Install ASE locally:

    python -m pip install --upgrade --user ase
    

    The ASE binaries will be installed in ~/.local/bin/ase:

    [<netid>@login01 ~]$ which ase
    ~/.local/bin/ase
    
    [<netid>@login01 ~]$ ase --version
    ase-3.22.1
    

GUI, GPAW, and other advanced features

If you want to use more advanced features of ASE, such as GUI (which depends on correctly compiled TK) or GPAW (which depends on correctly compiled LibXC), we recommend you to use a conda environment. For this:

  1. Load necessary software modules:
    module load 2022r2
    module load openmpi
    module load miniconda3
    
  2. Create a new conda environment:
    conda create --name ase python
    conda activate ase
    
  3. Install dependencies inside of conda:

    python -m pip install ase[test]
    conda install -c conda-forge libxc
    conda install -c conda-forge blas
    python -m pip install gpaw
    python -m pip install mpi4py
    

  4. Submit your job:

    #!/bin/bash
    #SBATCH --job-name="jobname"
    #SBATCH --time=01:00:00
    #SBATCH --ntasks=4
    #SBATCH --cpus-per-task=1
    #SBATCH --mem-per-cpu=1G
    #SBATCH --partition=compute
    #SBATCH --account=research-eemcs-diam
    
    # Load modules:
    module load 2022r2
    module load openmpi
    module load miniconda3
    
    # Set conda env:
    unset CONDA_SHLVL
    source "$(conda info --base)/etc/profile.d/conda.sh"
    
    # Activate conda, run job, deactivate conda
    conda activate ase
    srun python myscript.py
    conda deactivate