[gmx-users] How to compute self diffusivities when the xtc trajectory file contains only a subset of atoms

rocwhite168 rocwhite168 at 163.com
Mon Sep 29 01:05:47 CEST 2014


Yes. I'm using "gmx msd" with and without the "-mol" option. Both will
crash if I attempt to supply an index file that includes more atoms
than in .xtc.

Roc

On Sun, Sep 28, 2014 at 2:05 PM, Mark Abraham <mark.j.abraham at gmail.com> wrote:
> On Sun, Sep 28, 2014 at 8:32 PM, rocwhite168 <rocwhite168 at 163.com> wrote:
>
>> On Sun, Sep 28, 2014 at 12:24 PM, Mark Abraham <mark.j.abraham at gmail.com>
>> wrote:
>>
>> > On Sun, Sep 28, 2014 at 5:36 PM, rocwhite168 <rocwhite168 at 163.com>
>> wrote:
>> >
>> > > Hi Mark,
>> > >
>> > > Thanks for your suggestion. That's actually what I've been doing.
>> > However,
>> > > it requires modifying not only .top but also conf.gro and grompp.mdp
>> (to
>> > > remove reference to index groups of fixed atoms that no longer exist),
>> as
>> > > well as rerunning make_ndx. I was hoping there would be a less tortuous
>> > > path :)
>> >
>> >
>> > Sounds like a 10 minute job to me :-) - sed on the gro file, wc -l to
>> check
>> > the number of atoms, text editor to pull out any references in the .mdp
>> > that no longer make sense. You only need the topology definitions in the
>> > .tpr, not anything to do with the physics...
>> >
>> > Well, 10 min for one state point, and there are multiple temperatures,
>> pressures and mixture compositions ... Not that I'm really going to do this
>> manually, but facing the impressive set of auxiliary tools Gromacs has, I
>> was hoping that I missed a simpler solution.
>
>
> At some point in research, you have to do it yourself, because nobody else
> has done exactly that. :-) In MD, that often means some kind of script. I
> must still be missing something, though, because if all you need is a .tpr
> that matches your simulation's compressed-x group, then the .mdp is common
> to all such simulation analyses,  you already have the input .gro file to
> use sed on because you used it for the original grompp, and those and the
> .top files are common to all simulations with the same composition.
>
>> It's strange that .tpr generated by grompp has everything correctly:
>> > >
>> > >    moltype (0):
>> > >       name="Water"
>> > >       atoms:
>> > >          atom (4):
>> > > ...
>> > >          atom (4):
>> > >             atom[0]={name="OW"}
>> > >             atom[1]={name="HW"}
>> > >             atom[2]={name="HW"}
>> > >             atom[3]={name="MW"}
>> > >          type (4):
>> > > ...
>> > >
>> > > but .tpr generated by gmx convert-tpr does not:
>> > >
>> > >    moltype (0):
>> > >       name="This becomes the system name"
>> > >       atoms:
>> > >          atom (60):
>> > > ...
>> > >          atom (60):
>> > >             atom[0]={name="OW"}
>> > >             atom[1]={name="HW"}
>> > >             atom[2]={name="HW"}
>> > >             atom[3]={name="MW"}
>> > >             atom[4]={name="OW"}
>> > >             atom[5]={name="HW"}
>> > >             atom[6]={name="HW"}
>> > >             atom[7]={name="MW"}
>> > >             atom[8]={name="OW"}
>> > >             atom[9]={name="HW"}
>> > >             atom[10]={name="HW"}
>> > >             atom[11]={name="MW"}
>> > >             atom[12]={name="OW"}
>> > > ...
>> > >
>> > > Any ideas why this would happen?
>> > >
>> >
>> > Like most software, because someone made it work well enough to solve
>> their
>> > immediate problem.
>> >
>> > Back on the main question, why aren't you just using index groups on the
>> > trajectory with the tool you were planning to use? That's the simplest
>> time
>> > to take a subset.
>> >
>> If I just give the original .tpr and .ndx to "gmx msd", the program will
>> crash with a segmentation error because the indices for the atoms in the
>> index group I want to analyze are larger than the total number of atoms in
>> the .xtc file.
>>
>
> ... you're using gmx msd -mol?
>
> Mark
>
>
>> >
>> > Mark
>> >
>> > In any case, thanks for your input.
>>
>> Roc
>>
>> >
>> > > Thanks,
>> > >
>> > > Roc
>> > >
>> > > On Sun, Sep 28, 2014 at 1:32 AM, Mark Abraham <
>> mark.j.abraham at gmail.com>
>> > > wrote:
>> > >
>> > > > Hi,
>> > > >
>> > > > I'm not sure this will help, because I'm not sure what the origin of
>> > the
>> > > > problem is, but you can easily hack a copy of your .top so that a
>> fresh
>> > > run
>> > > > of grompp will produce a .tpr that will match the .xtc.
>> > > >
>> > > > Mark
>> > > > On Sep 28, 2014 7:47 AM, "rocwhite168" <rocwhite168 at 163.com> wrote:
>> > > >
>> > > > > Dear GROMACS users,
>> > > > >
>> > > > > I'm trying to compute mean square displacements for molecules. My
>> > > > > system contains atoms that don't move, so I used
>> "compressed-x-grps"
>> > > > > in grompp.mdp to exclude them from the xtc trajectory file. After
>> > > > > mdrun, I ran "gmx convert-tpr -s topol.tpr -n index.ndx" to reduce
>> > the
>> > > > > set of atoms in the tpr file to match those in the xtc file
>> > (otherwise
>> > > > > "gmx msd" will fail because the atom indices exceed those found in
>> > the
>> > > > > xtc file). Say, for both "compressed-x-grps" and "gmx convert-tpr"
>> I
>> > > > > specified OW_HW to include all water molecules. However, tpxout.tpr
>> > > > > generated by "gmx convert-tpr" treats all water molecules as a
>> large,
>> > > > > single molecule, and as a result "gmx msd" detects only that one
>> > > > > molecule. This would be useful for computing corrected
>> diffusivities,
>> > > > > but is there a way to let "gmx msd" detect individual molecules
>> > > > > correctly if I want to compute self diffusivities?
>> > > > >
>> > > > > Any suggestions would be very much appreciated!
>> > > > >
>> > > > > Thanks,
>> > > > >
>> > > > > Roc
>> > > > > --
>> > > > > 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-request at 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-request at 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-request at 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-request at 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-request at 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-request at gromacs.org.
>


More information about the gromacs.org_gmx-users mailing list