[chimera-dev] distance measurements
Eric Pettersen
pett at cgl.ucsf.edu
Wed Aug 19 11:17:35 PDT 2015
Hi Feixia,
You could certainly use Chimera to do that. You need to know some Python. Take a look at the Programmer’s Guide:
http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/index.html <http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/index.html>
In particular, the “basic primer” discusses how to loop over files in a directory and do things to them one by one.
Here’s some example code for printing the lysine CA-CA distances for a single open file. You could take that and move it into the loop described in the basic primer — customizing it as you wish…
from chimera import openModels, Molecule
# opening NMR files can produce multiple models, so use a loop...
for mol in openModels.list(modelTypes=[Molecule]):
lysCas = [a for a in mol.atoms if a.name == “CA” and a.residue.type == “LYS”]
for i, ca1 in enumerate(lysCas):
for ca2 in lysCas[i+1:]:
print mol.name, ca1, ca2, ca1.coord().distance(ca2.coord())
—Eric
Eric Pettersen
UCSF Computer Graphics Lab
> On Aug 18, 2015, at 8:36 AM, Feixia <feixia.chu at unh.edu> wrote:
>
> Hi there,
>
> I am interested in retrieving distance information from large dataset in an automatic fashion. For instance, can we use Chimera to get the distances between lysine alpha-carbons of current PDB entries. Presumably, we can download all PDB structures on our local desktop, and just call functions one structure at a time. I wonder if we can do that with Chimera. Your advice will be highly appreciated.
>
> Best,
> Feixia
>
> --
>
> Feixia Chu, Ph.D.
> Associate Professor
> Molecular, Cellular & Biomedical Sciences
> University of New Hampshire
> Gregg Hall, Rm436
> 35 Colovos Rd
> Durham, NH 03824
> Tel 603 862 2436
> _______________________________________________
> Chimera-dev mailing list
> Chimera-dev at cgl.ucsf.edu
> http://www.rbvi.ucsf.edu/mailman/listinfo/chimera-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-dev/attachments/20150819/d30f4edb/attachment.html>
More information about the Chimera-dev
mailing list