[lammps-users] Calculating diffusion constants for an interfacial system


I am attempting to calculate the diffusion constants of ions in an interfacial system. Specifically I am modeling a 1M Na-Cl brine in a planar graphite crack, but the question I have relates to nanotubes and other interfacial geometries as well. For a homogeneous brine the center of mass (COM) motion for the entire system has been corrected. This means that the correct mean squared displacements are the uncorrected ones, I think. Using the lammps code to remove the center of mass accelerates the ions, which suggests to me that this is in fact and artifact of removing the COM twice, once for the total system and again for the components. However, in an interfacial system, particularly one as slick as graphite, the two portions of the system could become disconnected, with the graphite moving in one direction in the x-y plane and the brine the opposite. Is this likely to be significant? Can I use the COM uncorrected values for my diffusion constants keeping the COM movement of the two sections for reference? or do I need to write some code that will remove the COM motion of the brine from the Na and Cl ion mean square displacements?

Any ideas are appreciated

thank you very much

I would be surprised if the two components began to drift counter to each other. Nose-Hoover is known to exacerbate drift under certain circumstances. So that might be a problem. Anyway, I don't think you should use the LAMMPS MSD fix to calculate the diffusion. It's limited in that it doesn't keep previous "windows" for averaging. That is, the first data point in the MSD has the same number of contributing measurements as the last. If you have a trajectory with N steps, the first point in the MSD can be an average of N measurements, the second N-1, and so forth. I suggest you write out the boundary crossings to the dump file and then calculate the MSD after the fact. This has the added benefit of allowing you to do what you want with the COM.

Quoting "Wander,Matthew" <[email protected]...>:

Nose-Hoover is known to exacerbate drift under certain

This can occur if you use one NH thermostat for the entire
system. You can always thermostat the 2 components

I don't understand precisely what you want to measure for
MSD and diffusion coeff. Matt's suggestion is a good one.
Just dump the atom coords and post-process it to see
if you can compute exactly what you want. If you can
do that, then you can see if it is possible for LAMMPS
to compute it for you with its various options.