Search code examples
pymol

Why is "target" too short when using cealign in PyMOL?


Specifically, when runnning

fetch 2mi1 3zkt
cealign 2mi1, 3zkt

I get the following error:

CEalign-Error: Your target selection is too short.

If I look at the relevant file (fitting.py) in the PyMOL github repo, , it looks like it thinks there are no coordinates for atoms in the structure? Unfortunately the documentation doesn't really explain well (enough for me to understand) what needs to be selected, but I was under the impression that the example given uses a similar approach as I tried:

fetch 1c0mB 1bco, async=0
as ribbon
cealign 1bco, 1c0mB, object=aln

I have also tried with the async=0, and tried selecting single alpha carbons to use as Target and Mobile.


Solution

  • The cealign method is set to have a default window of 8. It will throw your error if the target/mobile length is shorter than 2*window.

    You can force the window size to be minimal; the minimum allowed is 3:

    fetch 2mi1 3zkt
    cealign 2mi1, 3zkt, window=3
    

    Be careful, as the CE algorithm is very sensitive to these small window sizes, and the resulting alignments may vary a lot.