<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Jaime,<div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>As you probably surmised, the answers are no and no. The graph-traversal code in Chimera was not intended for topological comparison. It is used to draw certain kinds of depictions (e.g. wireframe) efficiently. It makes no attempt to use topologically equivalent atoms as roots nor keep traversal order of topologically identical fragments the same.<br class=""><div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>Chemical graph comparison is a hard problem in general (particularly in 3D), but it’s possible you might be able to work up a SMARTS query based on one fragment using either <a href="https://en.wikipedia.org/wiki/JOELib" class="">JOELib</a> or <a href="https://en.wikipedia.org/wiki/Open_Babel" class="">Open Babel</a> and apply it to other candidate fragments.</div></div></div><div><br class=""></div><div>—Eric</div><div><br class=""></div><div><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>Eric Pettersen</div><div class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>UCSF Computer Graphics Lab</div></div></div><br class=""><blockquote type="cite" class=""><div class="">On Mar 7, 2019, at 4:06 AM, Jaime Rodríguez-Guerra Pedregal <<a href="mailto:Jaime.RodriguezGuerra@uab.cat" class="">Jaime.RodriguezGuerra@uab.cat</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" class="">
<div class="">
<div dir="ltr" class="">
<div class="">Dear Chimera team,</div>
<div class=""><br class="">
</div>
<div class="">I have two questions regarding the same idea. <br class="">
</div>
<div class=""><br class="">
</div>
<div class="">I am trying to develop a script to find topologically equivalent residues in a structure (e.g. MOF, cages, and so on). To do this, I am using SplitMolecule.split.split_connected and then comparing the resulting pieces by number of atoms, empirical formula
and, ultimately, I would like to compare the chemical graph (i.e. test for graph isomorphism). Is there any built-in function/object for that in Chimera?</div>
<div class=""><br class="">
</div>
<div class="">Since I didn't want to overcomplicate the algorithm, for now I am trusting that there won't be isomers in the structure and the empirical formula (actually a collections.Counter applied to
<a href="http://atom.element.name/" class="">atom.element.name</a>) is enough of a test.This is working ok but, in some cases, the resulting pieces have totally different atom names because they come from a unified generic residue that encompasses all the pieces. As
a result, I want to rename them in the same way consistently.</div>
<div class=""><br class="">
</div>
<div class="">My first attempt at this consists of finding the chimera.Root atom of each piece and then using chimera.Molecule.traverseAtoms to iterate over the piece. However, I've found that the Root is not always the same (topologically speaking) atom, so the naming
scheme differs from piece to piece. Is there anyway to guarantee topologically equivalent traversals?</div>
<div class=""><br class="">
</div>
<div class="">I guess that both questions would lead to the same result, because it seems that I will need a chemical graph anyway.</div>
<div class=""><br class="">
</div>
<div class="">Thank you in advance,</div>
<div class="">Jaime.<br class="">
</div>
<div class=""><br class="">
</div>
</div>
</div>
_______________________________________________<br class="">Chimera-users mailing list: <a href="mailto:Chimera-users@cgl.ucsf.edu" class="">Chimera-users@cgl.ucsf.edu</a><br class="">Manage subscription: <a href="http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users" class="">http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users</a><br class=""></div></blockquote></div><br class=""></div></body></html>