[gmx-users] Regarding calculation of Spatial Distribution Function

Christopher Neale chris.neale at alum.utoronto.ca
Thu Apr 5 21:56:38 CEST 2018


Mark addressed your second post. Regarding your first post, it looks like that program help output was mangled somewhere between 4.6.5 and 5.1.2. Below is the output from g_spatial in gromacs 4.6.5, which should give you an idea of what the help output should say (e.g. use a .xtc input file and not a .tng input file). I just checked gromacs 2016.4 and it also have this broken text about a .tng file. I did not check gromacs 2018. Since it looks like a failed search and replace, it's probably worthwhile for somebody to grep the entire source code to see where else this .tng was used in error.



[cneale at seawolf1 ~]$ g_spatial -h
                         :-)  G  R  O  M  A  C  S  (-:

               GRoups of Organic Molecules in ACtion for Science

                            :-)  VERSION 4.6.5  (-:

        Contributions from Mark Abraham, Emile Apol, Rossen Apostolov,
           Herman J.C. Berendsen, Aldert van Buuren, Pär Bjelkmar,
     Rudi van Drunen, Anton Feenstra, Gerrit Groenhof, Christoph Junghans,
        Peter Kasson, Carsten Kutzner, Per Larsson, Pieter Meulenhoff,
           Teemu Murtola, Szilard Pall, Sander Pronk, Roland Schulz,
                Michael Shirts, Alfons Sijbers, Peter Tieleman,

               Berk Hess, David van der Spoel, and Erik Lindahl.

       Copyright (c) 1991-2000, University of Groningen, The Netherlands.
         Copyright (c) 2001-2012,2013, The GROMACS development team at
        Uppsala University & The Royal Institute of Technology, Sweden.
            check out http://www.gromacs.org for more information.

         This program is free software; you can redistribute it and/or
       modify it under the terms of the GNU Lesser General Public License
        as published by the Free Software Foundation; either version 2.1
             of the License, or (at your option) any later version.

                              :-)  g_spatial  (-:

DESCRIPTION
-----------
g_spatial calculates the spatial distribution function and outputs it in a
form that can be read by VMD as Gaussian98 cube format. This was developed
from template.c (GROMACS-3.3). For a system of 32,000 atoms and a 50 ns
trajectory, the SDF can be generated in about 30 minutes, with most of the
time dedicated to the two runs through trjconv that are required to center
everything properly. This also takes a whole bunch of space (3 copies of the
.xtc file). Still, the pictures are pretty and very informative when the
fitted selection is properly made. 3-4 atoms in a widely mobile group (like a
free amino acid in solution) works well, or select the protein backbone in a
stable folded structure to get the SDF of solvent and look at the
time-averaged solvation shell. It is also possible using this program to
generate the SDF based on some arbitrary Cartesian coordinate. To do that,
simply omit the preliminary trjconv steps.
USAGE:
1. Use make_ndx to create a group containing the atoms around which you want
the SDF
2. trjconv -s a.tpr -f a.xtc -o b.xtc -boxcenter tric -ur compact -pbc none
3. trjconv -s a.tpr -f b.xtc -o c.xtc -fit rot+trans
4. run g_spatial on the .xtc output of step #3.
5. Load grid.cube into VMD and view as an isosurface.
Note that systems such as micelles will require trjconv -pbc cluster between
steps 1 and 2
WARNINGS:
The SDF will be generated for a cube that contains all bins that have some
non-zero occupancy. However, the preparatory -fit rot+trans option to trjconv
implies that your system will be rotating and translating in space (in order
that the selected group does not). Therefore the values that are returned
will only be valid for some region around your central group/coordinate that
has full overlap with system volume throughout the entire translated/rotated
system over the course of the trajectory. It is up to the user to ensure that
this is the case.
BUGS:
When the allocated memory is not large enough, a segmentation fault may
occur. This is usually detected and the program is halted prior to the fault
while displaying a warning message suggesting the use of the -nab (Number of
Additional Bins) option. However, the program does not detect all such
events. If you encounter a segmentation fault, run it again with an increased
-nab value.
RISKY OPTIONS:
To reduce the amount of space and time required, you can output only the
coords that are going to be used in the first and subsequent run through
trjconv. However, be sure to set the -nab option to a sufficiently high value
since memory is allocated for cube bins based on the initial coordinates and
the -nab option value.


Option     Filename  Type         Description
------------------------------------------------------------
  -s      topol.tpr  Input        Structure+mass(db): tpr tpb tpa gro g96 pdb
  -f       traj.xtc  Input        Trajectory: xtc trr trj gro g96 pdb cpt
  -n      index.ndx  Input, Opt.  Index file

Option       Type   Value   Description
------------------------------------------------------
-[no]h       bool   yes     Print help info and quit
-[no]version bool   no      Print version info and quit
-nice        int    0       Set the nicelevel
-b           time   0       First frame (ps) to read from trajectory
-e           time   0       Last frame (ps) to read from trajectory
-dt          time   0       Only use frame when t MOD dt = first time (ps)
-[no]w       bool   no      View output .xvg, .xpm, .eps and .pdb files
-[no]pbc     bool   no      Use periodic boundary conditions for computing
                            distances
-[no]div     bool   yes     Calculate and apply the divisor for bin
                            occupancies based on atoms/minimal cube size. Set
                            as TRUE for visualization and as FALSE (-nodiv)
                            to get accurate counts per frame
-ign         int    -1      Do not display this number of outer cubes
                            (positive values may reduce boundary speckles; -1
                            ensures outer surface is visible)
-bin         real   0.05    Width of the bins (nm)
-nab         int    4       Number of additional bins to ensure proper memory
                            allocation



________________________________
From: gromacs.org_gmx-users-bounces at maillist.sys.kth.se <gromacs.org_gmx-users-bounces at maillist.sys.kth.se> on behalf of Mark Abraham <mark.j.abraham at gmail.com>
Sent: 04 April 2018 08:35:03
To: gmx-users at gromacs.org
Cc: gromacs.org_gmx-users at maillist.sys.kth.se
Subject: Re: [gmx-users] Regarding calculation of Spatial Distribution Function

Hi,

You're asking for a rotational fit, but you can't do that to a single atom.
Fit e.g. to the protein, and then compute the SDF around the atom of
interest.

Mark

On Wed, Apr 4, 2018 at 6:08 AM Dilip H N <cy16f01.dilip at nitk.edu.in> wrote:

> I want to calculate water SDF around C-alpha of glycine molecule. So here i
> have followed the commands..
> Step 2:- gmx trjconv -s nptmd.tpr -f nptmd.xtc -o abc.tng -boxcenter tric
> -ur compact -pbc none
> and it asks me
> Select group for output
> Group     0 ( System) has  1543 elements
> Group     1 ( Protein) has    10 elements
> Group     2 ( Protein-H) has     5 elements
> Group     3 ( C-alpha) has     1 elements
> Group     4 ( Backbone) has     3 elements
> Group     5 ( MainChain) has     3 elements
> Group     6 ( MainChain+Cb) has     3 elements
> Group     7 ( MainChain+H) has     6 elements
> Group     8 ( SideChain) has     4 elements
> Group     9 ( SideChain-H) has     2 elements
> Group    10 (Prot-Masses) has    10 elements
> Group    11 (non-Protein) has  1533 elements
> Group    12 ( Water) has  1533 elements
> Group    13 ( SOL) has  1533 elements
> Group    14 ( non-Water) has    10 elements
> and i have selected Group 0 (System),
> Step3:- gmx trjconv -s nptmd.tpr -f abc.tng -o def.tng -fit rot+trans
> Select group for least squares fit Group 0 ( System) has 1543 elements
> Group 1 ( Protein) has 10 elements Group 2 ( Protein-H) has 5 elements
> Group 3 ( C-alpha) has 1 elements Group 4 ( Backbone) has 3 elements Group
> 5 ( MainChain) has 3 elements Group 6 ( MainChain+Cb) has 3 elements Group
> 7 ( MainChain+H) has 6 elements Group 8 ( SideChain) has 4 elements Group 9
> ( SideChain-H) has 2 elements Group 10 ( Prot-Masses) has 10 elements Group
> 11 ( non-Protein) has 1533 elements Group 12 ( Water) has 1533 elements
> Group 13 ( SOL) has 1533 elements Group 14 ( non-Water) has 10 elements
> If i give group 3 (since it has C-alpha atoms), but i am getting an error
> as
> Fatal error: Need at least 2 atoms to fit!
>
> So, how can i solve this issue..?? since C-alpha is only one atom..
>
> Thank you.
>
>
>> <https://mailtrack.io/> Sent with Mailtrack
> <
> https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality&
> >
>
> On Tue, Apr 3, 2018 at 2:25 PM, Dilip H N <cy16f01.dilip at nitk.edu.in>
> wrote:
>
> > Hello,
> > I want to do the Spatial Distribution Function,
> > I tried to follow the manual gmx spatial.....
> > I am following the five-step protocol which is given in gmx spatial
> > manual..
> > 1) I have an index file ndx_CaOw.ndx (which contains the C-alpha and all
> > the Ow's of water molecules, Is this index good or should i have all the
> > molecules..??)
> > 2) in the second step-  "gmx trjconv -s a.tpr
> > <http://manual.gromacs.org/online/tpr.html> -f a.tng
> > <http://manual.gromacs.org/online/tng.html> -o b.tng
> > <http://manual.gromacs.org/online/tng.html> -boxcenter tric -ur compact
> > -pbc none" here we need to give the input file ie., -f a.tng from where
> > does this .tng file i need to give the input..?? How do i create a .tng
> > file.. what information does this tng file contain...??
> >
> > Any suggestions...
> >
> > Thank you.
> > --
> > With Best Regards,
> >
> > DILIP.H.N
> > Ph.D Student
> > ‌
> > <https://mailtrack.io/> Sent with Mailtrack
> > <
> https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality&
> >
> >
>
>
>
> --
> With Best Regards,
>
> DILIP.H.N
> Ph.D Student
> --
> 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