Hello,
I'm writing a script in Python to be executed in PyMOL. Unfortunately I got
stuck right at the beginning, when I'm trying to load .pdb's from
converged.nam file. The relevant bit of the script is the following:
from pymol.cgo import *
from pymol import cmd
Hi Mateusz,
The first guess would be that you're not in the right directory, since
Pymol can't find the file. That seems a bit awkward, as I guess
they're in the same directory as converged.nam, or aren't they? To
see what is in the directory, you can call cmd.ls() at the start of
the script. For
Hi Matt,
Well, then you're in for some nasty debugging. That will probably end
with you slapping yourself against the head, as I've done plenty ofc
times on such occasions. I tried the same things using the same sort
of code you posted, and it worked for me. Of course, I'd rather do
something
Mateusz,
Sounds like when you startup PyMOL you're not in the same directory as
the files you want to load.
Try something like, the following. Just change the variables pdbDir
to be the path to the directory where your PDBs are. This script
prints out the directory in which PyMOL is operating.
Tsjerk,
I substituted the .strip() method into my version instead of the [:-1] which
was originally meant to discard tailing \n in the entries in converge.nam.
This seemingly identical approach worked! Guess I had more whitespace than I
thought? Oh well...
Thank you very much!
Matt
On Tue, Nov