You are on page 1of 2

Istallation of required software/packages

Praveenkumar Hiremath
November 30, 2015

Compiling LAMMPS as a library in PYTHON

To use LAMMPS as a library,proceed as directed


Download the recent LAMMPS version and place it in required directory(Say home-directory).
Enter lammps..../doc folder and once go through Section python.html.
Enter src directory through terminal and check the makes available by
using make command.
Include all the packages(like MEAM,USER-PHONON,KSPACE etc)needed
for your LAMMPS using following command. make yes-package.
Check which Makefiles are available in src/MAKE directory (Eg:Makefile.mpi,
Makefile.omp,Makefile.serial).
Enter the folder src and, depending on your requirement and available Makefiles in src/MAKE directory, use make mode=shlib machine
where machine can be mpi,omp,serial.
The previous step generates a lammps shared library file based on machine variable in src directory.
Copy this shared library file liblammps.so to python directory outside
src directory.
Now execute install.py file. This copies liblammps.so and lammps.py
files to system directories.
Now to check if LAMMPS is compiled as shared library, use following.
python (can also use ipython instead of python)
from lammps import lammps
p=lammps()
p.file(in.script) (in.script is the LAMMPS input script required to be
compiled)
If no errors occur, LAMMPS is compiled as shared library.

Installing pwtools Python package

To install pwtools,proceed as directed


Download the package from https://bitbucket.org/elcorto/pwtools
Install all required packages mentioned in http://elcorto.bitbucket.
org/pwtools/written/install.html#add-on-packages-other-required-tools
Enter pwtools directory and run make
Hopefully no error should occur considering the fact that all required
packages are available.
Set the following path in either .bashrc or .profile
PATH=$HOME/python/pwtools/bin:$PATH
if [ -n $PYTHONPATH ]; then
export PYTHONPATH=$HOME/python:$PYTHONPATH
else
export PYTHONPATH=$HOME/python
fi
This finishes pwtools installation.
Just to check if it is added to python,use command to see from where it
is being loaded in python prompt

Installing potfit in Cluster

Proceed as directed
Download the package from http://potfit.sourceforge.net/wiki/doku.
php?id=download
Change the SYSTEM variable in the Makefile according to your needs.
When installing on local machine,see to it that MKL or ACML is installed.
Give required(depending on your requirement) path in Makefile.This results in the moving of binary to this location.

You might also like