From: Ashar Malik (asharjm_at_gmail.com)
Date: Mon Apr 20 2015 - 02:33:57 CDT

you have this line in a for loop

open $Hfile a

the file is already open in line 36

set Hfile [open HHfile.dat w]

I am not sure what you are trying to achieve -- but remove

open $Hfile a

and try again

On Mon, Apr 20, 2015 at 6:56 PM, Monika Madhavi <monikamadhavi_at_gmail.com>
wrote:

> Thank you for the reply. Here is the code.
>
> On Mon, Apr 20, 2015 at 12:15 PM, John Stone <johns_at_ks.uiuc.edu> wrote:
>
>> Hi,
>> My guess is that you're either opening or creating a large number of
>> files via
>> "mol new" or "mol addfile" without using the "waitfor all" flag, or a
>> similar
>> issue. Without the code it's difficult to say what may be going wrong.
>>
>> Cheers,
>> John Stone
>> vmd_at_ks.uiuc.edu
>>
>> On Mon, Apr 20, 2015 at 11:59:34AM +0530, Monika Madhavi wrote:
>> > Dear all,
>> >
>> > I wrote a tcl script to trace the trajectories of few atoms out of
>> 30000
>> > atoms of 10000 frames. I loaded the psf and dcd files and sourced the
>> > script and executed it. The same script worked perfectly for a small
>> no of
>> > frames (10) but when I try to run it for 10000 frames it gives me an
>> error
>> > saying "couldn't open "file13": too many open files". I checked
>> through
>> > the script and all atomselect commands are deleted and all files are
>> > closed. I would be grateful if someone can let me know the cause of
>> this
>> > error and a solution to this.
>> >
>> > Thank you.
>> > Monika
>> > --
>> > W.A.Monika Madhavi
>> > Lecturer (Probation),
>> > Department of Physics,
>> > University of Colombo.
>>
>> --
>> NIH Center for Macromolecular Modeling and Bioinformatics
>> Beckman Institute for Advanced Science and Technology
>> University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
>> http://www.ks.uiuc.edu/~johns/ Phone: 217-244-3349
>> http://www.ks.uiuc.edu/Research/vmd/
>>
>
>
>
> --
> W.A.Monika Madhavi
> Lecturer (Probation),
> Department of Physics,
> University of Colombo.
>

-- 
Best,
/A