Getting measure distance value

Hi, I'm struggling with getting a value from runCommand in Chimera. I need to measure distance between an atom and a density map and keep it in a variable, so I'm trying to get a value from "measure distance" command in Python, but unfortunately with no results. Is there any way to somehow get it into a variable? Yours sincerely, Alicja

Hi Alicja, runCommand() invokes typed user commands and does not return values and unfortunately the measure distance code in chimera/share/Measure/measure.py (the distance() and report_distance() functions) are not well written for calling directly from Python. Your best approach would be to copy the distance() and report_distance() functions from measure.py and modify them to actually return the distance values you want. Tom
On Aug 22, 2018, at 7:40 AM, al.kupczyk <al.kupczyk@tlen.pl> wrote:
Hi, I'm struggling with getting a value from runCommand in Chimera. I need to measure distance between an atom and a density map and keep it in a variable, so I'm trying to get a value from "measure distance" command in Python, but unfortunately with no results. Is there any way to somehow get it into a variable? Yours sincerely, Alicja _______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
participants (2)
-
al.kupczyk
-
Tom Goddard