[chimera-dev] Get value of 'measure distance' command
Tom Goddard
goddard at sonic.net
Tue Mar 24 10:02:34 PDT 2015
Your Python code works for me. (I tried “open 1a0m”, then Measure.measure_command(‘distance’, 'distance :10.A :10.B’)). So I guess your residue specifiers :628.a or :20.b really don’t refer to any atoms. But the command does not return the distance value so this won’t help you get the value and it is probably easiest to use the atomdist.py script that Elaine mentioned.
Tom
> On Mar 24, 2015, at 9:56 AM, Elaine Meng <meng at cgl.ucsf.edu> wrote:
>
> 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
>
>
> _______________________________________________
> Chimera-dev mailing list
> Chimera-dev at cgl.ucsf.edu
> http://www.rbvi.ucsf.edu/mailman/listinfo/chimera-dev
>
More information about the Chimera-dev
mailing list