From: Nat <nat...@ya...> - 2002-02-17 06:21:46
|
From an earlier reply... > The easiest way to use PyMOL as a module is to use PyMOL as your Python > interpreter. It isn't trivial to launch PyMOL from within a running > Python interpreter, but it can be done under unix (only). See pymol.com > and modules/launch_pymol.py for an example of how to do it. Got this working. Now, I'm trying to create movie frames from the command line; I've got two systems I've tried this on, one SuSE 7.something (compiled manually), the other RedHat 7.2 (rpms). I'm wondering whether this is even possible. I've modified pymol.com to launch my script instead; what it does is this: ---------------------------------------- import thread import threading import os import sys import time import glob modules_path = os.environ['PYMOL_PATH']+'/modules' if modules_path not in sys.path: sys.path.append(modules_path) import pymol from pymol import cmd, util pymol.invocation.parse_args(sys.argv) mid = "635272-10321" method = 1 frames = 10 os.chdir("/bh1/nat/movie/" + mid) print "Set..." cmd.set("auto_zoom", 0) ---------------------------------------- ... and there's more, except it segfaults as soon as it hits cmd.set(). Same thing happens when I try using it from the command line. Obviously since I can get as far as pymol.invocation I'm doing something right, but I can't actually use the cmd module. What am I missing? I'm not even sure I need the "pymol.invocation..." part, but I know I can't call start_pymol(). Am I missing something, or simply misunderstanding PyMOL's capabilities? It's the perfect tool for what I'm trying to accomplish (lots of high-quality movies), but I need something non-graphical/non-interactive. Everything else I've tried has been less flexible and more obscure in varying degrees. thanks, Nat |