[chimera-dev] [Chimera-users] Driving matchAtoms from the IDLE

Eric Pettersen pett at cgl.ucsf.edu
Fri Feb 22 13:57:07 PST 2008


On Feb 22, 2008, at 3:45 AM, Jean-Didier Maréchal wrote:

> Hi Guys,
>
> I'd like to superpose two inorganic complexes using two differently
> "ordered" atom sets. My compound has quite similar substructures but I
> am  sure at all what is the best "ordered" selection of atom pairs to
> align. Therefore, I'd like to make a "extensive" search (with an
> heuristic approach to define...) passing by the idle. I am  
> unfortunately
> missing something before getting to this point!
>
> Lets say that I just want to align the nitrogen atoms of the my two
> structures. I have:
>
> import chimera
> import numpy
> from chimera import match
> from chimera import runCommand
> runCommand("select #1 at N=")
> an1=chimera.selection.currentAtoms()
> runCommand("select #0 at N=)
> an2=chimera.selection.currentAtoms()
> chimera.match.matchAtoms(an1,an2)
>
> And then it's when I am already stuck!
>
> the resulting prompt does not provide mistake an gives:
> chimera.match.matchAtoms(an1,an2)
> (<_chimera.Xform object at 0x9463ef8>, 0.034256915079603358)
>
> But how this results can be send to the graphical window? I guess I  
> have
> to use the Xform object, but I can not clearly understand how to do
> this.
>
> Thanks for any help!
>
> JD

Hi JD,
	I'm not 100% certain what your goal is, but you could just run the  
match command directly:

from chimera import runCommand
runCommand("match #1 at N= #0 at N=")

If you need access to the RMSD of the match, you could call the  
underlying match() function:

from Midas import match
mobileAtoms, refAtoms, rmsd = match("#0 at N=", "#1 at N=")

which will also superimpose the structures.

--Eric

                         Eric Pettersen
                         UCSF Computer Graphics Lab
                         http://www.cgl.ucsf.edu

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-dev/attachments/20080222/0c7d3ba7/attachment.html>


More information about the Chimera-dev mailing list