Calculation of ionic conductivity in polymer system

Dear LAMMPS Users,

I would like to calculate ionic conductivity of hydroxyl ion in a polymeric system having 15 polymer chains, water, 30 hydroxyl ions and 30 K+ ions. Ionic conductivity is calculated by following equation:

image.png

Here R(t)-R(0) is displacement of ions from the initial position at time t. The equation in right hand side contains multiplication of square root of mean square displacement (MSD) of each OH- (N=1) ions with square root of MSD of remaining ions and their summation at regular time steps during MD run. It can be done by saving MSD of each ion and doing the multiplication during post processing. But as the number ions are 60, which is higher than the permissible group limit in LAMMPS, so it is not viable.

Other solution is saving the x y z coordinates of each ion at regular time step and calculating the R(t)-R(0) (the displacement of ion from initial position) and later multiplying during post processing. In this case when atoms cross the boundary of periodic box, there is sudden jump in the coordinates leading to very high value of R(t)-R(0), which will give wrong results.

Could anyone here suggest me some other alternative for the calculation.

Thanks in advance for your kind suggestions.

With Regards
Surendra.

Have tried computing the msd per chunk and assign molecule ids accordingly so you can get your desired partitioning without having to use groups?

Axel

image.png

Also, if you save unwrapped coordinates, there will be no jumps.
Axel

image.png

Thanks Axel,

I will try this.

image.png