Hello,
I simulate a salt solution with periodic boundary conditions and use for coulomb interactions kspace_style pppm. I am interested in the electrostatic potential of my system at a few points of the simulation box. I have not found any output command for a long range Coulomb interactions. This Ewald sum is calculate every time step by lammps. but how can i get access to it?
Thanks,
Klaus Rinne
Klaus:
You can use the “thermo_style” command to see it; it’s automatically included in thermo_style multi, or you can use the custom command to pick the ones you want to include.
–AEI
Hello,
I simulate a salt solution with periodic boundary conditions and use for coulomb interactions kspace_style pppm. I am interested in the electrostatic potential of my system at a few points of the simulation box. I have not found any output command for a long range Coulomb interactions. This Ewald sum is calculate every time step by lammps. but how can i get access to it?
klaus,
the long-range potential contributions are not pairwise,
so they cannot be decomposed to atoms like the short-range
contributions are. the kspace pair styles compute the overall
potential for the whole system in reciprocal space and then
identify the resulting force. in PPPM this is done on a grid.
what do you want to do with this information, and do you
need it during the simulation, or would it be sufficient to
have it afterwards. in the latter case, you may want to check
out the multi-level summation potential calculation in VMD,
that would give you the electrostatic potential for the whole
cell on a grid in one go and very efficiently (including GPU
acceleration, if needed).
in the former case, i suspect you'll have to modify the sources
and build a custom kspace style.
cheers,
axel.
I looked into this a while ago. I'm going to be writing a fix that needs the electrostatic potential at a specific point. Axel is correct - you will need to modify the k-space style you want. And if I remember correctly you will also need to modify the concomitant pair style to get the short range value. Also, I seem to remember that there was an issue with k-space giving the force and not the potential. Can't remember why that was a problem, though. If you get into this I'd appreciate hearing how it goes.
Matt
For style ewald it is easy to do. There was a long discussion about
this in the concern to heat flux calculations and there are
suppose to be modifyed codes for per atom coulomb contribution. If
it's interestnig I can try to find this modification.
For ppm style I do not know how to do it .
Sincerely,
German Samolyuk