[Chimera-users] Recursive structure matching and acquisition of descriptive numbers
Eric Pettersen
pett at cgl.ucsf.edu
Thu Sep 22 12:54:35 PDT 2016
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.
—Eric
> On Sep 22, 2016, at 11:45 AM, Jaime Rodríguez-Guerra <jaime.rodriguezguerra at uab.cat> wrote:
>
> Hi!
>
> Since you are getting lists of atoms back, you only need to do some
> attribute access (rather than method calling)!
>
> Every chimera.Atom object has an attribute called molecule: a
> reference to its parent chimera.Molecule. chimera.Molecule objects
> have an attribute called 'name', but sometimes this is not very
> informative (depends on your input), so you need to resort to the pdb
> filename, stored in the first element of the openedAs tuple.
>
> In code, this looks like this:
>
> for atoms1, atoms2, rmsd, fullRmsd in match(CP_BEST, [ref, sims],
> defaults[MATRIX], "nw", defaults[GAP_OPEN], defaults[GAP_EXTEND]):
> molecule1 = atoms1[0].molecule # any atom from the list will do
> molecule2 = atoms2[0].molecule
> print molecule1.name, "\t", molecule2.name, "\t", rmsd #
> molecule1.openedAs[0] will also work here
>
> I don't know if atoms1 comes consistently from the reference molecule,
> but I'd guess it does.
>
> Hope it helps!
> _______________________________________________
> Chimera-users mailing list: Chimera-users at cgl.ucsf.edu
> Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
More information about the Chimera-users
mailing list