Generating My own Pair style

I’ve put together a pair style that I’m ready to test, but now that I’m trying to get lammps to run it, it doesn’t recognize it. I’ve rebuilt my lammps as a shared library and I’ve included the following in my header file:

#ifdef PAIR_CLASS

PairStyle(lj/smooth,PairLJSmooth)

#else

. . .

but it still doesn’t recognize the pair style at all. Is there anything else I have to do first?

I've put together a pair style that I'm ready to test, but now that I'm
trying to get lammps to run it, it doesn't recognize it. I've rebuilt my
lammps as a shared library and I've included the following in my header
file:

#ifdef PAIR_CLASS

PairStyle(lj/smooth,PairLJSmooth)

#else
. . .

but it still doesn't recognize the pair style at all. Is there anything else
I have to do first?

hard to say with so little information. are you aware that there is
already a set of source files in the LAMMPS distribution, that
provides an lj/smooth pair style?
i also don't understand what adding a feature to LAMMPS has to do with
compiling it as a shared library.

please provide more details on what steps exactly you performed and
how and how that relates to compiling lammps as a shared library.

axel.

I am not sure how this is actually supposed to work, but maybe the pair style was not added to Makefile.list properly? Can you check if you can find an object file relating to your .cpp file in src/Obj_?

To summarize the comments from Axel/Stefan, don’t build it (initially) as a shared lib,

just a normal stand-alone executable. Don’t name your new pair

style the same as an existing one. If you just put the 2 new .cpp/,h

files in the src dir and re-compile, you should be able to use

the new pair style in an input script.

Steve