[gmx-users] sampling conformation on the basis of RMSD value

spitaleri.andrea at hsr.it spitaleri.andrea at hsr.it
Wed Sep 17 22:42:43 CEST 2008


Hi there,
below you can find a "dirty" perl script that I used to extract
structure from a trr by reading the cluster.log file from g_cluster
Just remove in the cluster.log file all the lines until the (included):

cl. | #st rmsd | middle rmsd | cluster members

#---------------- paste from here -------------
use warnings;

open(IN,"$ARGV[0]") or die "$!";

while($line=<IN>) {
    chomp $line;
    @tmp=split(/\|/,$line);
    $clu=$tmp[0];
    $strucs=$tmp[3];
    $tmp1=$tmp[2];
    @new=split(/ +/,$tmp1);
    $middle=$new[1];
    if ($clu =~ /\d/) {
        $in=$clu;
        $MIDDLE{$in}=$middle;
        push @{ $hash{$clu} }, $strucs;
    }
    unless ($clu =~ /\d/) {
        push @{ $hash{$in} }, $strucs;
    }
}

foreach $key (keys %hash) {
    foreach $ind (@{$hash{$key}}) {
        @test=split(/ +/,$ind);
        foreach $ele (@test) {
            if($ele =~ /\S/) {
                push @{ $nhash{$key}}, $ele;
            }
        }
    }
}

foreach $k (keys %nhash) {
    $size=scalar(@{$nhash{$k}});
    foreach $l (@{$nhash{$k}}) {
        #HERE you may have a system call
            print "$k -> $l\n";
            }
#    print "$k -> $size\n";
}

foreach $key (keys %MIDDLE) {
    #   print "$key -> $MIDDLE{$key}\n";
}
#---------- paste to here -------------------

perl extract.pl cluster.log
The line print "$k -> $l\n" can be removed and there you may have a
system call to trjconv to dump all your structure from the trr.
Please let me know if it is not so much clear ...

andrea




Andrea Spitaleri PhD
Dulbecco Telethon Institute 
c/o DIBIT Scientific Institute
Biomolecular NMR, 1B4
Via Olgettina 58
20132 Milano (Italy)
Tel: 0039-0226434348/5622/3497/4922
Fax: 0039-0226434153

----- Original Message -----
From: "Justin A. Lemkul" <jalemkul at vt.edu>
Date: Wednesday, September 17, 2008 6:42 pm
Subject: Re: [gmx-users] sampling conformation on the basis of RMSD value

> 
> 
> vivek sharma wrote:
> > Hi There,
> > I have a 5 nsec trajectory file for my system...and a RMSD plot 
> for the 
> > same.
> > while doing simulation I have sampled the frame at each 500 ps,
> > Now I want to choose conformation on the basis of RMSD values, 
> like 
> > conformation which has RMSD difference of some value say A 
> nanometer.> Can anybody suggest me a way to do the same ?
> > 
> > I heard of g-cluster command for the same, but don't know how can 
> I use 
> > it for given RMSD difference ?
> 
> The logfile printed out by g_cluster gives clusters of structures 
> based on their 
> RMSD, with the constituent members printed out next to the cluster 
> number.  The 
> cluster members are shown in terms of the timeframe corresponding 
> to the frame.
> 
> You can then extract any frames you wish using trjconv -dump.
> 
> -Justin
> 
> > 
> > Can I do it before giving the final run command, so it will 
> sample the 
> > conformation during the run on the basis of RMSD value ?
> > 
> > 
> > With Thanks,
> > Vivek
> > 
> > 
> > ------------------------------------------------------------------
> ------
> > 
> > _______________________________________________
> > gmx-users mailing list    gmx-users at gromacs.org
> > http://www.gromacs.org/mailman/listinfo/gmx-users
> > Please search the archive at http://www.gromacs.org/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/mailing_lists/users.php
> 
> -- 
> ========================================
> 
> Justin A. Lemkul
> Graduate Research Assistant
> Department of Biochemistry
> Virginia Tech
> Blacksburg, VA
> jalemkul[at]vt.edu | (540) 231-9080
> http://www.bevanlab.biochem.vt.edu/Pages/Personal/justin
> 
> ========================================
> _______________________________________________
> gmx-users mailing list    gmx-users at gromacs.org
> http://www.gromacs.org/mailman/listinfo/gmx-users
> Please search the archive at http://www.gromacs.org/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/mailing_lists/users.php
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: spitaleri.andrea.vcf
Type: text/x-vcard
Size: 241 bytes
Desc: Card for <spitaleri.andrea at hsr.it>
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-users/attachments/20080917/5b5a6c13/attachment.vcf>


More information about the gromacs.org_gmx-users mailing list