-- 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
Hi,
The Pseudo-atoms or CGOs will be spheres.
Thanks,
James
On 22 August 2013 14:50, James Rutley wrote:
> 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,
>
> James,
> UCL
>
<>---
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
#
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