[gmx-users] re-sort frames by RMSD

João Henriques joao.henriques.32353 at gmail.com
Thu Mar 27 13:35:28 CET 2014


This should work in sorting a clean (no comments) xvg file by the values in
the second column. Notice this is just an example. Adapt it to your needs.

Clean comments (terminal command):
grep -v "^[#@]" dirty_rmsd.xvg > clean_rmsd.xvg

Sort stuff (script):
#!/usr/bin/env python
import numpy as np
import sys
dtype = [('time', float), ('rmsd', float)]
m = np.loadtxt(sys.argv[1], usecols = (0, 1), dtype = dtype)
n = np.sort(m, order = 'rmsd')

Enjoy,

/J


On Thu, Mar 27, 2014 at 1:01 PM, João Henriques <
joao.henriques.32353 at gmail.com> wrote:

> Do you wanna sort the actual trajectory file OR just print out the sorted
> frame numbers? For the latter I'd use awk, python or whatever language you
> prefer to sort the rmsd.xvg file. The former would require a bit more work
> around, still, it's nothing a bit of scripting can't do.
>
> /J
>
>
> On Thu, Mar 27, 2014 at 12:33 PM, unitALX <alec.zander at gmail.com> wrote:
>
>> Hello!
>>
>> How can I re-sort the frames of a trajectory by increasing RMSD?
>>
>>
>>
>> --
>> View this message in context:
>> http://gromacs.5086.x6.nabble.com/re-sort-frames-by-RMSD-tp5015416.html
>> Sent from the GROMACS Users Forum mailing list archive at Nabble.com.
>> --
>> 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