* Jeffrey N. Agar <agar@...> [2005-01-18 14:07] wrote:
> also, typing the following example from the users manual gives invalid
> syntax with an arrow pointing to the m in file_list =glob("mov*.pdb"):
> 2) The following is a Python program (with a .py or .pym extension)
> which uses a Python loop to load a large number of numbered PDB files,
> and then configures PyMOL to show them both forwards and backwards.
> from glob import glob
> from pymol import cmd
> file_list = glob("mov*.pdb"):
There should be no colon at the end of this line. I don't know if that's
what you actually typed or not.
> for file in file_list
> cmd.mset("1 -%d -2"%len(file_list))
> I obviously have no idea how to program. Sorry about that. I need canned
> commands to succeed.
I have four different loading scripts on my pymol scripts page that you
can take and modify if you wish. I "run" them at pymol startup (by
adding a line to my .pymolrc file), so that I can always type something
load_models *.pdb, objname
within PyMOL. One script loads everything into a single object, one generates
individual objects, the third loads everything into a single object, but
with the discrete flag set to 1, and the fourth loads the PDB files
output by modeller, but in order from best to worst value for the
Except for load_best.py, the models are loaded in alphabetical order, so
if you have files named:
then ff10 through ff19 would be loaded before ff2.pdb. It helps to
rename the ff0.pdb through ff9.pdb as ff00.pdb ... ff09.pdb.
Hope this helps,
Robert L. Campbell, Ph.D. <rlc1@...>
Senior Research Associate phone: 613-533-6821
Dept. of Biochemistry, Queen's University, fax: 613-533-2497
Kingston, ON K7L 3N6 Canada http://adelie.biochem.queensu.ca/~rlc
PGP Fingerprint: 9B49 3D3F A489 05DC B35C 8E33 F238 A8F5 F635 C0E2