I've installed presumably the latest executable version of LAMMPS for macOS from https://docs.lammps.org/Install_mac.html and tried to run the following tutorial https://github.com/mrkllntschpp/lammps-tutorials
I scroll down and see Click here to open Tutorial 1. Run LAMMPS! Learn how to calculate the minimum energy lattice structure
The final lines of the example output on that page are
Total # of neighbors = 280
Ave neighs/atom = 70
Neighbor list builds = 0
Dangerous builds = 0
Total energy (eV) = -13.4399999527352;
Number of atoms = 4;
Lattice constant (Angstoms) = 4.05000466178543;
Cohesive energy (eV) = -3.3599999881838;
All done!
Total wall time: 0:00:00
That's certainly the right lattice constant for fcc bulk aluminum.
I'm not yet a Jupyter notebook user and prefer to work directly from a command line. I've located and downloaded the Al99.eam.alloy potential mentioned in the linked tutorial by clicking on aluminum on the periodic table of elements here https://www.ctcms.nist.gov/potentials/ and searching for the name of the potential.
I cd to the directory containing these files and enter
lmp_serial < calc_fcc.in
and get the results shown below.
Total # of neighbors = 560
Ave neighs/atom = 70.000000
Neighbor list builds = 0
Dangerous builds = 0
Total energy (eV) = -26.8799999054703;
Number of atoms = 8;
Lattice constant (Angstoms) = 5.72757152037121;
Cohesive energy (eV) = -3.35999998818379;
All done!
Total wall time: 0:00:00
There are a few obvious differences besides lattice constant, Total # of neighbors is 560 instead of 280 and Number of atoms is 8 instead of 4.
Any ideas what I've got to change to get the correct results?
my copy/paste reconstructed calc_fcc.in
from the tutorial:
# writefile calc_fcc.in
######################################
# LAMMPS INPUT SCRIPT
# Find minimum energy fcc (face-centered cubic) atomic configuration
# Mark Tschopp
# Syntax, lmp_exe < calc_fcc.in
######################################
# INITIALIZATION
clear
units metal
dimension 3
boundary p p p
atom_style atomic
atom_modify map array
######################################
# ATOM DEFINITION
lattice fcc 4 orient x 1 1 0 orient y -1 1 0 orient z 0 0 1
region box block 0 1 0 1 0 1 units lattice
create_box 1 box
create_atoms 1 box
replicate 1 1 1
######################################
# DEFINE INTERATOMIC POTENTIAL
pair_style eam/alloy
pair_coeff * * Q_Al99.eam.alloy Al
neighbor 2.0 bin
neigh_modify delay 10 check yes
######################################
# DEFINE COMPUTES
compute eng all pe/atom
compute eatoms all reduce sum c_eng
#####################################################
# MINIMIZATION
reset_timestep 0
fix 1 all box/relax iso 0.0 vmax 0.001
thermo 10
thermo_style custom step pe lx ly lz press c_eatoms
min_style cg
minimize 1e-25 1e-25 5000 10000
variable natoms equal "count(all)"
variable teng equal "c_eatoms"
variable length equal "lx"
variable ecoh equal "v_teng/v_natoms"
print "Total energy (eV) = ${teng};"
print "Number of atoms = ${natoms};"
print "Lattice constant (Angstoms) = ${length};"
print "Cohesive energy (eV) = ${ecoh};"
print "All done!"
It's 30,006 lines long but here are the first and last few lines of my Al99.eam.alloy
for verification purposes:
Al EAM from Phys. Rev. B 59, 3393 (1999) in the LAMMPS setfl format.
Conversion by C. A. Becker from Y. Mishin files.
30 December 2008. http://www.ctcms.nist.gov/potentials
1 Al
10000 0.2000000000000000E-03 10000 0.6287210000000000E-03 0.6287210000000000E+01
13 0.2698200000E+02 0.4050000000E+01 fcc
0.1042222107228152E-09
-0.2833153928160009E-02
-0.5663286303573338E-02
-0.8490398933217783E-02
-0.1131449372829334E-01
-0.1413557260000000E-01
-0.1695363745953778E-01
-0.1976869021810666E-01
-0.2258073278690667E-01
-0.2538976707713778E-01
[...]
-0.3352109479779516E-07
-0.2444230228083147E-07
-0.1717018845557266E-07
-0.1150495861170407E-07
-0.7246423756161589E-08
-0.4194276244510321E-08
-0.2147863624012600E-08
-0.9062527475633544E-09
-0.2684334141141742E-09
-0.3337655546827989E-10
lattice fcc 4 orient x 1 0 0 orient y 0 1 0 orient z 0 0 1
does now return the same lattice constant and energy as the link reports, so I think you can just repost your comment as the answer. Thanks! $\endgroup$