You are on page 1of 12

Getting LAMMPS running with AtomEye

Sachin Shanbhag 488 DSL, sshanbhag@fsu.edu
pic:http://roylez.wordpress.com

Download

Get the program from http://lammps.sandia.gov/download.html Select C++, and hit download now This gets you lammps.tar.gz Untar-zip it using the command in an appropriate directory tar -zxvf lammps.tar.gz mv lammps-xxx to lammps, for simplicity.

● ● ●

Building the Executable

Detailed instructions available at: http://lammps.sandia.gov/doc/Section_sta rt.html#2_2 Right now, lets do a simple compilation:
– –

single processor, no MPI no FFT (useful for long range Coulomb forces)

cd lammps/src/STUBS/

make (builds libmpi.a)

cd lammps/src/MAKE/

comment out LINKFORT, FORTLIB, and SYSLIB in Makefile.serial

Building the Executable

CC = g++ CCFLAGS = -O -DFFT_NONE -I../STUBS $(PKGINC) DEPFLAGS = -M LINK = g++ #LINKFORT =-L/opt/intel/fc/10.1.018/lib LINKFLAGS =-O -L../STUBS $(PKGPATH) $(LINKFORT) USRLIB = -lmpi $(PKGLIB) #FORTLIB = -lifcore -lsvml -lompstub -limf #SYSLIB = $(FORTLIB)

cd lammps/src/

make serial

You should have an executable called lmp_serial

I renamed this file as lmp_exe

A sample input file
sachins% cat in.lj # 3d Lennard-Jones melt units lj atom_style atomic dimension 3 lattice region create_box create_atoms mass velocity pair_style pair_coeff fcc 0.8442 box block 0 5 0 5 0 5 1 box 1 box 1 1.0 all create 0.728 87287 loop geom lj/cut 2.5 1 1 1.0 1.0 2.5

A sample input file
neighbor neigh_modify fix thermo thermo_style dump timestep run_style run 0.3 bin delay 0 every 20 check no 1 all nve 25 custom pe ke etotal temp mydump all atom 100 dump.file 0.001 verlet 500

Run the program
sachins% lmp_exe < in.lj LAMMPS (7 Jul 2009) Lattice spacing in x,y,z = 1.6796 1.6796 1.6796 Created orthogonal box = (0 0 0) to (8.39798 8.39798 8.39798) 1 by 1 by 1 processor grid Created 500 atoms Setting up run ... Memory usage per processor = 1.50018 Mbytes PotEng KinEng TotEng Temp -6.7733681 1.089816 -5.6835521 0.728 -6.729132 1.045577 -5.683555 0.69844822 -6.5781112 0.8959221 -5.6821891 0.59847836 -6.3237083 0.64218604 -5.6815223 0.42898199 -6.1193067 0.43545135 -5.6838553 0.29088267

Convert to CFG format

Goto lammps/tools/lmp2cfg
– –

This takes in a “dump” file produced by LAMMPS Converts it to CFG format which can be read by atomeye

Compile lmp2cfg.f
f77 lmp2cfg.f -o lmp2cfg_exe cat in.atomeye 500 1 'dump.file' 1 6 1 26.98 'ao'

Download atomeye

http://mt.seas.upenn.edu/Archive/Graphics/A/

Download it!

the binary i686 Linux version

rename the file as atomeye

get the test cfg file as well

test whether you can see it alright

Now have all three elements

LAMMPS

the molecular dynamics program

lmp2cfg

to convert dump files to cfg format

atomeye

to view cfg formats

Previous Example

lmp2cfg_exe < in.atomeye atomeye 00001.cfg Delete and Insert move you back and forth