Skip navigation.
Home

Espresso Installation with Environment Modules

Espresso (Extensible Simulation Package for Research on Soft matter) is a "highly versatile software package for performing and analyzing scientific Molecular Dynamics many-particle simulations of coarse-grained atomistic or bead-spring models as they are used in soft-matter research in physics, chemistry and molecular biology."

Download the tarball and extract in a sensible place.


mkdir /usr/local/src/ESPRESSO
cd /usr/local/src/ESPRESSO
wget http://download.savannah.gnu.org/releases/espressomd/espresso-3.1.0.tar.gz
tar xvf espresso-3.1.0.tar.gz

Change directory and run the configuration script, and make.


cd 3.1.0
../config-gcc
make

That's it!

The configuration script is as follows:


#!/bin/bash
module load openmpi-gcc/1.6.2
install=$(basename $(pwd) | sed 's%-%/%')
./configure --prefix=/usr/local/$install

Create a new module, and you're done.


cd /usr/local/Modules/modulefiles/espresso
ln -s .base 3.1.0

The .base file takes the following appearance:


#%Module1.0#####################################################################
##
## $name modulefile
##
set ver [lrange [split [ module-info name ] / ] 1 1 ]
set name [lrange [split [ module-info name ] / ] 0 0 ]
set loading [module-info mode load]
set desc [join [read [ open "/usr/local/Modules/modulefiles/$name/.desc" ] ] ]
proc ModulesHelp { } {
puts stderr "\tThis module sets the envinronment for $name v$ver"
}
if { $loading && ![ is-loaded openmpi-gcc/1.6.2 ] } {
module load openmpi-gcc/1.6.2
}
module-whatis "$desc (v$ver)"
prepend-path LD_LIBRARY_PATH /usr/local/$name/$ver/lib
prepend-path PATH /usr/local/$name/$ver/bin