I’m adding a new bond type to LAMMPS. Following the way to add a new pair type, I’ve tried to add two lines
to either the style_user.h or the style_molecule.h,
but the compilation always fails like this:
In file included from style.h:352,
style_user.h: In member function ‘LAMMPS_NS::Bond* LAMMPS_NS::Force::new_bond(const char*)’:
style_user.h:36: error: expected type-specifier before ‘BondFenecut’
style_user.h:36: error: cannot convert ‘int*’ to ‘LAMMPS_NS::Bond*’ in return
style_user.h:36: error: expected ‘;’ before ‘BondFenecut’
style_user.h:36: error: ‘BondFenecut’ was not declared in this scope
force.cpp:205: error: expected primary-expression before ‘else’
force.cpp:205: error: expected
;' before 'else' make: *** [force.o] Error 1 make: Leaving directory /home/zhenlong/pair_fene_cut/lammps-16Nov07/src/Obj_serial’
make: *** [serial] Error 2
I am not sure what is the problem since the class I’ve created and the way I incorporate it is similar to all the existing bond types.
Would you please tell me any possible solutions to this problem? Thank you very much!