[chimera-dev] Get value of 'measure distance' command

Elaine Meng meng at cgl.ucsf.edu
Tue Mar 24 09:56:23 PDT 2015


Hi Thu,
If you know the correct Chimera command, then you could just use runCommand in python, as explained in this page:

<http://www.rbvi.ucsf.edu/chimera/docs/ProgrammersGuide/basicPrimer.html>

I don't know python, but as for the Chimera "distance" command, it requires exactly two atoms (not two sets of atoms), e.g.

distance :628.a at ca :20.b at ca

However, in our list of python scripts for Chimera, I see there is already a script to find the minimum distance between two sets of atoms!  You can get this script "atomdist.py" from:

<http://plato.cgl.ucsf.edu/trac/chimera/wiki/Scripts>

I hope this helps,
Elaine
----------
Elaine C. Meng, Ph.D. 
UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab
Department of Pharmaceutical Chemistry
University of California, San Francisco

On Mar 24, 2015, at 6:20 AM, Hoai Thu NGUYEN <hoaithu.nguyen.26.4.92 at gmail.com> wrote:

> Hi, 
> I need to calculate the minimum distance between 2 residues but It seems that I can't find the correct way to use the 'measure distance' command in python script. I tried:
> 
> import Measure
> 
> temp = Measure.measure_command('distance', 'distance :628.a :20.b')
> 
> but it gave me the error: "No target atoms or surface"
> 
> Can you please precise the correct syntax of this command?
> Thank you!
> Thu





More information about the Chimera-dev mailing list