From: John Stone (johns_at_ks.uiuc.edu)
Date: Thu Sep 05 2002 - 14:00:11 CDT

Dear Rui,
  Are you closing your file?
I don't see a matching "close" for your "open", that could very well
cause the problems you are seeing.

Thanks,
  John Stone
  vmd_at_ks.uiuc.edu

On Thu, Sep 05, 2002 at 07:42:20PM +0100, J. Rui Rodrigues wrote:
> Hi,
> I'm having trouble with this simple tcl script:
>
> proc writeindex {{selection} {filename}} {
> set fileId [open ./$filename w 0600]
> set sel [atomselect top $selection]
> puts $fileId "[$sel get index]"
> }
>
> My atom selection has about 2000 atoms, $sel get index returns all atom
> indexes but the output file is truncated. I suppose that the put
> command can't write long strings. Is there any workaround?
> Thanks!
> Rui Rodrigues
>
>
>
> --
> J. Rui Rodrigues
> Dep. de Quimica
> Fac. Ciências e Tecnologia da Univ. Coimbra
> Largo D. Dinis
> 3004-535 Coimbra
> Portugal

-- 
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