From: Axel Kohlmeyer (akohlmey_at_cmm.chem.upenn.edu)
Date: Mon Jun 11 2007 - 11:22:01 CDT

On Sun, 10 Jun 2007, Cesar Millan wrote:

CM> Hi Axel, thanks for your response and sorry for not including more
CM> information about my problem. I have some pdbs that are the transition from
CM> state A to state B of a protein and I want to create a movie of the change
CM> on the potential map along the transition. The electrostatic map was done
CM> using apbs (command line program). I have a few pdbs called frame0.pdb to
CM> frame20.pdb and each one have a dx potential map frame0.dx to frame20.dx.
CM>
CM> I tried the untested option that you gave me, but the archives were loaded
CM> as on a terminal, I have to modify the script to load them sequentially and
CM> after I think that MultiMolAnim plugin could do the rest.

please note, that moviemaker and multimolanim are not (yet) compatible,
so if you want to show the animation with VMD you are fine,
otherwise you'll have to render the snapshots individually
(can be scripted, too) and then combine them to an animation
manually.

CM>
CM> What do you think? Is this the less painful way to do this?

hard to tell. that depends on which step of the procedure
is the most painful to you. :)

cheers,
   axel.

CM>
CM> thanks for your help.
CM>
CM> On 6/10/07, Axel Kohlmeyer <akohlmey_at_cmm.chem.upenn.edu> wrote:
CM> >
CM> > On Sat, 9 Jun 2007, Cesar Millan wrote:
CM> >
CM> > hi cesar,
CM> >
CM> > CM> Hi everyone! I would like to use the animatepdbs.tcl to load multiple
CM> > pdb
CM> > CM> files with their corresponding dx potential map at the same time. Does
CM> > any
CM> > CM> one knows how to do this?
CM> >
CM> > yes. i would expect that is quite a few people out here,
CM> > that know how to do this. however, with the information you
CM> > provide, it is very difficult to help you, since you didn't
CM> > tell us what you want to achieve.
CM> >
CM> > CM>
CM> > CM> I was trying at the following manner but I got some errors:
CM> >
CM> > please tell us, what _were_ the error messages.
CM> >
CM> > there are a number of subtleties involved here:
CM> >
CM> > - the use of 'mol load' is now deprecated, you should
CM> > use 'mol new', 'mol addfile' instead
CM> >
CM> > - from the perspective of VMD, coordinate frames and
CM> > volumetric data sets are not correlated (yet).
CM> >
CM> > so if you want to do an animation of your system with the
CM> > potential maps included (my guess), you have essentially
CM> > two options. load everything into one (VMD) molecule and
CM> > use a script like the one at:
CM> >
CM> > http://www.theochem.ruhr-uni-bochum.de/~axel.kohlmeyer/cpmd-vmd/part5.html#chap7_sect6
CM> >
CM> > or load every frame and density pair into a different molecule
CM> > and try out the (new) MultiMolAnim plugin
CM> > http://www.ks.uiuc.edu/Research/vmd/plugins/multimolanim/
CM> >
CM> > synchronize the visualization of all the molecules, you
CM> > could use the CloneReps plugin:
CM> > http://www.ks.uiuc.edu/Research/vmd/plugins/clonerep/
CM> >
CM> >
CM> > to load all files you can try something like this (untested):
CM> >
CM> > set pdblist [lsort [glob -type f "my*.pdb"]]
CM> > set dxlist [lsort [glob -type f "my*.dx"]]
CM> >
CM> > mol new [lindex $pdblist 0] type pdb waitfor all
CM> > mol addfile [lindex $dxlist 0] type dx waitfor all
CM> >
CM> > for {set i 1} {$i <= [llength $pdblist]} {incr i} {
CM> >
CM> > mol new [lindex $pdblist $i] type pdb waitfor all
CM> > mol addfile [lindex $dxlist $i] type dx waitfor all
CM> >
CM> > }
CM> >
CM> > in case you want to load everything into one (VMD) molecule,
CM> > you can replace the second 'mol new' with 'mol addfile'.
CM> > for more details, please check out the scripting section
CM> > of the VMD user's guide and/or a good text book or (online)
CM> > reference on TCL.
CM> >
CM> > please let us know, if this works and/or if you need more help.
CM> >
CM> > cheers,
CM> > axel.
CM> >
CM> > CM> proc animatepdbs {start end fileformat fileformat2} {
CM> > CM> set filename [format $fileformat [expr $start]]
CM> > CM> set filedx [format $fileformat2 [expr $start]]
CM> > CM> incr start
CM> > CM> puts "Reading initial frame in PDB sequence $filename"
CM> > CM> mol load pdb $filename -dx $filedx
CM> > CM>
CM> > CM> puts "Reading PDB files as an animation..."
CM> > CM> for {set i $start} {$i <= $end} {incr i 1} {
CM> > CM> set filename [format $fileformat [expr $i]]
CM> > CM> set filedx [format $fileformat2 [expr $start]]
CM> > CM> animate read pdb $filename -dx $filedx
CM> > CM> }
CM> > CM> }
CM> > CM>
CM> > CM> thank you for any help.
CM> > CM>
CM> > CM>
CM> >
CM> > --
CM> > =======================================================================
CM> > Axel Kohlmeyer akohlmey_at_cmm.chem.upenn.edu http://www.cmm.upenn.edu
CM> > Center for Molecular Modeling -- University of Pennsylvania
CM> > Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
CM> > tel: 1-215-898-1582, fax: 1-215-573-6233, office-tel: 1-215-898-5425
CM> > =======================================================================
CM> > If you make something idiot-proof, the universe creates a better idiot.
CM> >
CM> >
CM>
CM>
CM>

-- 
=======================================================================
Axel Kohlmeyer   akohlmey_at_cmm.chem.upenn.edu   http://www.cmm.upenn.edu
   Center for Molecular Modeling   --   University of Pennsylvania
Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
tel: 1-215-898-1582,  fax: 1-215-573-6233,  office-tel: 1-215-898-5425
=======================================================================
If you make something idiot-proof, the universe creates a better idiot.