VMD-L Mailing List
From: John Stone (johns_at_ks.uiuc.edu)
Date: Mon Mar 13 2006 - 10:17:25 CST
- Next message: John Stone: "Re: Convert an ascii matrix to an image"
- Previous message: Dan White: "Re: OSX quad buffered stereo possible on older G5 with GeForce FX5200!"
- In reply to: andrea spitaleri: "Re: VMD script"
- Next in thread: Axel Kohlmeyer: "Re: VMD script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Andrea,
  On Unix systems you can use the "-e" command line flag of VMD to execute
scripts at startup (equivalent to using the "play" command inside VMD).   
This is described more fully in the User's Guide.
  John Stone
  vmd_at_ks.uiuc.edu
On Mon, Mar 13, 2006 at 11:19:55AM +0100, andrea spitaleri wrote:
> Hi Johns,
> the only way to run a own script is first to source it and then use it? 
> May vmd load it at start up the script without put it in the $vmddir/script?
> I couldn't find it any answer ......
> 
> Reagards,
> 
> andrea
> 
> 
> 
> John Stone wrote:
> 
> >Hi Lily,
> > Yes, there are various little scripts that can do things like this.
> >Take one of these and cut out the stuff you don't need, as all of these
> >probably do more than you're looking for.
> >
> >Here's one that loads a numerically named sequence of PDB files:
> > http://www.ks.uiuc.edu/Research/vmd/script_library/scripts/animatepdbs/
> >
> >Here's another that loads all of the PDB files in a particular
> >directory using filename globbing (wildcards), which I've used to 
> >load the entire PDB into VMD at once, for example:
> >
> >##
> >## Example:
> >##   load_all_pdb "/Scr/pdb/data/structures/all/pdb/*.Z"  32000
> >##
> >
> >proc load_all_pdb { pdbfilespec maxcount } {
> > puts "Gathering candidate files."
> > set filelist [glob -types f -- $pdbfilespec]
> > set numfiles [llength $filelist]
> > set count 0
> >
> > if { $numfiles > 0 } {
> >   puts "Searching $numfiles PDB files..."
> >   foreach {file} $filelist {
> >     incr count
> >     if {$count > $maxcount} {
> >       break;
> >     }
> >
> >#      puts "$count/$numfiles, loading $file ..."
> >
> >     # detect compressed PDB entry by filename, uncompress, and load
> >     if { [string match "*.ent.Z" $file] } {
> >       file delete /tmp/loadpdb.pdb
> >       exec zcat $file > /tmp/loadpdb.pdb
> >       mol new /tmp/loadpdb.pdb waitfor all
> >#        mol rename top $file
> >     } elseif { [string match "*.ent" $file] } {
> >       mol new $file type pdb waitfor all
> >     } elseif { [string match "*.pdb" $file] } {
> >       mol new $file waitfor all
> >     } else {
> >       # Skip unrecognized structure file formats and PDB files without 
> >       coords
> >       continue;
> >     }
> >   }
> >   puts "Completed loading $numfiles PDB files..."
> > } else {
> >   puts "No PDB files found"
> > }
> >}
> >
> >
> >
> >
> >On Fri, Mar 10, 2006 at 11:41:03AM -0800, lily jin wrote:
> > 
> >
> >>In the .VMD file, I have :
> >> mol addfile 1.pdb type pdb type pdb waitfor all
> >> mol addfile 2.pdb type pdb type pdb waitfor all
> >> mol addfile 3.pdb type pdb type pdb waitfor all
> >> mol addfile 4.pdb type pdb type pdb waitfor all
> >> mol addfile 5.pdb type pdb type pdb waitfor all
> >> mol addfile 6.pdb type pdb type pdb waitfor all
> >> mol addfile 7.pdb type pdb type pdb waitfor all
> >> mol addfile 8.pdb type pdb type pdb waitfor all
> >> mol addfile 9.pdb type pdb type pdb waitfor all
> >> mol addfile 10.pdb type pdb type pdb waitfor all
> >> Is there a way to do the same in a loop? Thanks!
> >> 
> >>
> >>Lily
> >>		
> >>---------------------------------
> >>Yahoo! Mail
> >>Bring photos to life! New PhotoMail  makes sharing a breeze. 
> >>   
> >>
> 
> -- 
> -------------------------------
> Andrea Spitaleri 
> Dulbecco Telethon Institute
> c/o DIBIT Scientific Institute
> Biomolecular NMR, 1B4
> Via Olgettina 58
> 20132 Milano (Italy)
> -------------------------------
-- 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: John Stone: "Re: Convert an ascii matrix to an image"
- Previous message: Dan White: "Re: OSX quad buffered stereo possible on older G5 with GeForce FX5200!"
- In reply to: andrea spitaleri: "Re: VMD script"
- Next in thread: Axel Kohlmeyer: "Re: VMD script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]



