Difference between revisions of "Measure Distance"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
<source lang="python"> | <source lang="python"> | ||
+ | # This script writes the distance from | ||
+ | # atom mol1///25/ha to atom mol1///26/ha | ||
+ | # out to the file "dist.txt" | ||
+ | # Simply change your selections to see different distances. | ||
from pymol import cmd | from pymol import cmd | ||
f=open('dist.txt','w') | f=open('dist.txt','w') | ||
Line 6: | Line 10: | ||
f.close() | f.close() | ||
</source> | </source> | ||
+ | |||
+ | == See Also == | ||
+ | [[Dist]] | ||
[[Category:Script_Library|Measure Distance]] | [[Category:Script_Library|Measure Distance]] |
Revision as of 03:03, 23 February 2007
# This script writes the distance from
# atom mol1///25/ha to atom mol1///26/ha
# out to the file "dist.txt"
# Simply change your selections to see different distances.
from pymol import cmd
f=open('dist.txt','w')
dst=cmd.distance('tmp','mol1///25/ha','mol1///26/ha')
f.write("%8.3f\n"%dst)
f.close()