[lammps-users] adding a new Pair class


I am introducing a new pair potential to the lammps code. I have the files pair_bias.h and pair_bias.cpp in the /src directory. I basically copied pair_lj_cut.h and pair_lj_cut.cpp and changed some of the code in the compute() function and added a couple new functions.

The relevant parts of style_user.h looks like this:

#ifdef PairInclude
#include "pair_bias.h"

#ifdef PairClass

This compiles, but my input file command

pair_style bias 2.5

gives the error: ERROR: Invalid pair style.

I looked over the modifying and extended lammps section of the documentation and I think I've followed the directions ... any suggestions on how to fix this?



Seems to me that it should work as you've described. Here's a couple
more things you might try:

1) Try "make clean" and rebuilding LAMMPS from scratch. Make sure you
don't have other old LAMMPS executables sitting around and that you're
pointing to your new version.
2) Try moving those ifdef statements from style_user.h to style.h.
Rebuild and try again.

If neither of those help, send me your new pair bias files and I'll take a look.