<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.pymol.org/index.php?action=history&amp;feed=atom&amp;title=Measure_Distance</id>
	<title>Measure Distance - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.pymol.org/index.php?action=history&amp;feed=atom&amp;title=Measure_Distance"/>
	<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Measure_Distance&amp;action=history"/>
	<updated>2026-06-19T22:10:51Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>https://wiki.pymol.org/index.php?title=Measure_Distance&amp;diff=7863&amp;oldid=prev</id>
		<title>Pyadmin: 1 revision</title>
		<link rel="alternate" type="text/html" href="https://wiki.pymol.org/index.php?title=Measure_Distance&amp;diff=7863&amp;oldid=prev"/>
		<updated>2014-03-28T02:16:19Z</updated>

		<summary type="html">&lt;p&gt;1 revision&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
# This script writes the distance from &lt;br /&gt;
# atom mol1///25/ha to atom mol1///26/ha&lt;br /&gt;
# out to the file &amp;quot;dist.txt&amp;quot;&lt;br /&gt;
# Simply change your selections to see different distances.&lt;br /&gt;
&lt;br /&gt;
# import PyMOL's command namespace&lt;br /&gt;
from pymol import cmd&lt;br /&gt;
&lt;br /&gt;
# open dist.txt for writing&lt;br /&gt;
f=open('dist.txt','w')&lt;br /&gt;
&lt;br /&gt;
# calculate the distance and store it in dst&lt;br /&gt;
dst=cmd.distance('tmp','mol1///25/ha','mol1///26/ha')&lt;br /&gt;
&lt;br /&gt;
# write the formatted value of the distance (dst)&lt;br /&gt;
# to the output file&lt;br /&gt;
f.write(&amp;quot;%8.3f\n&amp;quot;%dst)&lt;br /&gt;
&lt;br /&gt;
# close the output file.&lt;br /&gt;
f.close()&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
[[Distance]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Script_Library|Measure Distance]]&lt;br /&gt;
[[Category:Structural_Biology_Scripts]]&lt;/div&gt;</summary>
		<author><name>Pyadmin</name></author>
	</entry>
</feed>