Open ESgit2021 opened 3 years ago
Is this code https://github.com/Electrostatics/apbs/blob/34fd2bbacb84e1289490fe746ba0cc7553a23ce2/src/mg/vgrid.c#L379 what you're looking for?
Yes, i want to calculate the gradient of elec. potential on all points of a grid. So I figure this is the part of the code, (in vgrid.c) where it is calculated and i call this values (so gradient of potential on all points of the grid) into the vpmg.c to write it out with the same procedure as other features are written out (edens, ndens, qdens,...). So I already corrected all the other parts of the code, and i get three files which represent gradient calculated in three directions. I would just like to check that i call the correct part of the code, so I really get printed out the gradient of electrostatic potential (so electric field) on all points of a grid. Best
Dear, I have a very simple system of highly charged sphere in ionic solution (1M). I would like to write out the gradient of the electrostatic potential (electric field) for the whole grid in all three directions. Following the example of the write out method for edens property (in the formula of which the gradient of the electric potential appears), I added a printout (in vpmg.c) to the src/mg code of three new properties, namely grad [0], grad [1], grad [2]. If I understand correctly in this way I get the gradient of the electric potential (which is equal to the electric field) in x, y and z directions. I’ve pasted the piece of code below to do this. I wonder if I understand the code correctly and in this way I get the gradient (electric field) in all three directions. case VDT_GRADX: grid = Vgrid_ctor(nx, ny, nz, hx, hy, hzed, xmin, ymin, zmin, thee->u);
Best regards, Ema