Compiling newer version of LAMMPS with modified pair_sw.cpp

Hello Lammps users,

I am trying to compile the 31 Mar 2017 version of lammps after replacing the original pair_sw.cpp file with a modified pair_sw.cpp by Jiang et. al. I have also attached this modified pair_sw.cpp file.

I am getting the following error
"
…/pair_sw.cpp(474): error: inherited member is not allowed
void PairSW::setup()
^

compilation aborted for …/pair_sw.cpp (code 2)
make[1]: *** [pair_sw.o] Error 2
make[1]: Leaving directory `/data006/gb_lab/Srilok/lammps-31Mar17/src/Obj_cyence_Mar2017’
make: *** [cyence_Mar2017] Error 2

"

I was able to successfully compile with the modified sw on older versions of lammps (Dec 14).

Can you please tell me what is causing this error on newer versions and how to fix it?

Thanks a lot for your help! I really appreciate it

pair_sw.cpp (18.6 KB)

Hello Lammps users,

I am trying to compile the 31 Mar 2017 version of lammps after replacing
the original pair_sw.cpp file with a modified pair_sw.cpp
<http://aip.scitation.org/doi/suppl/10.1063/1.4818414> by Jiang et. al. I
have also attached this modified pair_sw.cpp file.

I am getting the following error
"
../pair_sw.cpp(474): error: inherited member is not allowed
  void PairSW::setup()
               ^

compilation aborted for ../pair_sw.cpp (code 2)
make[1]: *** [pair_sw.o] Error 2
make[1]: Leaving directory `/data006/gb_lab/Srilok/
lammps-31Mar17/src/Obj_cyence_Mar2017'
make: *** [cyence_Mar2017] Error 2

"

I was able to successfully compile with the modified sw on older versions
of lammps (Dec 14).

Can you please tell me what is causing this error on newer versions and
how to fix it?

​LAMMPS has evolved with incompatible internal changes (and performance
enhancements) and thus you would have to port the modifications to the new
version of LAMMPS.
this is easily ​done by comparing the modified file against the old
original it was taken from and then transfer the changes to a pair_sw.cpp
from the current distribution. you can probably do this with a three-way
graphical file comparision tool like "meld" when using the ordering : old
modified new

axel.

Dr. Kohlmeyer,

Thanks. I will try that