I want to calculate the ion current, when ion cross a cylinder zone. I know the Gromacs-5.0 or later can use computation Electrophysiology module to calculate.Unfortunately, I used gromacs-4.5.4.Thank you.
I think you can define the zone/volume across/through which the ions will be moving in the simulation. After fixing the volume, you can calculate the number of ions inside the volume for a particular interval of time. You can use the RDF to calculate the number of atoms.
Check this link : http://isaacs.sourceforge.net/phys/rdfs.html\
Then you can calculate the current (flow of ions) by taking the difference of number of ions over the desired time step.
I don't know what exactly the electrophysiology module does. To me the simplest way is to define an area (not a volume), which divides the simulation box into two parts. Perhaps it will coincide with the top or bottom of your cylinder. Then counting the difference of ions above and below will give you the answer. If your cylinder axis is parallel to z-axis of your box (I have an ion channel in my mind), you can check for z-coordinates by a fairly simple script. The current is then a ratio of the difference and time.
Thank you for your answer. The cylinder axis is parrallel to z-axis of my box.I get the z coordinates by g_traj.I think you answer is useful to solve mg problem. Thank you!
I would do it with gromacs 5 because it is implemented in that version and it is faster. For gromacs 4 , I think, you have to install a special version to do CompEl.
The module exchanges water and ions in two compartments and keep the number of ions stable. When ions leak from one compartment into another, e.g. by permeating through a channel, some ions are swapped back. It is a nice protocol, but you have to setup a double membrane systems with two compartments.
I've just recently learned that things might get complicated when applying external electric field under periodic conditions (not recommended unless you really know what you are doing). Then the electrophysiology with the two compartments seems to be the right direction indeed.