Re: removing waters from big dcd files

From: Dong Luo (us917_at_yahoo.com)
Date: Mon Jul 16 2007 - 23:00:25 CDT

Since it's a big dcd file, I guess the first line of
your script will come into a out of memory problem.
Attached is a little tool I wrote that can be used to
get the number of frames of a dcd file output by NAMD.
Once you get the "nf", you may use a script like this:
mol load psf solvated.psf
for {set i 0 } {$i < $nf } {incr i 100 } {
   animate read dcd md0001.dcd beg i end i
   set sel [atomselect top protein]
   $sel writepdb $i.pdb
   if { $i == 0 } {
      $sel writepsf dry_prot.psf
   }
   $sel delete
   animate delete all
}
mol delete top
mol load psf dry_prot.psf
for {set i 0 } {$i < $nf } {incr i 100 } {
    animate read pdb $i.pdb
    file delete $i.pdb
}
animate write dcd {myprotein_prot.dcd} waitfor all

Dong

PS:
1. The VMD user guide is missleading as "atomselect
writedcd filename" is actually not working.
2. To use the little tool, copy it to the directory
where the dcd file is located. Open a cmd window, cd
there and type "dcdframe yourdcdfile". If you are not
using windows, just compile the source file.

--- regafan_at_usc.es wrote:

> Thanks for your suggestion,
>
> I have tried with this script:
>
> mol load psf solvated.psf dcd md0001.dcd
> set nf [molinfo top get numframes]
>
> for {set i 0 } {$i < $nf } {incr i 100 } {
> set sel [atomselect top protein frame $i]
> $sel writepdb $i.pdb
> }
>
> mol load psf dry_prot.psf
>
> for {set i 0 } {$i < $nf } {incr i 100 } {
> animate read pdb $i.pdb }
>
> animate write dcd {myprotein_prot.dcd} waitfor all
> top
>
> for {set i 0 } {$i < $nf } {incr i 100 } {
> puts "Removing file $i.pdb"
> }
>
> exit
>
> but anyway, the first and last structure of the
> trajectory
> generated,myprotein_prot.dcd, do not correspond with
> the first and
> last structure of the corresponding coor files. I am
> not an expert on
> vmd, do you see something wrong in this script which
> can be the cause
> it doesnt work properly?
>
> Rebeca Garcia Fandiņo
> Parc Cientific de Barcelona
> regafan_at_usc.es
>
>
>
>
>
>
>
>
>
>
>
> Estase citando Dong Luo <us917_at_yahoo.com>:
>
> > You can write a script by yourself to fufill the
> job.
> > Check the VMD user guide for the usage of
> "animate".
> > It can be used to read in just part of a big DCD
> file.
> > Make a "atomselect" excluding water molecules, you
> can
> > use "$yourselection writedcd dcdpartname" to
> output
> > this part and "animate delete all" to clear it.
> Repeat
> > for all parts. Finally use "animate" to read all
> > output dcd files one by one to combine them into
> the
> > new psf structure.
> >
> > --- regafan_at_usc.es wrote:
> >
> >> Hello,
> >>
> >> I would like to remove the waters from from a dcd
> >> file obtained with
> >> NAMD/Charmm, and the problem is that the size of
> the
> >> file is 2.9 G
> >> (with waters). I have tried to use ptraj to
> obtain
> >> the "dry
> >> trajectory", and I got a quite strange
> trajectory,
> >> with a first and a
> >> last step different from the structure of the
> >> corresponding first and
> >> last .coor files. I have also tried to use
> catdcd,
> >> choosing the
> >> indexes of only the protein, but when I visualize
> >> the resulting
> >> trajectory, loading first the psf of the protein
> >> without the waters, I
> >> cannot visualize the tertiary sctructure, it is
> only
> >> a ribbon what I
> >> can see.
> >> I have seen that there is also a script for big
> >> files, "bigdcd", but I
> >> donīt know how to use it to eliminate the waters,
> >> and if this is
> >> posible.
> >> Could anyone help me with the treatment of this
> big
> >> dcd files?
> >> Thanks a lot!
> >>
> >> Rebeca Garcia Fandiņo
> >> Parc Cientific de Barcelona
> >> regafan_at_usc.es
> >>
> >>
> >
> >
> >
> >
> >
>
____________________________________________________________________________________
> > Pinpoint customers who are looking for what you
> sell.
> > http://searchmarketing.yahoo.com/
> >
>
>
>

       
____________________________________________________________________________________
Sick sense of humor? Visit Yahoo! TV's
Comedy with an Edge to see what's on, when.
http://tv.yahoo.com/collections/222

This archive was generated by hypermail 2.1.6 : Wed Feb 29 2012 - 15:44:58 CST