Slab issue

Well, that is good. Hmmm, without more info I don’t know what to say. A few more things to check would be units–are you accounting correctly for that 4*pi term that floats around in electrostatics? Have you tried different field strengths? I don’t have a feel for how strong 0.5V/A is–are you sure you aren’t hitting the system so hard it is producing artifacts? Have you taken a look at your system in VMD to check for visual artifacts? You could send your input script/description of post-processing, but neither I nor probably anyone else on the mail list has much time to debug that for you. If you do find a bug in the ewald slab correction, please let me know (but it has to be more than “I’m getting the wrong answer so it must be broken.”) :slight_smile:

Stan

Hi again,
Yes I agree this is a fairly befuddling problem. I will continue to look into it, thanks so much for your help. If I find anything new I will let you know.
-Teddy

Hi all,
I have made some progress on the issue I was having. To recap, I was getting the wrong dielectric constant doing a water simulation with an electric field while using the fix_modify slab command in lammps, which implements the Yeh Berkowitz correction for the slab geometry. I think the problem was that I was applying the electric field without including the charges on the wall that would be responsible for the electric field. Although the field outside of a capacitor vanishes, the dipole moment does not, so the Yeh Berkowitz correction is non-zero from these charges. I did not check that sooner because I thought the field would vanish. It seems to be working now, I’ll let you know if anything changes. Thanks for your previous help.
It might be worthwhile to include a note in the man pages on this, because I think it is a problem that can easily slip by.
-Teddy

Hi - we can include a note in the doc page for kspace_modify slab. Are you saying

that if you just use fix efield with the slab option, it is incorrect? Instead you

should induce the field by putting charges at the surfaces of the non-periodic

boundary, and not use fix efield? Which would not be the same field (everywhere)

as fix efield would typically apply.

Steve

Hi Steve,
Yes, that is what I’m saying. For my simulations, I got the incorrect dielectric constant (about 100 for Spc/E water) when applying the fix using the electric field, only getting the correct result with the charges on the wall. This is probably explained by the fact that the Yeh Berkowitz correction is non-vanishing for the charges on the walls, even though the full field from these charges is non-zero. I am still looking into this, but that is my current understanding.
-Teddy

ok - added a NOTE to the kspace_modify doc page … thanks

Steve