[lammps-users] Invalid kspace style.

I'm having problems with my input file - I keep getting the error message - Invalid kpsace style, but I cannot see where the problem is in my input file. My system has triclinic symmetry so I have to use the ewald/n kspace style.

My input file is below.

Additionally, how do I define multiple pair_styles within an input file. I am wanting to use the Buckingham potential below for my interactions between the atoms in my surface (as below) and a LJ/coul potential for all other atoms which I am going to add afterwards.

Thanks,
Michael

Two potential issues:

(1—Possible) Did you install the user-ewaldn package before compiling LAMMPS? The ewald/n isn’t included by default.
(2—Definite) You need to use the buck/coul pair style rather than the buck/coul/long style. The latter isn’t supported by ewald/n.

–AEI

Thank you,
I didn’t realise ewald/n was a user package that needed to be installed separately.
I have done that and it works fine now.

Regarding the second part of my query, how do I define multiple pair styles within my input file so I can use the Buckingham potential for my surface atoms and LJ interaction for all others. Additionally, can I have my lattice structure for my surface defined in my input file as I currently have, and then read all other molecules in from a LAMMPS data file.

Thanks,
Michael

Thank you,
I didn't realise ewald/n was a user package that needed to be installed
separately.

it is typically explained towards the end of the respective
documentation sections for the individual module. not just
for user packages, but for all optional packages.

I have done that and it works fine now.

Regarding the second part of my query, how do I define multiple pair styles
within my input file so I can use the Buckingham potential for my surface
atoms and LJ interaction for all others. Additionally, can I have my lattice

you have to use pair_style hybrid for that.

structure for my surface defined in my input file as I currently have, and
then read all other molecules in from a LAMMPS data file.

you cannot do that.

it might work the other way around, when you list the
surface atom type in your data file. and then create
the atoms after reading the data file.

otherwise you need to merge your surface with the rest
of the structure and then read in the whole thing as one
data file. for that you can write out your surface to a restart
file (and then convert to a data file) or write out to xyz
and merge the files with a text editor.

normally i would suggest to use VMD for that, but i have
not idea how much it will mess up data files that have
non-orthogonal boxes.

cheers,
      axel.