Re: [PyMOL] Fwd: Script writing

2013-08-23 Thread Thomas Holder
Hi James, > select resn LYS and n. CA > dist (sele), (sele) > > Aside: this doesn't work for me as `dist sele, sele`. Anyone know why? > Is that a bug or a feature? It's a feature. Both the "select" and the "distance" command actually take as first argument the name of the object which they will

Re: [PyMOL] Fwd: Script writing

2013-08-22 Thread Spencer Bliven
James, If the CA position is acceptable as the residue coordinate (as assumed in Jason's answer), then you don't need to bother with pseudoatoms. Here's the easiest way to display all the distances for a figure: select resn LYS and n. CA dist (sele), (sele) Aside: this doesn't work for me as `di

Re: [PyMOL] Fwd: Script writing

2013-08-22 Thread Jason Vertrees
Hi James, It could look something like this: # for_rutley.py # fetch a protein cmd.fetch("1rx1", async=0) # make a blank list l=[] # iterate over all lysine's alpha carbons cmd.iterate_state(1, "n. CA and resn lys", "l.append((x,y,z))") # set a counter to 0 for controlling unique names p=0 #

[PyMOL] Fwd: Script writing

2013-08-22 Thread James Rutley
-- Forwarded message -- From: James Rutley Date: 22 August 2013 14:50 Subject: Script writing To: pymol-users@lists.sourceforge.net Hi, I am new to Pymol and programming. What's the best way to approach creating a script that does the following: [image: Inline images 3] Thanks