Hello,
from the manual I could not understand clearly if the Coulomb interaction defined with tip4p/long is applied to all the atom types or only to the two declared in the pair_style. For example, if I set
pair_style lj/long/tip4p/long long long 1 2 1 1 0.1577 8.5
kspace_style pppm/disp/tip4p 1e-4
kspace_modify disp/auto no mix/disp geom
kspace_modify force/disp/real 0.0001
kspace_modify force/disp/kspace 0.0020
pair_coeff * * 0.0 0.0
pair_coeff 1 1 ``0.21084 3.1668
the Coulomb potential applies only to atom types 1 and 2 (oxygen and hydrogen) or also to other eventually present atom types?
If it applies to all atom typed, is the above equivalent in terms of Coulomb interaction to the following
pair_style lj/smooth/linear 10.0 &
tip4p/long 1 2 1 1 0.1577 8.5 &
coul/long 8.5
kspace_style pppm/tip4p 1e-3
pair_coeff * * lj/smooth/linear 0.00 0.00
pair_coeff 1 1 lj/smooth/linear 0.21084 3.1668
pair_coeff * 3*4 coul/long
pair_coeff 1*2 1*2 tip4p/long
The last line seems to indicate that Coulomb interaction is applied only to types 12, so that another coul/long interaction can be introduced to involve types 34.
Thanks in advance for any reply,
Roberto
The latter example is invalid LAMMPS input without a hybrid or hybrid/overlay somewhere in pair_style.
I am not familiar with this pair style, but normally, pair_coeff commands override previous set pair_coeff commands for the given atom types only. So in your example and by following the docs, I would think that only the atom types 1 have LJ interactions and Coulomb interactions, and the rest only have Coulomb interactions. The “1 2” in the pair_style is only to tell LAMMPS which atom types are the H and O in your system so that it can properly determine where the massless charge sites are, but I would think the Coulomb force is applied to everything with charge, so I would not know how to “mix-and-match” different Coulomb potentials.
Is there a particular reason why you want to have two different Coulomb interactions? If so, could you elaborate? There might be other ways of achieving what you want.
Hello,
from the manual I could not understand clearly if the Coulomb interaction defined with tip4p/long is applied to all the atom types or only to the two declared in the pair_style. For example, if I set
i think i just explained this very recently here on this list. please do search the mailing list archives before asking questions.
coulomb styles always apply to all atom types (unless restricted when used as a hybrid sub-style). In fact the atom type is ignored and only the per-atom charge property determines whether there is an interaction or not.
the tip4p variants apply a special transformation to water atoms, as it computes the location of the M point of the TIP4P model on the fly instead of placing the charge on the oxygen atom.
if you have TIP4P water (and do not specify the location of the M point explicitly), you must use a tip4p pair style for all coulomb interactions or else the coulomb interactions would use the location of the water oxygen instead of the M point and thus the coulomb part would be flat out wrong.
pair_style lj/long/tip4p/long long long 1 2 1 1 0.1577 8.5
kspace_style pppm/disp/tip4p 1e-4
kspace_modify disp/auto no mix/disp geom
kspace_modify force/disp/real 0.0001
kspace_modify force/disp/kspace 0.0020
pair_coeff * * 0.0 0.0
pair_coeff 1 1 ``0.21084 3.1668
the Coulomb potential applies only to atom types 1 and 2 (oxygen and hydrogen) or also to other eventually present atom types?
to all.
If it applies to all atom typed, is the above equivalent in terms of Coulomb interaction to the following
pair_style lj/smooth/linear 10.0 &
tip4p/long 1 2 1 1 0.1577 8.5 &
coul/long 8.5
this is incorrect syntax. there is a “hybrid” or “hybrid/overlay” missing.
kspace_style pppm/tip4p 1e-3
pair_coeff * * lj/smooth/linear 0.00 0.00
pair_coeff 1 1 lj/smooth/linear 0.21084 3.1668
pair_coeff * 3*4 coul/long
pair_coeff 1*2 1*2 tip4p/long
it would not be equivalent (and you can see it from the numbers) for the reason i outlined above. this input is simply wrong.
``The last line seems to indicate that Coulomb interaction is applied only to types 12, so that another coul/long interaction can be introduced to involve types 34.
the logic is the other way around. because of using a hybrid pair style, neighbor lists are modified because of the type assignment. coulomb styles themselves do not look at atom types.
axel.
the Coulomb potential applies only to atom types 1 and 2 (oxygen and hydrogen) or also to other eventually present atom types?
to all.
ok understood.
If it applies to all atom typed, is the above equivalent in terms of Coulomb interaction to the following
pair_style lj/smooth/linear 10.0 &
tip4p/long 1 2 1 1 0.1577 8.5 &
coul/long 8.5
this is incorrect syntax. there is a “hybrid” or “hybrid/overlay” missing.
indeed, I have cleaned-up too much the code when writing here. Let’s pretend it’s there.
kspace_style pppm/tip4p 1e-3
pair_coeff * * lj/smooth/linear 0.00 0.00
pair_coeff 1 1 lj/smooth/linear 0.21084 3.1668
pair_coeff * 3*4 coul/long
pair_coeff 1*2 1*2 tip4p/long
it would not be equivalent (and you can see it from the numbers) for the reason i outlined above. this input is simply wrong.
apart from the hybrid/overlay keyword missing, is it wrong because I have double Coulomb interaction?
``The last line seems to indicate that Coulomb interaction is applied only to types 12, so that another coul/long interaction can be introduced to involve types 34.
the logic is the other way around. because of using a hybrid pair style, neighbor lists are modified because of the type assignment.coulomb styles themselves do not look at atom types.
then what is the purpose of the type assignment? shouldn’t be always mandatory to write
pair_coeff * * tip4p/long
since it should be equivalent of writing
```pair_coeff 12 12 tip4p/long`
although the latter is misleading since it seems that interaction are just among types 1,2.
By the way, does this all-to-all rule hold also for cutoffed Coulomb pair styles or just for long ranged?
thank you,
Roberto
indeed, I have cleaned-up too much the code when writing here. Let’s pretend it’s there.
that is a bad habit. better to test the inputs you post or create new test/example inputs to illustrate the question.
otherwise, there is just too much chance for mistakes and errors and as a person answering it is extremely frustrating to see people ask for things, you spend time to figure things out, only to be told afterwards, that the code was different.
apart from the hybrid/overlay keyword missing, is it wrong because I have double Coulomb interaction?
it is wrong for the reasons i explained in my last email. please pay attention to what i explain.
then what is the purpose of the type assignment? shouldn’t be always mandatory to write
pair_coeff * * tip4p/long
since it should be equivalent of writing
```pair_coeff 12 12 tip4p/long`
although the latter is misleading since it seems that interaction are just among types 1,2.
i explained that already as well. with hybrid styles, you can partition interactions because the hybrid pair style will request correspondingly modified neighbor lists. the sub-style will then process all pairs in that sub-list. but this whole discussion is academic, since mixing tip4p and non-tip4p coulomb styles is plain wrong.
By the way, does this all-to-all rule hold also for cutoffed Coulomb pair styles or just for long ranged?
yes. as i already mentioned, the type assignment is ignored. for cutoff coulomb, the only impact for per-pair-of-types assignment is, that you can change the cutoff for them. that is the only allowed parameter. for /long the cutoff cannot be changed (as it is needed to be consistent for the long-range part of the calculation). so there are no parameters that can be set.
axel.