Coulombic cutoffs of pair hybrid sub-styles do not match

Hello,everyone,I meet an error:Coulombic cutoffs of pair hybrid sub-styles do not match.
my system’s boundary condition is f p f,so my KSpace and lj interaction is set as follows:

pair_style hybrid lj/cut/coul/msm 10 10 lj/cut/coul/msm 10 10
kspace_style msm 0.0001
pair_coeff 1 1 lj/cut/coul/msm 1 0.34 2.32
pair_coeff 2 2 lj/cut/coul/msm 1 0.240416 2.64
pair_coeff 3 3 lj/cut/coul/msm 1 0.34 2.32
pair_coeff 4 4 lj/cut/coul/msm 1 0.240416 2.64
pair_coeff 5 5 lj/cut/coul/msm 1 0.34 2.32
pair_coeff 6 6 lj/cut/coul/msm 2 0.240416 2.64

In my setting ,all coulombic cutoff is 10,So this error is very confued,when I change my boundary to p p p and use pppm method,this error disappears,any advice will be appreciated.

What version of LAMMPS is this with?

Please watch your output very carefully. The MSM kspace style will adjust the coulomb cutoff of the pair style to match the desired accuracy. That step however is not compatible with using a hybrid pair style, so the coulomb cutoff for the first lj/cut/coul/msm instance will be adjusted but not the second.

Overall, your input - as quoted - cannot run, since the used hybrid style setting prevents creating mixed pair_coeff parameters for all entries that would matchpair_coeff 1*5 6
What you are doing makes no sense anyway.

If it runs with an older version of LAMMPS then that is because that older version does not check for all input errors (yet).

my lammps version is 29 sep 2021.In the log file,there some output as follows:

MSM initialization …
WARNING: Adjusting Coulombic cutoff for MSM, new cutoff = 16.409433 (…/msm.cpp:1090)
using polynomial approximation for long-range coulomb (…/kspace.cpp:342)
3d grid size/proc = 39360
estimated absolute RMS force accuracy = 0.033206371
estimated relative force accuracy = 0.00010000000
grid = 64 8 64
order = 10
Neighbor list info …
update every 1 steps, delay 0 steps, check yes
max neighbors/atom: 10000, page size: 100000
master list distance cutoff = 18.409433
ghost atom cutoff = 18.409433
binsize = 9.2047165, bins = 17 3 22
3 neighbor lists, perpetual/occasional/extra = 3 0 0
(1) pair lj/cut/coul/msm, perpetual, skip from (3)
attributes: half, newton on
pair build: skip
stencil: none
bin: none
(2) pair lj/cut/coul/msm, perpetual, skip from (3)
attributes: half, newton on
pair build: skip
stencil: none
bin: none
(3) neighbor class addition, perpetual
attributes: half, newton on
pair build: half/bin/newton
stencil: half/bin/3d
bin: standard
System init for write_data …
MSM initialization …
ERROR: Coulomb cutoffs of pair hybrid sub-styles do not match (…/pair_hybrid.cpp:1070)

what should I do?Change all the cutoff of coulomb interaction to 16.409433?Or something else?Thanks for your reply.

Don’t use pair style hybrid.

I change all the cutoff of coulomb interaction to 16.409433.but it not works.I already set the cutoff to 16.409433,but the warning message will appear again.So is this a drawback of lammps?In some reason, I have to use hybrid pair style.Thanks for your advice!
Best wishes!

It is a consequence of incorrect usage.

I don’t see a valid reason why that would be so. But - of course - you are entitled to have your own opinion.

Mind you, you are not providing complete information. If i use the input parts you provide, this should (rightfully) give the error:

ERROR on proc 0: All pair coeffs are not set (src/pair_hybrid.cpp:689)

It is not possible to give accurate advice based on inaccurate and unreliable information.

Actually,all pair coeffs are set one by one in my in script.And this error(All pair coeffs are not set) doesn’t appear in my log file.For simplify,I don’t list all the pair coeffs.A question is :Using lj/cut/coul/long and pppm method works well with pair hybrid.but why msm not? that’s really confusing.Thanks for your help.
Best wishes!

This question is irrelevant unless you can provide a convincing reason to use a hybrid style in the first place. So far you have failed consistently and given the fact that you also do not provide accurate input examples has now exhausted my patience and interest completely.

Successful communication in a forum like this is based on mutual give and take. However you are only taking and not giving.

Have a nice day.

Sincere sorry for that.the question I mentioned above is just a simple doubt.Pair_style without a hybrid style is suited for my system,too.Thanks for your patient answer. I really learned a lot.
Wish you a happy day!

Your apology is coming too late. The damage is done. While I am not Santa Claus (although sometimes people claim that my appearance would make me a possible candidate), I do have a “nice” and “naughty” list.

There are several things that get you on the “naughty” list:

  • Not reporting the LAMMPS version you are using (you only provided it after asking)
  • providing incomplete input examples (you did)
  • providing inputs that are modified from what you use (you did)
  • not paying attention to my explanations (I had explained why msm is different with hybrid)
  • not following the advice been given (I suggested to not use hybrid)
  • saying that you require a feature when you don’t (you just confirmed that)
  • not providing an explanation why you need to use something I recommended against (you did)
  • saying that you have a problem but without saying what it is (you did not)
  • providing a large and (needlessly) complex input deck that is difficult to read (you did not)

So from that list you qualify for all but the last two. That makes you very naughty™.
Since I also have a long memory about how people behave, you will have to be very nice™ in the future to see me look at any of your questions or requests.

1 Like

Sorry again for what I did,I will be nicer in the future,and keep the 9 requirements you mentioned above in my mind .I hope you will be happy.Thanks for your selfless help!
Best wishes!