I am trying to rebuild Lammps (version 7 Aug-19) in my Linux machine (Centos 07). The purpose of rebuilding is that I want to study MoS2 material with the SW potential well known in the literature. This specific SW potential requires modifying the source file which I obtained from the original paper’s supplemental section (please see attached the pair_sw.cpp source file). Now, when I try to build lammps by copying the source file in /src directory, I get the error message given below. I also want to add that, I tried rebuilding/updating the many-body package and adding the source file in the /src/MANYBODY directory as well but still got the same error. Also, the same Lammps version builds and works fine with the original pair_sw.cpp source file with no issue. In more recent works, other researchers reported results using the same potential. Can anybody please help me with this problem or suggest what should I try differently?
“…/pair_sw.cpp:474:20: error: no ‘void LAMMPS_NS::PairSW::setup()’ member function declared in class ‘LAMMPS_NS::PairSW’
make: *** [pair_sw.o] Error 1”
The reference paper title: "Parametrization of Stillinger–Weber potential based on valence force field model: application to single-layer MoS2 and black phosphorus "
Thanks for your kind help.
Shoieb Ahmed Chowdhury
pair_sw.cpp (18.6 KB)