Professional Documents
Culture Documents
Project #4: LAMMPS Website Homebrew
Project #4: LAMMPS Website Homebrew
Project #4
For the final project, we will use the most widely used open-source MD code, the so-called Large-Scale
Atomic/Molecular Massively Parallel Simulator or LAMMPS developed by Sandia National Labs.
cp -r /opt/lammps-16Mar18/examples/indent/ .
cd indent
cp /opt/lammps-16Mar18/src/lmp_mpi .
./lmp_mpi < in.indent
If you are working locally on your own machine, you need to replace lmp_mpi with the LAMMPS
executable.
As a benchmark case, let us – as on Project 3 – identify the equilibrium spacing a0 as the minimizer of the
interaction energy E(a) in a Cu fcc lattice at 0K, using the potential of Foiles et al. (1986). For that purpose,
we will adapt this online tutorial. The tutorial equilibrates an atomic crystal using an EAM potential. You need
to change the potential’s definition in the input file in order to compute the lattice spacing for Cu. Compute
1
Computational Multiscale Modeling (151-0520-00L) May 16, 2018
Spring 2018 Prof. Dennis M. Kochmann, ETH Zürich
the energy of fcc Cu for various values of the lattice spacing a, and compute the bulk modulus analologously
to Project 3. Compare your results to those of Project 3.
Hint: You can adapt the Matlab script given in Part 2 of the online tutorial (a python script can be provided
if you wish to use python). Note that Matlab is not installed on the class server (so either use it on your
machine or use python on the server).
Next, let us simulate a finite-temperature canonical (N V T ) ensemble of Cu, using the same potential as
above. Repurposing the same initialization part for the input script as in Problem 1, now using the fix nvt
command1 , write a new input script in order to perform simulations at finite temperature using explicit time
integration:
• Plot the evolution of the system’s potential and kinetic energy and temperature over time.
Hint: Use the thermo and thermo_style commands and output data from the log file.
• Compute the radial distribution function using the compute rdf command2 . Output this last result
using the fix ave/time command and plot the distribution.
Perform the same setup at a different temperature and compare your results.
Finally, let us simulate an indentation test into a 2D block at finite temperature as a realistic boundary value
problem, using periodic boundary conditions on the lateral sides and the microcanonical (N V E) ensemble to
simulate adiabatic conditions. Start from the indent example provided with the LAMMPS distribution and
adapt it in order to output and plot the force exerted on the indenter as a function of its position. By dumping
graphics files, you can also import results into Paraview.
1
http://lammps.sandia.gov/doc/fix nh.html
2
http://lammps.sandia.gov/doc/compute rdf.html