VMD-L Mailing List
From: andrea spitaleri (spitaleri.andrea_at_hsr.it)
Date: Mon Mar 13 2006 - 04:19:55 CST
- Next message: Nicolas Sapay: "Re: Convert an ascii matrix to an image"
- Previous message: Vlad Cojocaru: "Re: drawing a truncated octahedron"
- In reply to: John Stone: "Re: VMD script"
- Next in thread: John Stone: "Re: VMD script"
- Reply: John Stone: "Re: VMD script"
- Reply: Axel Kohlmeyer: "Re: VMD script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
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) -------------------------------
- Next message: Nicolas Sapay: "Re: Convert an ascii matrix to an image"
- Previous message: Vlad Cojocaru: "Re: drawing a truncated octahedron"
- In reply to: John Stone: "Re: VMD script"
- Next in thread: John Stone: "Re: VMD script"
- Reply: John Stone: "Re: VMD script"
- Reply: Axel Kohlmeyer: "Re: VMD script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]



