Is it possible to combine dipole/chunk with spatial binning?

Dear LAMMPS users and developers,

I would like to perform spatial binning of molecular dipole moments in a
simulation of SPC/E water, e.g. based on the molecule's centre of mass.

So far I have always done this in a post-processing step. However, I
wonder whether LAMMPS can do this directly with a suitable combination
of 'chunk/atom molecule', 'com/chunk', 'dipole/chunk' and 'chunk/atom
bin/1d'.

I haven't found a solution yet and would appreciate your suggestions.

Best regards,

Peter

Compute dipole/chunk could compute the dipole

moment (due to spatially distributed charges)

of each molecule. But then you would need to
associate that value with a position (COM) and
do a 2nd level of spatial binning. Kind of like

a nested use of chunk/atom, where the 1st level

is per-molecule and the 2nd level is 1d bins.

Don’t think that’s currently possible, since chunk/atom

only works on per-atom values, not global values

which is what the dipole/chunk would produce.

Maybe the old fix ave/spatial could be re-purposed

to work with global values (per-molecule COM in this

case) to do something like this.

Maybe others have alternated ideas …

Steve

Hi Steve,

Thank you for your helpful comments.

Peter

Compute dipole/chunk could compute the dipole
moment (due to spatially distributed charges)
of each molecule. But then you would need to
associate that value with a position (COM) and
do a 2nd level of spatial binning. Kind of like
a nested use of chunk/atom, where the 1st level
is per-molecule and the 2nd level is 1d bins.

Don't think that's currently possible, since chunk/atom
only works on per-atom values, not global values
which is what the dipole/chunk would produce.

Maybe the old fix ave/spatial could be re-purposed
to work with global values (per-molecule COM in this
case) to do something like this.

Maybe others have alternated ideas ...

​well, i was thinking that it may not be really required to have the COM as
reference​, but it would be sufficient to pick a reference atom, e.g. the
oxygen in water. then one could use fix property/atom to associate a point
dipole property to atoms and then do the binning on that.
however, this also requires some programming, one would need to write a
compute to fill those point dipole atom properties. identifying the
relevant atoms, could be done in a similar fashion to how it is done with
the tip4p pair styles.

axel.

Hi Axel,

Thank you also for sharing your thoughts on this.

In that case I might stick to the post-processing of the trajectory for
now. If I decide to implement the compute you suggested below, I will
make the code available.

Peter