Discussion:
trajectory output from g_select ?
(too old to reply)
jkhao
2011-03-04 00:01:23 UTC
Permalink
Hi,

I'm using g_select ( great tool !) to isolate a series of identical
molecules, and I need to run some gmx analyses of heavy trajectories.

If the number of molecules selected is constant over all the frames,
it's possible to rebuild a trajectory from the output index and
g_traj. The problem is that the extraction needs to call g_traj as
much as there's index groups (at least one index group for each
frame), so it's not verry efficient for large trajectories.

Is there a way to do that more efficiently ?
If not, any advices for coding ?

Thanks.

Jonathan.

----------------------------------------------------------------------
Message envoy? via le Webmail de l'IFR88 (http://www.ifr88.cnrs-mrs.fr).
Mark Abraham
2011-03-04 07:05:07 UTC
Permalink
Post by jkhao
Hi,
I'm using g_select ( great tool !) to isolate a series of identical
molecules, and I need to run some gmx analyses of heavy trajectories.
If the number of molecules selected is constant over all the frames,
it's possible to rebuild a trajectory from the output index and
g_traj. The problem is that the extraction needs to call g_traj as
much as there's index groups (at least one index group for each
frame), so it's not verry efficient for large trajectories.
Is there a way to do that more efficiently ?
I'm not very clear on what you're trying to do. You have different sets
of atoms you need to extract from different trajectory frames according
to some criterion expressed with g_select? Why do you need g_traj? Does
splitting the trajectory into frames with trjconv help?

Mark
jonathan
2011-03-04 08:50:35 UTC
Permalink
Indeed, to be more specific, I would like to run a g_covar analysis on
lipid acyl chains that are within a certain distance to a protein.
Since the trajectories are quite long (+10K frames), splitting each
frame to separate files, and then isolating the selection would require
a lot of time.
I can actually do this with python from VMD but I was wondering if
gromacs tools could do this faster ...

Thanks

Jonathan
Mark Abraham
2011-03-04 12:46:50 UTC
Permalink
Post by jonathan
Indeed, to be more specific, I would like to run a g_covar analysis on
lipid acyl chains that are within a certain distance to a protein.
Since the trajectories are quite long (+10K frames), splitting each
frame to separate files, and then isolating the selection would require
a lot of time.
I can actually do this with python from VMD but I was wondering if
gromacs tools could do this faster ...
Aren't you going to have to end up with the same number of elements from each frame for the analysis? If so, you need to use a selection criterion that achieves that.

Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-users/attachments/20110304/92571092/attachment.html>
jonathan
2011-03-04 14:34:57 UTC
Permalink
I previously supposed that the number of lipids selected was constant to
simplify the problem.

The distance criteria gives a different number of lipids for each frame.
To end up with a constant number of atoms in the output trajectory,
each lipid selected in a frame is written in a separate output frame.
I then end up with an output trajectory of a single lipid, with a number
of frames equal to the number of lipids selected over the whole
trajectory.

As my analysis does not depend on time, loosing the correspondence
between the input trajectory frame and the output trajectory frame is
not important.

It becomes obvious that using the index from g_select is not appropriate
for this on large trajectories ...

I'm trying to avoid modifying the trjconv or g_select source to get this
working, so any suggestions are welcomed !
If there's no other way, I'll switch to gmx-dev list.


Jonathan
Mark Abraham
2011-03-05 01:41:00 UTC
Permalink
Post by jonathan
I previously supposed that the number of lipids selected was constant to
simplify the problem.
The distance criteria gives a different number of lipids for each frame.
To end up with? a constant number of atoms in the output trajectory,
each lipid selected in a frame is written in a separate output frame.
I then end up with an output trajectory of a single lipid, with a number
of frames equal to the number of lipids selected over the whole
trajectory.
You seem to want a dynamic selection for each frame. Then, to split that selection into individual molecules, and then concentate a pseudo-trajectory from the set of all molecules found in that frame. Then concatenate a further pseudo-trajectory from the trajectory created from each frame.

In the fullness of time you'll be able to do the first part in one hit, but for the moment I think you need to run g_select -on, split the trajectory into frames (so you don't have to read the whole file for the frame of interest), and then apply trjconv (mode 2) with the matching index group for each frame. Then somehow split each resulting frame into molecules (e.g. a further trjconv mode 2), and re-concatenate. All of that is best done with a shell/Perl/python script calling the existing GROMACS tools. The result will be only slightly slower than a C solution, and much faster to develop.

Mark
Post by jonathan
As my analysis does not depend on time, loosing the correspondence
between the input trajectory frame and the output trajectory frame is
not important.
It becomes obvious that using the index from g_select is not appropriate
for this on large trajectories ...
I'm trying to avoid modifying the trjconv or g_select source to get this
working, so any suggestions are welcomed !
If there's no other way, I'll switch to gmx-dev list.
Jonathan?
--
gmx-users mailing list??? gmx-users at gromacs.org
http://lists.gromacs.org/mailman/listinfo/gmx-users
Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/Search before posting!
Please don't post (un)subscribe requests to the list. Use the
www interface or send it to gmx-users-request at gromacs.org.
Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-users/attachments/20110305/c627dacb/attachment.html>
jonathan
2011-03-05 09:48:01 UTC
Permalink
Ok, I'll try the python solution
Thanks for your help,

Jonathan

Continue reading on narkive:
Loading...