<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Get the position&#x2F;index of an atom in the document view]]></title><description><![CDATA[<p dir="auto">Hello OneAngstrom :-),</p>
<p dir="auto">I have an app, where I would like to return an index or something that would identify a given atom of the document view. Since I don't know the names of the atoms in advances, I was thinking I can use the index the atom has when I search in:</p>
<pre><code>SAMSON::getActiveDocument()-&gt;getNodes(nodeIndexer, SBNode::IsType(SBNode::Atom)); 
</code></pre>
<p dir="auto">but I don't know if it is guaranteed that the order is the same as the order of the atoms in the document view.</p>
<p dir="auto">So to summaries I would like the following behavior:</p>
<ul>
<li>the user opens a .sam</li>
<li>My apps provides an index/a number</li>
<li>The user knows which atom the app considers.</li>
</ul>
<p dir="auto">Notw that it cannot be based on the atoms' coordinates since my app will performs minimization steps that constantly modifies the system's geometry.</p>
<p dir="auto">Thanks in advance,</p>
]]></description><link>https://forum.samson-connect.net/topic/72/get-the-position-index-of-an-atom-in-the-document-view</link><generator>RSS for Node</generator><lastBuildDate>Tue, 12 May 2026 05:57:08 GMT</lastBuildDate><atom:link href="https://forum.samson-connect.net/topic/72.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 26 Nov 2018 14:40:29 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Get the position&#x2F;index of an atom in the document view on Mon, 26 Nov 2018 15:31:45 GMT]]></title><description><![CDATA[<p dir="auto">Perfect thanks.</p>
]]></description><link>https://forum.samson-connect.net/post/241</link><guid isPermaLink="true">https://forum.samson-connect.net/post/241</guid><dc:creator><![CDATA[Leonard]]></dc:creator><pubDate>Mon, 26 Nov 2018 15:31:45 GMT</pubDate></item><item><title><![CDATA[Reply to Get the position&#x2F;index of an atom in the document view on Mon, 26 Nov 2018 15:04:14 GMT]]></title><description><![CDATA[<p dir="auto">Hi Leo ;-). Yes, the atoms retrieved this way will always be in the same order as in the document view (precisely, <code>getNodes</code> collects nodes in a depth-first-search way).</p>
]]></description><link>https://forum.samson-connect.net/post/240</link><guid isPermaLink="true">https://forum.samson-connect.net/post/240</guid><dc:creator><![CDATA[Stephane]]></dc:creator><pubDate>Mon, 26 Nov 2018 15:04:14 GMT</pubDate></item></channel></rss>