Re: vmd-l: How to generate more segments?

From: John Stone (johns_at_ks.uiuc.edu)
Date: Tue Sep 09 2008 - 01:46:41 CDT

Hi,
  If you generate a massive number of segments, you'll run
out of field width in the PDB/PSF formats, so you need to use
something other than decimal numbering. A simple workaround that
will greatly increase the number of segments you can use is to
use both a shorter $segname prefix, and also to use hexadecimal
numbering, e.g.:
  set nstr [string toupper [format "%x" $segid]]
  set seg $segname$nstr

We're working on implementing new molecule file formats that will not
be subject to such annoyingly small field widths, but for the time
being this workaround should get you by.

Cheers,
  John Stone
  vmd_at_ks.uiuc.edu

On Tue, Sep 09, 2008 at 10:30:05AM +0400, mishacat_at_udm.ru wrote:
> Hi everyone!
> I need to generate a large quantity of the same molecules.
> I used this script:
>
> set segname A
> for {set segid 0} {$segid < 999} {incr segid} {
> set pdb $prefix.pdb
> set seg $segname$segid
> segment $seg {
> pdb $pdb
> }
> coordpdb $pdb $seg
> }
>
> but segid cannot be larger than 999. The question is: how to organize "for" cycle from "A" to "Z"?
> Any other approaches of generating large quantity of molecules are welcome.
>
> --
> Sincerely yours,
> Mikhail Suyetin
>
>
>
> --
> ????????-450 512????/??? ?? 450 ??????!!! ????? ?????? ? ???????!!!
> http://izhevsk.net/html/price.html

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

This archive was generated by hypermail 2.1.6 : Wed Feb 29 2012 - 15:49:49 CST