kspace in fix adapt command

Hi All,

In the fix adapt, for the attribute “pair”, it is pair args = pstyle pparam I J v_name.
However, for the kspace, it is just kspace arg = v_name, and there is no option about atom type.

So if the code is like this:

set type 1 charge +1
set type 2 charge +2
set type 3 charge -1

pair_style coul/long 10.0
pair_coeff * *

fix 1 all adapt 0 pair coul/long scale 1 2 v_lam kspace v_lam scale yes

Does the code mean that ONLY the kspace term between 1 and 2 will be scaled?

Any help would be greatly appreciated!

Thank you,
Alvin

Hi All,

In the fix adapt, for the attribute "pair", it is pair args = pstyle pparam
I J v_name.
However, for the kspace, it is just kspace arg = v_name, and there is no
option about atom type.

So if the code is like this:

set type 1 charge +1
set type 2 charge +2
set type 3 charge -1

pair_style coul/long 10.0
pair_coeff * *

fix 1 all adapt 0 pair coul/long scale 1 2 v_lam kspace v_lam scale yes

Does the code mean that ONLY the kspace term between 1 and 2 will be scaled?

of course not. kspace contributions are not pairwise. they always
apply to all atoms.
thus, for consistency, you should scale all coulomb interactions.

axel.

Thank you Axel, seems that I need to find a new method because I just want to scale the coulomb interactions between certain atom types.

Thank you,
Alvin

Thank you Axel, seems that I need to find a new method because I just want
to scale the coulomb interactions between certain atom types.

with this you have to be extremely careful in avoiding inconsistencies.

the straightforward approach would be to use coul/cut, but that may
have a large error depending on the size of your cutoff.

one possible alternate approach could be to not scale down the direct
coulomb, but rather use hybrid overlay and then use coul/cut in
addition to coul/long, but with a negative scale factor and scale that
up until it would compensates coul/long (up to the cutoff, that is).

Yes, it is possible. It transmutes “scale_factor_1 * coul/long” to “coul/long - scale_factor_2 * coul/cut”. if I want the two equations to be equivalent with a fixed scale_factor_1, I need to choose the scale_factor_2 and the cutoff very carefully. Thank you Axel! I will have a try.

Thank you,
Alvin