[Chimera-users] Recursive structure matching and acquisition of descriptive numbers

Jaime Rodríguez-Guerra jaime.rodriguezguerra at uab.cat
Thu Sep 22 11:45:04 PDT 2016


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!


More information about the Chimera-users mailing list