Hi Alex,

  The “measure distance” code is the measure() function in

chimera/share/Measure/measure.py

It handles distances between atoms and also surfaces and can handle multiple distance calculations and prints the result but unfortunately does not return it as a Python value.   I’ve attached some Python code to find the minimum distance between two sets of atoms.

  Unfortunately the Chimera Python programming interface is not documented.  The programmer’s guide on the Chimera web side documentation page may be of some use, especially the examples, 

http://www.cgl.ucsf.edu/chimera/docs/ProgrammersGuide/index.html

and also the Chimera Python scripts on the Chimera developer web site can be of some use

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

Many of the simpler Chimera commands are in

chimera/share/Midas/__init__.py

To find others you can search all the Python under chimera/share for “addCommand(“ (for example on Linux or Mac shell command find . -type f -exec grep -nH -e "addCommand(" {} +) giving the attached file of command names and modules where the code is located.

  In our next generation Chimera we are making full reference documentation for Python programming.

Tom