[Chimera-users] Measuring the distance between residues and a surface
Stanley, Julian A
Julian_Stanley at hms.harvard.edu
Thu Jul 25 11:23:44 PDT 2019
Hello! I'm fairly new to Chimera, so if you're able to point me towards any resources that can help me answer questions like this one independently in the future, please do!
Here's the question:
I would like to measure the distance between the ends arginine and lysine residues and a surface, using Chimera's python modules.
Typically, I would load my .pdb file, generate a surface, and then use the "measure distance" command and parse the output from the Reply Log.
This approach works fine, except since "measure distance" prints to the reply log, I need to run my script in GUI mode. If possible, I'd prefer to run everything from the command line only. I thought that I might be able to do this with the distance() command, but I can't figure out how to pass a surface to that command. Does anyone have any tips/advice?
In summary, what I usually do:
from chimera import runCommand as rc
# load the file
rc("open " + pdbFile)
# Generate a surface
rc("surface allComponents false")
# Measure distance between arg and lys and the surface
rc("measure distance :arg at cd|:lys at ce selection multiple true show true")
And then I parse out the distances from the Reply Log.
What I would prefer to do:
It would be better to have the output to go to STDOUT when I run the script.
I imagine that I'd use something like the `distance()` command, of the premade scripts (like here: http://plato.cgl.ucsf.edu/trac/chimera/attachment/wiki/Scripts/atomdist.py) but they are designed to measure the distance between atoms or residues, not between residues and a surface.
Thanks for your help!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Chimera-users