SV: [gmx-users] diffusion coefficient with g_msd

Sarah Witzke sawit02 at
Fri Jun 5 13:13:52 CEST 2009

Dear XAvier,


Thank you very much for your answer. I have posted my .mdp file in the bottom of the email - as I haven't specified comm_mode or nstcomm, the default values should be used -

this is also confirmed in the .log file:

   nstcomm              = 1

   comm_mode            = Linear 


This should be fine, right? I have indeed removed the overall COM motion for each step of the simulation?

Just to be sure: To convert the .trr file to an .xtc I could use this command:

trjconv -f dmpclim32-all.trr -novel -center -fit rot+trans -pbc  whole -s dmpclim32-1.tpr -o dmpclim32-all.xtc 

I should not use -center (is that redundant when having nstcomm and comm_mode in the .mdp file?) or -fit rot+trans? Would your advice be to use -pbc nojump or just not -pbc at all? One last question: What is really the difference between -pbc nojumb and whole? 



I looked at g_msd -h for version 4.0.2, 4.0.3, and 4.0.4 (I'm using 4.0.4) and they all had the -rmcomm option, the manual version 3.3 doesn't mention it however.


Thank you, 





#################.mdp file#############

title                =  DMPC-LIM bilayer, 1 LIM and 128 lipids

cpp                  =  /lib/cpp


integrator           =  md

dt                   =  0.002         ; ps

tinit                =  0

init_step            =  5000

nsteps               =  75000000



; Bond constraints

define               =                ; posres etc.

constraints          =  all-bonds     ; constrain all bond lengths

constraint_algorithm =  lincs         ; default

lincs_order          =  4             ; default


; X/V/F/E outputs

nstxout              =  5000          ; pos out   ---  10 ps

nstvout              =  5000          ; vel out   ---  10 ps

nstfout              =  0             ; force out ---  no

;nstlog               = 5000           ; energies to log (0.5 ps)

nstenergy            =  5000           ; energies to energy gile


; Neighbour list

ns_type              =  grid          ; neighlist type

nstlist              =  10            ; Freq. to update neighbour list

rlist                =  1.0           ; nm (cutoff for short-range NL)


; Coulomb interactions

coulombtype          =  PME           ; Particle Mesh Ewald

rcoulomb             =  1.0           ; nm (direct space sum cut-off)

optimize_fft         =  yes           ; optimal FFT plan for the grid


; van der Waals interactions

vdwtype              =  Cut-off       ; Van der Waals interactions

rvdw                 =  1.0           ; nm (LJ cut-off)


; Temperature coupling

Tcoupl              =  berendsen

tc-grps             =  DMPC  LIM_SOL

tau_t               =  0.1   0.1    ; ps

ref_t               =  310   310    ; K


; Energy monitoring

energygrps          =  DMPC  LIM_SOL


; Pressure coupling

Pcoupl              =  berendsen

Pcoupltype          =  semiisotropic    ; semi: (xy) and (z) separately

tau_p               =  1.0     1.0      ; ps

compressibility     =  4.5e-5  4.5e-5   ; 1/bar (water @ 1 atm, 300 K)

ref_p               =  1.0     1.0      ; bar



Fra: gmx-users-bounces at på vegne af XAvier Periole
Sendt: fr 05-06-2009 09:34
Til: Discussion list for GROMACS users
Emne: Re: [gmx-users] diffusion coefficient with g_msd

On Jun 4, 2009, at 4:18 PM, Sarah Witzke wrote:

> Dear gromacs users,
> I have done several simulations with small lipophilic, molecules 
> diffusing into a DMPC bilayer.
> I would like to calculate the diffusion coefficient of the molecules 
> inside the membrane, and therefore I looked at g_msd. The manual 
> (version 4.0) states on p. 250 (manual pages) that g_msd uses the 
> Einstein relation. Reading "Molecular Modelling: principles and 
> applications" 2.ed. by Andrew Leach it is explained that the "for 
> calculating the diffusion coefficient the mean-squared distances 
> should not be limited by the edges of the periodic box. In other 
> words, we require a set of positions that have not been translated 
> back into the central simulation cell." This makes sense since I try 
> to calculate the distance a molecule diffuse.
> I haven't been able to find any mention of how gromacs handle this 
> either in the manual or on the wiki page. The search function on the 
> old webpage directs me to the new webpage, which doesn't give any 
> results for "g_msd" or "diffusion coefficient" or alike, so my 
> apologies for asking a question I could have found the answer to I 
> old emails. When I google I get some of the old emails on g_msd from 
> the gromacs website, but I can only read some of them (the others 
> direct me to an empty page in the new webpage).
> The first question is whether I can use my .xtc file made with this 
> command from the original .trr file:
> trjconv -f dmpclim32-all.trr -novel -center -fit rot+trans -pbc 
> whole -s dmpclim32-1.tpr -o dmpclim32-all.xtc  (for fitting and 
> centring the DMPC group is used)
> I would guess I could not, but should I then do the command again 
> creating a new .xtc file, but without using -center and -pbc whole?
You are right. You can not use this trajectory. The fitting procedure 
will alter the diffusion of the system overall.

If you had to do something it would be to use -pbc nojump to allow the 
molecules to freely diffuse.
g_msd takes care of the periodicity of your system. So you do not have 
to fit or anything.
> My second question is why g_msd has the option -rmcomm to remove COM 
> motion? How is g_msd created so that the diffusion coefficient can 
> be calculated if COM motion is removed?
The removal of the center of mass of the ENTIRE system is necessary 
before calculating the msd.
This is generally done during the run using options in the mdp file.
Which version you are using? I'd never seen the -rmcomm before? You 
can try to determine your
msd with and without the option and see if it affects your result. 
This would depend on the removal
or not of the COM motion in your simulation.

> Thank you very much for your time,
> Sarah
> _______________________________________________
> gmx-users mailing list    gmx-users at
> Please search the archive at before 
> posting!
> Please don't post (un)subscribe requests to the list. Use the
> www interface or send it to gmx-users-request at
> Can't post? Read

gmx-users mailing list    gmx-users at
Please search the archive at before posting!
Please don't post (un)subscribe requests to the list. Use the
www interface or send it to gmx-users-request at
Can't post? Read

More information about the gromacs.org_gmx-users mailing list