[lammps-users] efield of a point charge

Hi,

I want to add an efield, which represents a point charge. I use real units and
calculated the conversion factor to 14.3, because I use V/Ang.
Exi = 14.3*xi*q*(r^-3).
In my test simulation somehow I need a conversion factor of about 315 to stop
my charged test water to move to the test charge. I use version 10Sep10.
What is my mistake? What is the exact conversion factor?

Thanks for your help,

K. Rinne

data (607 Bytes)

in (1.03 KB)

Hi,

I want to add an efield, which represents a point charge. I use real units and
calculated the conversion factor to 14.3, because I use V/Ang.
Exi = 14.3*xi*q*(r^-3).
In my test simulation somehow I need a conversion factor of about 315 to stop
my charged test water to move to the test charge. I use version 10Sep10.
What is my mistake? What is the exact conversion factor?

klaus,
you are likely missing some 4 pi epsilon0 factor that has to be added somewhere.
check out Update::set_units() in update.cpp to see how to convert the distance
dependent interaction between two point charges to a suitable energy (qqr2e)
for various selections of the units keyword.

cheers,
     axel.

Hi Axel,

we made some more tests and found out the prefactor is depending on the
variable style.
If we generate the efield with EQUAL style we only need a factor of 14.3, which
should be the correct one. But if we use ATOM style of the variable we need the
factor of 332, which is about the conversion factor of eV and kcal/mol higher.
Looking at the file fix_efield.cpp line 180 we find:
    if (xstyle == EQUAL) ex = efactor * input->variable->compute_equal(xvar);
    else if (xstyle == ATOM)
      input->variable->compute_atom(xvar,igroup,&efield[0][0],3,0);
Only for the equal style the is the efactor included. We think the difference
comes by the missing of the efactor in the atom style.
Please check our findings.

Thank you,

Klaus

in (1.08 KB)

data (413 Bytes)

yes - that's inconsistent - the efactor should be applied
to the ATOM style as well - I'll post a patch

Thanks,
Steve