VMD-L Mailing List
From: John Stone (johns_at_ks.uiuc.edu)
Date: Wed Sep 13 2006 - 16:27:34 CDT
- Next message: Axel Kohlmeyer: "Re: puts format"
- Previous message: Alexandr Isayev: "Re: puts format"
- In reply to: lily jin: "puts format"
- Next in thread: Jerome Henin: "Re: puts format"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
A simple way of flattening out one level of list is to use the "join"
command, e.g.:
puts $file1 [join [$sel get {index segid resid resname}]]
If you have multiple levels of lists to flatten you could join them
multiple times, e.g.:
puts $file1 [join [join [join [some big command]]]]
John Stone
vmd_at_ks.uiuc.edu
On Wed, Sep 13, 2006 at 01:22:27PM -0700, lily jin wrote:
> when I write:
> puts $file1 [$sel get {index segid resid resname}]
>
> I get the output like:
> {45973 110 ASP} {48542 272 LEU}
> {48542 272 LEU}
>
> How can I let it be like:
> 45973 110 ASP 48542 272 LEU
> 48542 272 LEU
>
> I don't want to see the { } in the output file. Thanks!
>
>
>
> Lily
>
> ---------------------------------
> Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1ยข/min.
-- 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: Axel Kohlmeyer: "Re: puts format"
- Previous message: Alexandr Isayev: "Re: puts format"
- In reply to: lily jin: "puts format"
- Next in thread: Jerome Henin: "Re: puts format"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]