VMD-L Mailing List
From: Fred (Rui FENG) (fengruifree_at_gmail.com)
Date: Thu Feb 26 2009 - 17:00:49 CST
- Next message: Roman Petrenko: "proline trans to cis"
- Previous message: John Stone: "Re: Does command "animate delete all" free memory?"
- In reply to: John Stone: "Re: Does command "animate delete all" free memory?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Hi John,
It works. I add a line "animate delete all" just below "$sel delete"
and the mem usage is around 308 MB. Thank you so much!
Have a good evening!
Fred
On Thu, Feb 26, 2009 at 5:48 PM, John Stone <johns_at_ks.uiuc.edu> wrote:
>
> 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: Roman Petrenko: "proline trans to cis"
- Previous message: John Stone: "Re: Does command "animate delete all" free memory?"
- In reply to: John Stone: "Re: Does command "animate delete all" free memory?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]