Updated 2021-05-17
Running ASE on the Cluster¶
Overview¶
- ASE (Atomic Simulation Environment) is a set of tools and Python modules for setting up, steering, and anlyzing atomistic simulations.
- This guide will cover how to run a Python script using ASE on the Cluster
Tips¶
- The latest version of ASE that PACE offers is
ase/3.9.1
, so please be wary of what ASE modules you are using and whether they are a part of version 3.9.1. - You must load
python/2.7
andintel/15.0
before trying to loadase/3.9.1
.
Walkthrough: Run ASE on the Cluster¶
- This walkthrough will run a Python 2 script that uses ASE to create and print the positions of 4 Ni atoms.
- The Python script can be found here
- PBS script can be found here
- You can transfer the files to your account on the cluster to follow along. The file transfer guide may be helpful.
Part 1: The PBS Script¶
#PBS -N aseTest
#PBS -A [Account]
#PBS -l nodes=1:ppn=2
#PBS -l pmem=2gb
#PBS -l walltime=3:00
#PBS -q inferno
#PBS -j oe
#PBS -o aseTest.out
cd $PBS_O_WORKDIR
module load python/2.7
module load intel/15.0
module load ase/3.9.1
python aseTest.py
- The
#PBS
directives are standard, requesting just 3 minutes of walltime and 1 node with 2 cores. More on#PBS
directives can be found in the PBS guide $PBS_O_WORKDIR
is a variable that represents the directory you submit the PBS script from. Make sure the files you want to use are in the same directory you put the PBS script.- Output Files will also show up in this dir as well
module load ase/3.9.1
loads the 3.9.1 version of ASE. To see what ASE versions are available, runmodule avail ase
, and load the one you want. The other module are dependencies that must be loaded before ASE is loaded.python aseTest.py
runs the Python 2 script using ASE. Make sure that the only version of Python loaded is Python 2 or else you will recieve errors about the syntax of theaseTest.py
script.
Part 2: Submit Job and Check Status¶
- Be sure to change to the directory that contains the
PBS
Script qsub aseTest.pbs
- Check job status with
qstat -t <jobid>
, replacing the number with the job id returned after running qsub - You can delete the job with
qdel <jobid>
, again replacing the number with the jobid returned after running qsub
Part 3: Collecting Results¶
- In the directory where you submitted the
PBS
script, you should see aaseTest.out
file, which contains the results of the job. Usecat aseTest.out
or open the file in a text editor to take a look. aseTest.out
should look like this:
---------------------------------------
Begin PBS Prologue Wed Jun 19 15:50:26 EDT 2019
Job ID: 26094907.shared-sched.pace.gatech.edu
User ID: svemuri8
Job name: aseTest
Queue: inferno
End PBS Prologue Wed Jun 19 15:50:26 EDT 2019
---------------------------------------
Atom('Ni', [0.0, 0.0, 0.0], index=0)
Atom('Ni', [0.5, 0.0, 0.0], index=1)
Atom('Ni', [0.0, 0.5, 0.0], index=2)
Atom('Ni', [0.5, 0.5, 0.0], index=3)
[[ 0. 0. 0. ]
[ 0.5 0. 0. ]
[ 0. 0.5 0. ]
[ 0.5 0.5 0. ]]
[[ 0. 0. 0. ]
[ 0.6 0. 0. ]
[ 0. 0.5 0. ]
[ 0.5 0.5 0. ]]
[[ 1. 0. 0.]
[ 0. 1. 0.]
[ 0. 0. 1.]]
---------------------------------------
Begin PBS Epilogue Wed Jun 19 15:50:27 EDT 2019
Job ID: 26094907.shared-sched.pace.gatech.edu
User ID: svemuri8
Job name: aseTest
Resources: neednodes=1:ppn=2,nodes=1:ppn=2,pmem=2gb,walltime=00:03:00
Rsrc Used: cput=00:00:00,energy_used=0,mem=0kb,vmem=0kb,walltime=00:00:01
Queue: inferno
Nodes:
iw-h43-9.pace.gatech.edu
End PBS Epilogue Wed Jun 19 15:50:27 EDT 2019
---------------------------------------
- After the result files are produced, you can move the files off the cluster, refer to the file transfer guide for help.
- Congratulations! You successfully ran a Python script using ASE on the cluster.