What are the relevant variables in pppm.cpp to output the electric field ?

Dear LAMMPS users,

I am adding some code to LAMMPS in order to output the electric field computed on the pppm grid, essentially for visualization purpose.

Do the variables labeled ‘’vd#_brick’’ (where # stands for x, y or z) store the electric potential gradient projections in real 3d space ? Or do I need to perform some additional tasks to compute the electric field values out of these variables ?

Cheers,
Romain

Dear LAMMPS users,

I am adding some code to LAMMPS in order to output the electric field
computed on the pppm grid, essentially for visualization purpose.

Do the variables labeled ‘’vd#_brick’’ (where # stands for x, y or z)
store the electric potential gradient projections in real 3d space ? Or do
I need to perform some additional tasks to compute the electric field
values out of these variables ?

​is there a specific need to do this from within LAMMPS?

you could just write out a dump file with charges, read it into VMD and
create a corresponding .dx format 3d grid file with the PMEpot​ plugin/gui.

http://www.ks.uiuc.edu/Research/vmd/plugins/pmepot/

​axel.​

Hi Axel,

Yes, it could do the trick. Thanks for the tip !

However, as i have already started writing my code I’d like to know if I am on the right track. If it gets too complicated, I will give pmepot a try.

Cheers,
Romain

Hi Axel,

Yes, it could do the trick. Thanks for the tip !

However, as i have already started writing my code I'd like to know if I
am on the right track. If it gets too complicated, I will give pmepot a
try.

​yes, you are on the right track. you have to access the those arrays at
the right time, i.e. after PPPM::poisson() has been called.
the tricky thing is that the potential data is scattered across processors,
so it can take some effort to stitch this all together cleanly.​

Ok. Thanks a lot.

Cheers,
Romain