From: John Stone (johns_at_ks.uiuc.edu)
Date: Fri Jul 08 2005 - 13:58:44 CDT

Hi,
  Can you be more specific about what you need help with?
Are you asking for information on how two write a loop in Tcl, or
are you asking about how to use atom selections inside of a loop,
or are you asking about how to write files in a loop? There are
various scripts in the VMD script library that loop over a sequence
of PDB files. Here's a very very simple one that just loads a
bunch of PDB files in a loop:
    http://www.ks.uiuc.edu/Research/vmd/script_library/scripts/animatepdbs/animatepdbs.tcl

If you change the loop to execute these in the inner body you should
be well on your way:
  mol new $filename
  ... do your occupancy processing here
  set newfilename [format "new.%s" filename]
  animate writepdb $newfilename
  mol delete all

Hope that helps.

  John Stone
  vmd_at_ks.uiuc.edu

On Fri, Jul 08, 2005 at 02:48:44PM -0400, Shahid Qamar wrote:
> Hi,
> I have bunch of PDB files of same molecule at different positions. I want
> change their occupancy.
> I know I can do it in VMD for one file but how I can do it for multiple
> file in a loop?
>
> If anybody has a 2 line script please let me know.
>
> Thanks
>

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