[Chimera-users] How to "Align" two atoms
Elaine Meng
meng at cgl.ucsf.edu
Thu Oct 4 15:12:18 PDT 2007
Hello,
I thought the EZ way to translate Chimera->python was simply to use
makeCommand and enclose the command, for example:
import Midas
from Midas.midas_text import makeCommand
makeCommand('align #0:1.b at ca #1:1 at ca')
Maybe this doesn't always work, or is less efficient?
Elaine
On Oct 4, 2007, at 2:37 PM, Thomas Goddard wrote:
> Hi Matt,
>
> Many Chimera commands are defined in
>
> chimera/share/Midas/__init__.py
>
> They are sometimes a pain to call from Python. Here is some code for
> the align command.
>
> Tom
>
> from chimera import openModels, selection
> m = openModels.list()[0]
> sel = selection.ItemizedSelection()
> sel.add(m.atoms[0:2])
> from Midas import align
> align(sel)
>
>
>
> Matthew Baker wrote:
>> I'm writing a module. I've created a model and added it to the open
>> models. How can I reproduce the command-line function
>>
>> align #1:1 #1:2
>>
>> The variable names for my two atoms are newModel.atoms[0] and
>> newModel.atoms[1].
>>
>> Thanks,
>> Matt
>>
> _______________________________________________
> Chimera-users mailing list
> Chimera-users at cgl.ucsf.edu
> http://www.cgl.ucsf.edu/mailman/listinfo/chimera-users
More information about the Chimera-users
mailing list