# distance dependent dielectric constant

Hello All,

Is it possible to set the dielectric constant to be linearly varying with the separation distance between interacting atoms in LAMMPS?
Thank you very much!

Best wishes,
Jiayuan Miao

Hello All,

Is it possible to set the dielectric constant to be linearly varying with
the separation distance between interacting atoms in LAMMPS?

this is a behavior that you have to program as part of a pair style.
the dielectric constant in lammps is a global scaling factor for
charges. nothing else. it is not meant to do what you want it to do.

axel.

Additionally, what exactly are you trying to accomplish? You want a dielectric constant (which is a material property) to change with the distance between each pair of atoms, no matter what location and orientation the pair may have? That doesn’t sound like a reasonable model.

Carlos

I have not tried this, but the simplest distance-dependent dielectric
constant has been implemented in lammps. "pair_style
lj/charmm/coul/charmm/implicit". It uses this formula:

Ucoul(r) = C*q1*q2 / r^2
Ucoul(r) = C*q1*q2 / r

(I'm not sure if you can manually control the "C" constant. Perhaps
you need to change q1 and q2 to compensate for the change in units?
I'm not sure.)

From the documentation page (http://lammps.sandia.gov/doc/pair_charmm.html)

"Style lj/charmm/coul/charmm/implicit computes the same formulas as
style lj/charmm/coul/charmm except that an additional 1/r term is
included in the Coulombic formula. The Coulombic energy thus varies as
1/r^2. This is effectively a distance-dependent dielectric term which
is a simple model for an implicit solvent with additional screening.
It is designed for use in a simulation of an unsolvated biomolecule
(no explicit water molecules). "

If you want a different kind of distance-dependent (or
field-strength-dependent) dielectric constant, you will have to create
a new pair_style.
I hope this helps.

Andrew

Thank you!This Coulomb potential is exactly what I want, but the the LJ potential in my case is not supposed to be like the one in this pairstyle.
Maybe I could program a new code on the basis of this pair style.

Best wishes,
Jiayuan

Thank you!
This Coulomb potential is exactly what I want, but the the LJ potential in
my case is not supposed to be like the one in this pairstyle.
Maybe I could program a new code on the basis of this pair style.

in that case, i would recommend to simply removed the lj part and
program a pair style that handles only the coulomb part (like coul/cut,
coul/long, coul/msm and so on). that could then be combined with
any other pair style using the hybrid/overlay pair style.

with this kind of implicit potential, the performance issues are less
with the non-bonded calculations...

axel.

Thank you!
This Coulomb potential is exactly what I want, but the the LJ potential in
my case is not supposed to be like the one in this pairstyle.
Maybe I could program a new code on the basis of this pair style.

two alternatives:

1) You could also use a "hybrid/overlay" pair style and set the
epsilon parameter to zero to turn off the lennard-jones forces from
lj/charmm/coul/charmm/implicit. This would not be as efficient as
writing your own pair style, but it would work.

(For example you could try something like this:

pair_style hybrid/overlay lj/cut 2.5 &
lj/charmm/coul/charmm/implicit 8.0 10.0
pair_coeff 1 1 lj/charmm/coul/charmm/implicit 0.0 1.0
pair_coeff 1 1 lj/cut 0.1653 3.62
pair_coeff 2 2 lj/charmm/coul/charmm/implicit 0.0 1.0
pair_coeff 2 2 lj/cut 0.0927 3.052
:

2) If there are not many different types of atoms, you could use
pair_style "table", and create a different table for each pair of atom
types.