* Jeremy Craven <c.j.craven@...> [2002-09-26 09:59] wrote:
> 2) Anyhow, (and assuming that I might want to do alignments my own way anyhow),
> I created a script which read in an alignment and created a big long pair_fit
> command of the form ....
> pair_fit (tbr and resi 187 and name ca),(bs and resi 170 and name ca), (tbr and
> resi 192 and name ca),(bs and resi 175 and name ca), .... etc
> The script then executed this string with cmd.do
I'll tackle the second question:
> A second little quesion is how do you send command line arguments to a pymol
> python script.
> If I say
> PyMOL> run test1.py abcdef
> it says
> Traceback (most recent call last):
> File "/usr/lib/python1.5/site-packages/pymol/modules/pymol/parser.py", line
> 186, in parse
> IOError: [Errno 2] No such file or directory
> whereas test1.py really does exist, and "run test1.py" works fine.
If you write test1.py to be a function definition, e.g.:
Then "run test1.py" will read the python script to create the
definition, but not actually run it. Then you can run it with:
where you've filled in the appropriate values for the arguments.
Hope that helps. Cheers,
Robert L. Campbell, Ph.D. http://biophysics.med.jhmi.edu/rlc
rlc@... phone: 410-614-6313
Research Specialist/X-ray Facility Manager
HHMI/Dept. of Biophysics & Biophysical Chem., The Johns Hopkins University
PGP Fingerprint: 9B49 3D3F A489 05DC B35C 8E33 F238 A8F5 F635 C0E2