Dear Lammps Users,
I want to calculate instantaneous current, as mentioned below.
(https://pubs.acs.org/doi/10.1021/acsanm.9b02280?ref=pdf)
Initially I thought of using compute displace/atom command and as a result I went through its documentation.
Define a computation that calculates the current displacement of each atom in the group from its original (reference) coordinates, including all effects due to atoms passing through periodic boundaries.
A vector of four quantities per atom is calculated by this compute. The first 3 elements of the vector are the dx,dy,dz displacements. The fourth component is the total displacement, i.e. sqrt(dxdx + dydy + dz*dz).
The displacement of an atom is from its original position at the time the compute command was issued. The value of the displacement will be 0.0 for atoms not in the specified compute group.
My rationale was since a_i(t + \Delta t) - a_i(t) is displacement hence I could use the command here. At the moment, I not only don’t know how to calculate instantaneous current but also I’ve trouble understanding how compute displace/atom works.
Suppose I have created a group with lets say 10 atoms all of same type:
group abc id 1:10
compute disp abc displace/atom
thermo_style custom step time c_disp
I understand this will give me an error because because what I’m computing is a n * 4 dimensional vector and what I’m trying to print is a scalar but even so my question is how this command will print out displacement of each atom in the group? In other words, how can I write it in a way thru which I get displacement of each atom along a particular direction, say x-axis? More importantly, can I make use of this command for my problem?
Even if I use something like
group abc id 1:10
compute disp abc displace/atom
compute disp2 abc reduce ave c_disp[1]
thermo_style custom step time c_disp
Now disp, which is a vector, has been converted to scalar using reduce command. But it’d be blasphemous to use this to calculate the above mentioned instantaneous current problem.
I don’t know how to make use of trajectory file generated after a particular LAMMPS simulation for such a calculation. Any help regarding how can I make use of trajectories in calculating the above mentioned current problem would be much appreciated.
Best
Akshay