<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<meta content="text/html; charset=UTF-8">
<style type="text/css" style="">
<!--
p
{margin-top:0;
margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<p>That was exactly what I was after thanks! I figured the object orientation should provide that somewhere but was barking up slightly the wrong tree!</p>
<p><br>
</p>
<p>Thank you all for all your help - definitely wouldn't have been able to do it without you!</p>
<p><br>
</p>
<p>If it's of any interest, or it helps for any future questions where you might want to refer back to code segments, I've put the more-or-less-finished script in this paste:</p>
<p><br>
</p>
<p><a href="http://pastebin.com/xJNSWJGq" class="x_OWAAutoLink" id="LPlnk208981">http://pastebin.com/xJNSWJGq</a><br>
<br>
</p>
<p><br>
</p>
<div id="x_Signature">
<div id="x_divtagdefaultwrapper" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
Joe Healey<br style="font-size:10pt">
</div>
<div id="x_divtagdefaultwrapper" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<br>
</div>
<div id="x_divtagdefaultwrapper" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<span style="text-decoration:underline"> </span><br>
</div>
<div id="x_divtagdefaultwrapper" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<span style="font-size:10pt">M.Sc. B.Sc. (Hons)</span><br>
</div>
<div id="x_divtagdefaultwrapper" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<span style="font-size:10pt"></span>
<div><span style="font-size:10pt">PhD Student</span></div>
<div><span style="font-size:10pt">MOAC CDT, Senate House</span></div>
<div><span style="font-size:10pt">University of Warwick<br style="">
</span></div>
<div><span style="font-size:10pt">Coventry<br style="">
</span></div>
<div><span style="font-size:10pt">CV47AL<br style="">
Mob: +44 (0) 7536 042620 | </span><span style="font-size:10pt">Email: J.R.J.Healey@warwick.ac.uk</span></div>
<div><span style="font-size:10pt"><br style="">
</span></div>
<div><span style="font-size:10pt">Jointly working in:<br style="">
</span></div>
<div><span style="font-size:10pt"><a href="http://www2.warwick.ac.uk/fac/med/research/tsm/microinfect/staff/waterfieldlab/" id="LPNoLP">Waterfield Lab</a> (<span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:13.3333330154419px; background-color:rgb(255,255,255)">WMS </span><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:13.3333330154419px; background-color:rgb(255,255,255)">Microbiology
and Infecti</span><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:13.3333330154419px; background-color:rgb(255,255,255)">on Un</span><span style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:13.3333330154419px; background-color:rgb(255,255,255)">it)</span></span></div>
<div><span style="font-size:10pt">and the <a href="http://www2.warwick.ac.uk/fac/sci/chemistry/research/gibson/gibsongroup/" id="LPNoLP">Gibson Lab</a> (Warwick Chemistry)<br style="">
</span></div>
<div><span style="font-size:10pt"><br style="">
</span></div>
<div><span style="font-size:10pt">Twitter: <a href="https://twitter.com/JRJHealey" id="LPNoLP">
@JRJHealey</a> | </span><span style="font-size:10pt">Website: </span><a href="http://www2.warwick.ac.uk/fac/sci/moac/people/students/2013/joseph_healey" id="LPNoLP" style="font-size:10pt">MOAC Page</a></div>
</div>
</div>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Eric Pettersen <pett@cgl.ucsf.edu><br>
<b>Sent:</b> 22 September 2016 20:54:35<br>
<b>To:</b> Jaime Rodríguez-Guerra<br>
<b>Cc:</b> chimera-users@cgl.ucsf.edu; Healey, Joe<br>
<b>Subject:</b> Re: [Chimera-users] Recursive structure matching and acquisition of descriptive numbers</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Thanks Jaime — exactly right. I realized that the “atoms1, atoms2” in my original example didn’t really give any indication of which atoms were which, which is why in my later examples I changed to "simAtoms, refAtoms”, so it’s actually
“atoms2” that are the reference atoms.<br>
<br>
—Eric<br>
<br>
> On Sep 22, 2016, at 11:45 AM, Jaime Rodríguez-Guerra <jaime.rodriguezguerra@uab.cat> wrote:<br>
> <br>
> Hi!<br>
> <br>
> Since you are getting lists of atoms back, you only need to do some<br>
> attribute access (rather than method calling)!<br>
> <br>
> Every chimera.Atom object has an attribute called molecule: a<br>
> reference to its parent chimera.Molecule. chimera.Molecule objects<br>
> have an attribute called 'name', but sometimes this is not very<br>
> informative (depends on your input), so you need to resort to the pdb<br>
> filename, stored in the first element of the openedAs tuple.<br>
> <br>
> In code, this looks like this:<br>
> <br>
> for atoms1, atoms2, rmsd, fullRmsd in match(CP_BEST, [ref, sims],<br>
> defaults[MATRIX], "nw", defaults[GAP_OPEN], defaults[GAP_EXTEND]):<br>
> molecule1 = atoms1[0].molecule # any atom from the list will do<br>
> molecule2 = atoms2[0].molecule<br>
> print molecule1.name, "\t", molecule2.name, "\t", rmsd #<br>
> molecule1.openedAs[0] will also work here<br>
> <br>
> I don't know if atoms1 comes consistently from the reference molecule,<br>
> but I'd guess it does.<br>
> <br>
> Hope it helps!<br>
> _______________________________________________<br>
> Chimera-users mailing list: Chimera-users@cgl.ucsf.edu<br>
> Manage subscription: <a href="http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users">
http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users</a><br>
<br>
</div>
</span></font>
</body>
</html>