VMD-L Mailing List
From: John Stone (johns_at_ks.uiuc.edu)
Date: Thu Feb 26 2009 - 16:48:58 CST
- Next message: Fred (Rui FENG): "Re: Does command "animate delete all" free memory?"
- Previous message: Fred (Rui FENG): "Re: Does command "animate delete all" free memory?"
- In reply to: Fred (Rui FENG): "Re: Does command "animate delete all" free memory?"
- Next in thread: Fred (Rui FENG): "Re: Does command "animate delete all" free memory?"
- Reply: Fred (Rui FENG): "Re: Does command "animate delete all" free memory?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Fred,
The new version of your script looks better in terms of
deleting the atom selections, but it appears that you've
removed the code that deletes the frames before beginning
the next loop iteration. I think if you add the "animate delete all"
back in, things should start working for you.
I should also mention that you might find it handy to use the "bigdcd"
script for this kind of thing:
http://www.ks.uiuc.edu/Research/vmd/script_library/scripts/bigdcd/
Cheers,
John Stone
vmd_at_ks.uiuc.edu
On Thu, Feb 26, 2009 at 04:57:56PM -0500, Fred (Rui FENG) wrote:
> Hi John,
>
> Thank you for your help. But I changed the code but the problem is still there:
>
> set dcdfile C:/test.dcd
> set outfile [open rmsd.dat w]
> mol addfile $dcdfile type dcd first 0 last 0 step 1 filebonds off
> autobonds off waitfor all
> set frame0 [atomselect top "name N" frame 0]
> # rmsd calculation loop
> for { set i 100 } { $i <= 200 } { incr i } {
> mol addfile $dcdfile type dcd first $i last $i step 1 filebonds off
> autobonds off waitfor all
> set sel [atomselect top "name N"]
> $sel frame $i
> $sel move [measure fit $sel $frame0]
> puts $outfile "$i [measure rmsd $sel $frame0]"
> puts $i
> $sel delete
> }
> close $outfile
>
> Thank you!
>
> Fred
>
>
> On Thu, Feb 26, 2009 at 4:16 PM, John Stone <johns_at_ks.uiuc.edu> wrote:
> > Hi,
> > It looks like you're failing to delete the atom selections
> > you're creating in your script. You need to have a
> > call to "$sel delete" inside that loop... That's probably
> > one of the reasons your memory use is not going down much.
> > Also, you should put the "frame0" selection and molecule
> > loading outside of the loop, otherwise you're killing your
> > machine...
> >
> > Cheers,
> > John
> >
> > On Thu, Feb 26, 2009 at 04:00:53PM -0500, Fred (Rui FENG) wrote:
> >> Hi All,
> >>
> >> The manual says when tcl command "animate delete all" is executed, VMD
> >> will delete all the frames from the memory. But when I check the
> >> memory from the Windows Task Manager, the memory doesn't reduce much.
> >> Because I'm trying to read a 2.4 GB dcd file frame by frame to
> >> calculate RMSD, VMD will use up the memory. The Tcl code is below:
> >>
> >> # codes start
> >> set dcdfile C:/test.dcd
> >> set outfile [open rmsd.dat w]
> >>
> >> # rmsd calculation loop
> >> for { set i 100 } { $i <= 200 } { incr i } {
> >> animate delete all
> >> mol addfile $dcdfile type dcd first 0 last 0 step 1 filebonds off
> >> autobonds off waitfor all
> >> set frame0 [atomselect top "name N" frame 0]
> >>
> >> mol addfile $dcdfile type dcd first $i last $i step 1 filebonds off
> >> autobonds off waitfor all
> >> set sel [atomselect top "name N"]
> >> $sel frame $i
> >> $sel move [measure fit $sel $frame0]
> >> puts $outfile "$i [measure rmsd $sel $frame0]"
> >> puts $i
> >> }
> >> close $outfile
> >> animate delete all
> >> # codes end
> >>
> >> Do you know how to slove the out-of-memory problem? Thank you!
> >>
> >> Have a nice day!
> >>
> >> Fred
> >
> > --
> > NIH Resource for Macromolecular Modeling and Bioinformatics
> > Beckman Institute for Advanced Science and Technology
> > University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
> > Email: johns_at_ks.uiuc.edu Phone: 217-244-3349
> > WWW: http://www.ks.uiuc.edu/~johns/ Fax: 217-244-6078
> >
-- NIH Resource for Macromolecular Modeling and Bioinformatics Beckman Institute for Advanced Science and Technology University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801 Email: johns_at_ks.uiuc.edu Phone: 217-244-3349 WWW: http://www.ks.uiuc.edu/~johns/ Fax: 217-244-6078
- Next message: Fred (Rui FENG): "Re: Does command "animate delete all" free memory?"
- Previous message: Fred (Rui FENG): "Re: Does command "animate delete all" free memory?"
- In reply to: Fred (Rui FENG): "Re: Does command "animate delete all" free memory?"
- Next in thread: Fred (Rui FENG): "Re: Does command "animate delete all" free memory?"
- Reply: Fred (Rui FENG): "Re: Does command "animate delete all" free memory?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]