ERROR: Unrecognized pair style 'tersoff/zbl' is part of the MANYBODY package which is not enabled in this LAMMPS binary. (../force.cpp:279) Last command: pair_style tersoff/zbl

Dear all,

I am a beginner on LAMMPS and I have this error when I run my script, even though I have built MANYBODY package.
I use Linux Ubuntu 18.04.
I did :

make yes-MANYBODY
make mpi
and when I check if it’s installed, I got this :
:/mnt/c/langagne/src$ make pi
Installed YES: package MANYBODY

But still, I have this error message and I don’t know what to do, I read everything online and it never works.

Thank you very much for your help !

First off, always report which LAMMPS version exactly you are having problems with.

It is difficult to say anything without seeing whether your compilation was successful and you are typing the correct command lines. This is highly likely due to a mistake of yours or a misconfiguration of your machine or an oversight of an error message.

make pi will only tell you whether the source code has been copied. You would have to look at the output of ./lmp_mpi -h to verify that MANYBODY is included in your package.

You most certainly have not read “everything” that is available online about this kind of error. Try building with CMake. This is more “automatic” and better suited to people that have limited experience in debugging compilation issues.

Thank you for the quick answer !
I’m having issues with the version of LAMMPS from 17 february 2022.
the output of ./lmp_mpi -h is :

langagne@DESKTOP-E7CL7KF:/mnt/c/langagne/src$ ./lmp_mpi -h

Large-scale Atomic/Molecular Massively Parallel Simulator - 17 Feb 2022

Usage example: ./lmp_mpi -var t 300 -echo screen -in in.alloy

List of command line options supported by this LAMMPS executable:

-echo none/screen/log/both : echoing of input script (-e)
-help : print this help message (-h)
-in none/filename : read input from file or stdin (default) (-i)
-kokkos on/off … : turn KOKKOS mode on or off (-k)
-log none/filename : where to send log output (-l)
-mdi ‘’ : pass flags to the MolSSI Driver Interface
-mpicolor color : which exe in a multi-exe mpirun cmd (-m)
-cite : select citation reminder style (-c)
-nocite : disable citation reminder (-nc)
-package style … : invoke package command (-pk)
-partition size1 size2 … : assign partition sizes (-p)
-plog basename : basename for partition logs (-pl)
-pscreen basename : basename for partition screens (-ps)
-restart2data rfile dfile … : convert restart to data file (-r2data)
-restart2dump rfile dgroup dstyle dfile …
: convert restart to dump file (-r2dump)
-reorder topology-specs : processor reordering (-r)
-screen none/filename : where to send screen output (-sc)
-skiprun : skip loops in run and minimize (-sr)
-suffix gpu/intel/opt/omp : style suffix to apply (-sf)
-var varname value : set index style variable (-v)

OS: Linux “Ubuntu 18.04.6 LTS” 4.4.0-19041-Microsoft x86_64

Compiler: GNU C++ 7.5.0 with OpenMP not enabled
C++ standard: C++11
MPI v3.1: Open MPI v2.1.1, package: Open MPI buildd@lcy01-amd64-009 Distribution, ident: 2.1.1, repo rev: v2.1.0-100-ga2fdb5b, May 10, 2017

Accelerator configuration:

Active compile time flags:

sizeof(smallint): 32-bit
sizeof(imageint): 32-bit
sizeof(tagint): 32-bit
sizeof(bigint): 64-bit

Available compression formats:

Extension: .gz Command: gzip
Extension: .bz2 Command: bzip2
Extension: .xz Command: xz
Extension: .lzma Command: xz

Installed packages:


List of individual style options included in this LAMMPS executable

  • Atom styles:

atomic body charge ellipsoid hybrid
line sphere tri

  • Integrate styles:

respa verlet

  • Minimize styles:

cg fire fire/old hftn quickmin

  • Pair styles:

adp airebo airebo/morse atm bop
born buck buck/coul/cut comb comb3
coul/cut coul/debye coul/dsf coul/wolf reax
eam eam/alloy eam/cd eam/cd/old eam/fs
eam/he edip edip/multi eim extep
gw gw/zbl hybrid hybrid/overlay hybrid/scaled
lcbop lj/cut lj/cut/coul/cut lj/expand local/density
meam/spline meam/sw/spline morse nb3b/harmonic polymorphic
rebo soft sw sw/mod table
tersoff tersoff/mod tersoff/mod/c tersoff/table tersoff/zbl
vashishta vashishta/table yukawa zbl zero

  • Bond styles:

hybrid zero

  • Angle styles:

hybrid zero

  • Dihedral styles:

hybrid zero

  • Improper styles:

hybrid zero

  • KSpace styles:

  • Fix styles

adapt addforce ave/atom ave/chunk ave/correlate
ave/histo ave/histo/weight ave/time aveforce
balance box/relax deform deposit ave/spatial
ave/spatial/sphere dt/reset efield enforce2d
evaporate external gravity halt heat
indent langevin lineforce momentum move
nph nph/sphere npt npt/sphere nve
nve/limit nve/noforce nve/sphere nvt nvt/sllod
nvt/sphere planeforce press/berendsen print property/atom
qeq/comb recenter restrain setforce spring
spring/chunk spring/self store/force store/state temp/berendsen
temp/rescale thermal/conductivity vector viscous
wall/harmonic wall/lj1043 wall/lj126 wall/lj93 wall/morse
wall/reflect wall/region

  • Compute styles:

aggregate/atom angle angle/local angmom/chunk bond
bond/local centro/atom centroid/stress/atom chunk/atom
chunk/spread/atom cluster/atom cna/atom com
com/chunk coord/atom dihedral dihedral/local dipole
dipole/chunk displace/atom erotate/sphere erotate/sphere/atom
fragment/atom global/atom group/group gyration gyration/chunk
heat/flux improper improper/local inertia/chunk ke
ke/atom msd msd/chunk omega/chunk orientorder/atom
pair pair/local pe pe/atom pressure
property/atom property/chunk property/local rdf reduce
reduce/chunk reduce/region slice stress/atom temp
temp/chunk temp/com temp/deform temp/partial temp/profile
temp/ramp temp/region temp/sphere torque/chunk vacf

  • Region styles:

block cone cylinder intersect plane
prism sphere union

  • Dump styles:

atom cfg custom image local
movie xyz

  • Command styles

balance change_box create_atoms create_bonds create_box
delete_atoms delete_bonds reset_ids kim_init kim_interactions
kim_param kim_property kim_query displace_atoms info
minimize read_data read_dump read_restart replicate
rerun reset_atom_ids reset_mol_ids run set
velocity write_coeff write_data write_dump write_restart

MANYBODY is said to be installed, that’s why I don’t understand.
What should I do to build with CMake ? Do I need to undo everything I did with make ?

Thank you !

It is compiled into your executable, so you do not need to recompile anything.
The only possible explanation for the error you see is that you would be using a different executable, one without the package included for your simulation. Perhaps you make a copy and forgot to update it?

Detailed build instructions for LAMMPS are in the LAMMPS manual.
I just mentioned CMake because it makes configuring LAMMPS easier and more reliable, since it can check for inconsistencies and prerequisites in ways that are impossible for the GNU make based process.

You seem to be using the Windows Subsystem for Linux. Please note that you can
get precompiled executables for Windows natively with most packages included here: LAMMPS Windows Installer Repository

I forgot to mention, you can check the configuration of your executable that you use for the simulation from within your LAMMPS input script by adding the command info config at the beginning and then compare that output with the output from ./lmp_mpi -h.

Thank you very much, indeed when I compare the two outputs from info config and .lmp_mpi -h, I don’t have the same results. With -h I have no package installed… How can I fix this please ?

Thank you for your help !


This means you are using two different executables. You have to use the correct one that has all features included of course. Which one that is only you can now because it is your machine and I cannot see its file system or what you did to configure and compile LAMMPS from here.

And how can I choose between the two ?
What I don’t understand is how the version from 17 Feb 2022 which I installed first is still here whereas I deleted everything to start from the beginning. So now I have two versions of LAMMPS, 17 Feb 2022 and 3 Mar 2020, installed on my computer.
When I write lmp_mpi it says 17 Feb 2022, and when I write ./lmp_mpi it says 3 Mar 2020…
It seems that only the version 3 Mar 2020 has the package installed but not the 17 Feb 2022.
Can I desinstall one version ?
Thank you

The behavior you describe is exactly how a Linux machine would behave. Unlike on windows the current folder is not part of the PATH environment. You can confirm that with the “type” command: “type ./lmp_mpi” will show a different path to the executable than “type lmp_mpi”.

This is not a LAMMPS problem, but rather a general software/Linux/Windows problem. This can only be resolved and properly explained by somebody that can actually touch and see your machine and explain the difference.

I already suggested you do not use the windows subsystem for linux by rather use a windows installer from the repository. this will have been compiled by an expert and will contain most available packages and styles. If this is not acceptable, you must have local help.

Thank you very much for your help, I think I found the solution to my problem.

To run my code I write mpirun ./lmp_mpi -in in.programme and it works.

Thanks again !