VMD-L Mailing List
From: Fred (Rui FENG) (fengruifree_at_gmail.com)
Date: Thu Feb 26 2009 - 15:57:56 CST
- Next message: John Stone: "Re: Does command "animate delete all" free memory?"
- Previous message: Fred (Rui FENG): "Does command "animate delete all" free memory?"
- In reply to: John Stone: "Re: Does command "animate delete all" free memory?"
- Next in thread: John Stone: "Re: Does command "animate delete all" free memory?"
- Reply: John Stone: "Re: Does command "animate delete all" free memory?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
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
>
- Next message: John Stone: "Re: Does command "animate delete all" free memory?"
- Previous message: Fred (Rui FENG): "Does command "animate delete all" free memory?"
- In reply to: John Stone: "Re: Does command "animate delete all" free memory?"
- Next in thread: John Stone: "Re: Does command "animate delete all" free memory?"
- Reply: John Stone: "Re: Does command "animate delete all" free memory?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]