ERROR WHEN RUNNING OpenKim Models in LAMMPS

Hi Guys,

I have installed and compiled the OpenKim library from the source, However, whenever I run my simulation it returns the error below

“WARNING: Using ‘neigh_modify every 1 delay 0 check yes’ setting during minimization (…/min.cpp:188)
ERROR: Not all per-type masses are set (…/atom.cpp:770)
Last command: minimize 1e-25 1e-25 5000 10000”

My simulation code can be found below

######################################

LAMMPS INPUT SCRIPT

Find minimum energy fcc (face-centered cubic) atomic configuration

Mark Tschopp

Syntax, lmp_exe < calc_fcc.in

######################################

INITIALIZATION

clear
kim init LJ_ElliottAkerson_2015_Universal__MO_959249795837_003 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

kim interactions 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!”

Can anyone offer any help please?

Hi Michael,

This is a general problem with your LAMMPS input and not something specific to using KIM. In general, you need to set the masses of all atom types in LAMMPS, even if you’re only doing statics. This is exactly what the error message you see is telling you. The only reason the masses don’t have to be set in Tschopp’s example scripts is because the ‘eam/alloy’ pair style is being used there, and as explained in a note in the docs, that sets the masses on its own:

Note that unlike for other potentials, cutoffs for EAM potentials are not set in the pair_style or pair_coeff command; they are specified in the EAM potential files themselves. Likewise, the EAM potential files list atomic masses; thus you do not need to use the mass command to specify them.

Dan

1 Like