VMD-L Mailing List
From: Axel Kohlmeyer (akohlmey_at_cmm.chem.upenn.edu)
Date: Mon Jul 21 2008 - 14:09:46 CDT
- Next message: Axel Kohlmeyer: "Re: Creating a VMD movie from a Tcl script"
- Previous message: Samir Unni: "Re: Creating a VMD movie from a Tcl script"
- In reply to: Samir Unni: "Re: Creating a VMD movie from a Tcl script"
- Next in thread: Axel Kohlmeyer: "Re: Creating a VMD movie from a Tcl script"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
On Mon, 21 Jul 2008, Samir Unni wrote:
SU> Hi,
SU>
SU> Does that mean there is a command that I can use in the state file to
SU> manually require the vmdmovie package so it can be used without X, at least
SU> until the support for rendering without a GUI is improved? Do you know the
SU> syntax for including such a command in the state file?
the state file uses basic tcl syntax (so pick up a book on tcl or check
out the on-line tutorial(s) on www.tcl.tk) and the tcl command to load
a plugin is "require". check out the discussions here on, e.g., psfgen
scripting.
the vmd movie maker plugin "provides" a 'vmdmovie' package (cf. tcl
syntax). so to try it out, you can just add a
package require vmdmovie
and then the corresponding commands should be available even
without using a display.
cheers,
axel.
SU>
SU> Thanks,
SU>
SU> Samir
SU>
SU>
SU> On Mon, Jul 21, 2008 at 12:01 PM, Axel Kohlmeyer <
SU> akohlmey_at_cmm.chem.upenn.edu> wrote:
SU>
SU> > On Mon, 21 Jul 2008, Samir Unni wrote:
SU> >
SU> > SU> Hi,
SU> > SU>
SU> > SU> Yes, that fixed the problem! Is the state variable that's missing one
SU> > of the
SU> > SU> two (or both) that I initialized in my modified version of
SU> > vmdmovie.tcl?
SU> > SU>
SU> > SU> Also, even if this problem is fixed, it seems that the 'makemovie'
SU> > method
SU> > SU> cannot be used unless a GUI is running (i.e. starting vmd with
SU> > '-dispdev
SU> > SU> none' or '-dispdev text' won't work). That isn't an option in my case,
SU> > since
SU> > SU> I will be using the state files I'm creating with instances of VMD that
SU> > are
SU> > SU> on servers where X is not present. Is there a scriptable workaround for
SU> > this
SU> > SU> issue as well?
SU> >
SU> > if you are running without a display you have to
SU> > "require" all packages you want to use.
SU> > all packages with a GUI (and the ones those depends on)
SU> > have to be "required" by VMD during startup to be able
SU> > to register their GUI. if john finds a way to set up the
SU> > initialization properly, then it should work as well
SU> > on machines without display, provided you use a renderer
SU> > different from "snapshot", that is.
SU> >
SU> > cheers,
SU> > axel.
SU> >
SU> >
SU> > SU>
SU> > SU> Thanks,
SU> > SU>
SU> > SU> Samir
SU> > SU>
SU> > SU>
SU> > SU> On Mon, Jul 21, 2008 at 10:31 AM, John Stone <johns_at_ks.uiuc.edu>
SU> > wrote:
SU> > SU>
SU> > SU> > I think I've reproduced the problem you encountered, try doing this
SU> > SU> > and see if you get different behavior:
SU> > SU> >
SU> > SU> > Run the command line script as before, and verify that you get
SU> > SU> > the 1 frame movie, as before.
SU> > SU> >
SU> > SU> > Then, after having done this, try opening the GUI for the movie
SU> > SU> > maker, through the Extensions->Visualization->Movie Maker menu.
SU> > SU> > Once the window is opened, try running the script at the command
SU> > SU> > line again. Let me know if it works correctly for you the second
SU> > SU> > time. I believe that the issue here is an internal state variable
SU> > SU> > that's only being properly initialized when the GUI has been opened.
SU> > SU> > It will be easy to workaround/fix with one or two extra lines of
SU> > SU> > scripting if that's all that's causing your problem.
SU> > SU> >
SU> > SU> > Cheers,
SU> > SU> > John Stone
SU> > SU> > vmd_at_ks.uiuc.edu
SU> > SU> >
SU> > SU> >
SU> > SU> > On Mon, Jul 21, 2008 at 07:57:59AM -0500, Samir Unni wrote:
SU> > SU> > > Hi,
SU> > SU> > >
SU> > SU> > > Sorry I'm so late in getting back to you. Anyway, that code doesn't
SU> > work
SU> > SU> > on
SU> > SU> > > the Mac either. It just briefly opens the video (for one frame, I
SU> > think)
SU> > SU> > and
SU> > SU> > > then closes. I'm using the 1.8.6 version of VMD?is that the one
SU> > you're
SU> > SU> > > using?
SU> > SU> > >
SU> > SU> > > Thanks,
SU> > SU> > >
SU> > SU> > > Samir
SU> > SU> > >
SU> > SU> > >
SU> > SU> > > On Thu, Jul 17, 2008 at 10:19 PM, Samir Unni <srunni_at_gmail.com>
SU> > wrote:
SU> > SU> > >
SU> > SU> > > > Hi,
SU> > SU> > > >
SU> > SU> > > > I tried that, but it didn't work for me. When I attempted to play
SU> > the
SU> > SU> > video
SU> > SU> > > > file with MPlayer, the window appeared for a second and then
SU> > SU> > disappeared,
SU> > SU> > > > just like before. I think only one frame is being recorded.
SU> > SU> > > >
SU> > SU> > > > Right now I'm trying this on my Linux machine at home, but I'll
SU> > try it
SU> > SU> > > > again on the Mac at work tomorrow morning and see if it works
SU> > there.
SU> > SU> > > > However, this was the exact same problem I was previously having
SU> > on the
SU> > SU> > Mac,
SU> > SU> > > > so I don't think it will. If it's working for you, it might have
SU> > SU> > something
SU> > SU> > > > to do with the state file I'm using, which I created by importing
SU> > the
SU> > SU> > DX
SU> > SU> > > > output file from APBS into VMD.
SU> > SU> > > >
SU> > SU> > > > I had meant to attached the modified version of vmdmovie.tcl to
SU> > the
SU> > SU> > last
SU> > SU> > > > email; it's attached now, if you want to take a look.
SU> > SU> > > >
SU> > SU> > > > Thanks,
SU> > SU> > > >
SU> > SU> > > > Samir
SU> > SU> > > >
SU> > SU> > > >
SU> > SU> > > >
SU> > SU> > > > On Thu, Jul 17, 2008 at 9:56 PM, John Stone <johns_at_ks.uiuc.edu>
SU> > wrote:
SU> > SU> > > >
SU> > SU> > > >>
SU> > SU> > > >> Hi,
SU> > SU> > > >> I'm not sure how you changed your copy of the vmdmovie.tcl
SU> > file,
SU> > SU> > > >> but I'd ask that before we delve any further, that you first try
SU> > the
SU> > SU> > > >> original vmdmovie plugin and the command I emailed earlier. If
SU> > that
SU> > SU> > > >> works for you, then we can proceed with debugging whatever has
SU> > been
SU> > SU> > > >> changed in your modified version. Starting with your modified
SU> > version
SU> > SU> > > >> is likely to add more confusion so I'd rather leave that for a
SU> > second
SU> > SU> > > >> step. Please try the example sequence I sent earlier and let me
SU> > know
SU> > SU> > > >> if that works with the unmodified script on your system, or not.
SU> > SU> > > >>
SU> > SU> > > >> Cheers,
SU> > SU> > > >> John Stone
SU> > SU> > > >> vmd_at_ks.uiuc.edu
SU> > SU> > > >>
SU> > SU> > > >> On Thu, Jul 17, 2008 at 09:18:24PM -0500, Samir Unni wrote:
SU> > SU> > > >> > Hi,
SU> > SU> > > >> >
SU> > SU> > > >> > That character resulted from an issue with the email
SU> > formatting; it
SU> > SU> > was
SU> > SU> > > >> not
SU> > SU> > > >> > actually part of the command that I used. The command I used
SU> > was:
SU> > SU> > > >> >
SU> > SU> > > >> > ::MovieMaker::makemovie /Users/srunni/dev/vmd_tests/1fas 1fas
SU> > SU> > ppmtompeg
SU> > SU> > > >> > snapshot 10
SU> > SU> > > >> >
SU> > SU> > > >> > Also, I sent an update a few hours after my initial email, but
SU> > it
SU> > SU> > seems
SU> > SU> > > >> not
SU> > SU> > > >> > to have made it onto the mailing list. I will repost it here:
SU> > SU> > > >> >
SU> > SU> > > >> > --------------------
SU> > SU> > > >> > I've got a small update. I slightly changed vmdmovie.tcl, so
SU> > that
SU> > SU> > the
SU> > SU> > > >> > framerate can be passed to the 'makemovie' method. When I did
SU> > this,
SU> > SU> > > >> defined
SU> > SU> > > >> > 'framerate' as the extra variable being passed now, and
SU> > defined
SU> > SU> > > >> 'numframes'
SU> > SU> > > >> > as the product of the framerate and the duration, a working
SU> > movie
SU> > SU> > was
SU> > SU> > > >> > created. Though it would seem that only 2 of these 3 variables
SU> > need
SU> > SU> > to
SU> > SU> > > >> be
SU> > SU> > > >> > defined for the program to be able to determine the 3rd, when
SU> > I
SU> > SU> > > >> eliminated
SU> > SU> > > >> > any one of them, the movie was not generated correctly. I have
SU> > SU> > attached
SU> > SU> > > >> the
SU> > SU> > > >> > working version of vmdmovie.tcl, if anyone wants to look at
SU> > it.
SU> > SU> > > >> >
SU> > SU> > > >> > I would still like to know if there is a way to generate a
SU> > movie
SU> > SU> > from
SU> > SU> > > >> the
SU> > SU> > > >> > command line without modifying any files that are a part of
SU> > VMD, if
SU> > SU> > > >> > possible.
SU> > SU> > > >> > --------------------
SU> > SU> > > >> >
SU> > SU> > > >> > I still have not found a workaround for this issue. The
SU> > command I am
SU> > SU> > > >> using
SU> > SU> > > >> > now is:
SU> > SU> > > >> >
SU> > SU> > > >> > ::MovieMaker::makemovie /Users/srunni/dev/vmd_tests/1fas 1fas
SU> > SU> > ppmtompeg
SU> > SU> > > >> > tachyon 5 40
SU> > SU> > > >> >
SU> > SU> > > >> > Thanks,
SU> > SU> > > >> >
SU> > SU> > > >> > Samir Unni
SU> > SU> > > >> >
SU> > SU> > > >> >
SU> > SU> > > >> > On Thu, Jul 17, 2008 at 5:02 PM, John Stone <
SU> > johns_at_ks.uiuc.edu>
SU> > SU> > wrote:
SU> > SU> > > >> >
SU> > SU> > > >> > >
SU> > SU> > > >> > > Hi,
SU> > SU> > > >> > > The ">" character you have in your example below shouldn't
SU> > be
SU> > SU> > there,
SU> > SU> > > >> > > that would cause some trouble for sure.
SU> > SU> > > >> > >
SU> > SU> > > >> > > Here's a proper example command sequence to make a movie
SU> > from text
SU> > SU> > > >> mode:
SU> > SU> > > >> > > package require vmdmovie
SU> > SU> > > >> > > mkdir /tmp/mytmpdir
SU> > SU> > > >> > > ::MovieMaker::makemovie /tmp/mytmpdir example ppmtompeg
SU> > snapshot
SU> > SU> > 10
SU> > SU> > > >> > >
SU> > SU> > > >> > > This worked fine for me.
SU> > SU> > > >> > >
SU> > SU> > > >> > > Try that and let me know how it goes.
SU> > SU> > > >> > >
SU> > SU> > > >> > > Cheers,
SU> > SU> > > >> > > John Stone
SU> > SU> > > >> > > vmd_at_ks.uiuc.edu
SU> > SU> > > >> > >
SU> > SU> > > >> > > On Wed, Jul 16, 2008 at 09:32:37AM -0500, Samir Unni wrote:
SU> > SU> > > >> > > > Hi,
SU> > SU> > > >> > > >
SU> > SU> > > >> > > > I'm trying to create a Tcl script that will use output
SU> > from APBS
SU> > SU> > to
SU> > SU> > > >> > > create a
SU> > SU> > > >> > > > video file, with no user interaction. So far, I have
SU> > managed to
SU> > SU> > > >> manually
SU> > SU> > > >> > > > create a state file, to which I can then add a few lines
SU> > of code
SU> > SU> > for
SU> > SU> > > >> the
SU> > SU> > > >> > > > Movie Plugin, to automatically generate the video file and
SU> > then
SU> > SU> > exit
SU> > SU> > > >> VMD.
SU> > SU> > > >> > > > However, I can't seem to get VMD to properly generate the
SU> > video
SU> > SU> > file
SU> > SU> > > >> when
SU> > SU> > > >> > > I
SU> > SU> > > >> > > > use the script. It creates a file, but it doesn't seem to
SU> > SU> > contain
SU> > SU> > > >> any
SU> > SU> > > >> > > actual
SU> > SU> > > >> > > > data (it's only about 20 KB), and doesn't play correctly
SU> > when I
SU> > SU> > open
SU> > SU> > > >> it
SU> > SU> > > >> > > with
SU> > SU> > > >> > > > MPlayer. This is the line of code that seems to be the
SU> > problem:
SU> > SU> > > >> > > >
SU> > SU> > > >> > > > ::MovieMaker::makemovie /Users/srunni/dev/vmd_tests/1fas
SU> > 1fas
SU> > SU> > > >> ppmtompeg
SU> > SU> > > >> > > > > snapshot 10
SU> > SU> > > >> > > >
SU> > SU> > > >> > > >
SU> > SU> > > >> > > > When I load this exact same state file, but with that line
SU> > SU> > removed,
SU> > SU> > > >> and
SU> > SU> > > >> > > > manually use the Movie Plugin, there are no problems. I
SU> > figured
SU> > SU> > out
SU> > SU> > > >> the
SU> > SU> > > >> > > > syntax for the above code by taking a look at
SU> > vmdmovie.tcl, and
SU> > SU> > > >> imitating
SU> > SU> > > >> > > > the calls made when the Movie Plugin is launched from the
SU> > GUI.
SU> > SU> > As
SU> > SU> > > >> far as
SU> > SU> > > >> > > I
SU> > SU> > > >> > > > can tell, I have made no mistakes in the syntax. Does
SU> > anyone
SU> > SU> > know
SU> > SU> > > >> why
SU> > SU> > > >> > > this
SU> > SU> > > >> > > > isn't working correctly?
SU> > SU> > > >> > > >
SU> > SU> > > >> > > > Thanks,
SU> > SU> > > >> > > >
SU> > SU> > > >> > > > Samir Unni
SU> > SU> > > >> > >
SU> > SU> > > >> > > --
SU> > SU> > > >> > > NIH Resource for Macromolecular Modeling and Bioinformatics
SU> > SU> > > >> > > Beckman Institute for Advanced Science and Technology
SU> > SU> > > >> > > University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
SU> > SU> > > >> > > Email: johns_at_ks.uiuc.edu Phone:
SU> > 217-244-3349
SU> > SU> > > >> > > WWW: http://www.ks.uiuc.edu/~johns/
SU> > <http://www.ks.uiuc.edu/%7Ejohns/>
SU> > SU> > <http://www.ks.uiuc.edu/%7Ejohns/><
SU> > SU> > > >> http://www.ks.uiuc.edu/%7Ejohns/>
SU> > SU> > > >> > > Fax: 217-244-6078
SU> > SU> > > >> > >
SU> > SU> > > >>
SU> > SU> > > >> --
SU> > SU> > > >> NIH Resource for Macromolecular Modeling and Bioinformatics
SU> > SU> > > >> Beckman Institute for Advanced Science and Technology
SU> > SU> > > >> University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
SU> > SU> > > >> Email: johns_at_ks.uiuc.edu Phone: 217-244-3349
SU> > SU> > > >> WWW: http://www.ks.uiuc.edu/~johns/
SU> > <http://www.ks.uiuc.edu/%7Ejohns/><
SU> > SU> > http://www.ks.uiuc.edu/%7Ejohns/>
SU> > SU> > > >> Fax: 217-244-6078
SU> > SU> > > >>
SU> > SU> > > >
SU> > SU> > > >
SU> > SU> >
SU> > SU> > --
SU> > SU> > NIH Resource for Macromolecular Modeling and Bioinformatics
SU> > SU> > Beckman Institute for Advanced Science and Technology
SU> > SU> > University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
SU> > SU> > Email: johns_at_ks.uiuc.edu Phone: 217-244-3349
SU> > SU> > WWW: http://www.ks.uiuc.edu/~johns/
SU> > http://www.ks.uiuc.edu/%7Ejohns/>
SU> > SU> > Fax: 217-244-6078
SU> > SU> >
SU> > SU>
SU> >
SU> > --
SU> > =======================================================================
SU> > Axel Kohlmeyer akohlmey_at_cmm.chem.upenn.edu http://www.cmm.upenn.edu
SU> > Center for Molecular Modeling -- University of Pennsylvania
SU> > Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
SU> > tel: 1-215-898-1582, fax: 1-215-573-6233, office-tel: 1-215-898-5425
SU> > =======================================================================
SU> > If you make something idiot-proof, the universe creates a better idiot.
SU> >
SU>
--
=======================================================================
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.