Dear Iman, your approach sounds reasonable. Have you checked that all your molecules are whole? In the trajectory all atoms are located inside your simulation box. This means that some molecules are split which will lead to huge dipole moments.
Best Philip Sent from my phone, forgive brevity and typos > On 26. Jan 2020, at 22:18, Iman Ahmadabadi <imanahmadabad...@gmail.com> wrote: > > Dear Gromacs users, > > I'm trying to reproduce the gmx dipoles results via python code. In > calculating the fluctuations of total dipole moment, which is the sum on > dipole moment of individual molecules in the box, M = \sum q_{i}*R_{i}, in > which the charges q_{i} are in electron unit and position R_{i} are in nm. > For calculating M for each time step (frame), the x,y, and z component of > each atom is multiplied to their charges, and then summing on all atoms. > The average of M is on all trajectory frames, meaning that summing on M for > all frames and then dividing by the number of frames. Here, the acquired M > is divided by proper constant (0.020819434 e > <https://en.wikipedia.org/wiki/Elementary_charge>·nm > <https://en.wikipedia.org/wiki/Nanometre>) to set it in the Debye unit. > > For M^{2}, M.M (dot product of M by M) is calculated for each frame and > then summing on all frames, followed by dividing by the number of frames. > But the results are larger than gmx dipoles, I wanted to ask that there is > something gmx dipoles is using in order to calculate the <M> and <M^2>, > causing this difference? I appreciate any help in this regard. > > Best regards, > Iman > -- > Gromacs Users mailing list > > * Please search the archive at > http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before posting! > > * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists > > * For (un)subscribe requests visit > https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or send a > mail to gmx-users-requ...@gromacs.org. -- Gromacs Users mailing list * Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before posting! * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists * For (un)subscribe requests visit https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or send a mail to gmx-users-requ...@gromacs.org.