[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [modeller_usage] Trouble running superpose on subsets of multichain pdbs



Jake Gunn-Glanville wrote:
-bash-3.00$ mod9v3 superpose.py
Traceback (most recent call last):
  File "superpose.py", line 17, in ?
    r = atmsel2.superpose(mdl2, aln)
File "/usr/lib/modeller9v3/modlib/modeller/selection.py", line 476, in superpose
    fit, refine_local, rms_cutoff)
_modeller.ModellerError: chk_aln_340E> Number of residues in model ( 427) does not match that in alignment ( 211).


What am I doing wrong? The superpose.py I used is shown below.
...

mdl  = model(env, file='1ck0')
mdl2 = model(env, file='1e4w')
aln = alignment(env, file='test.ali', align_codes=('1ck0', '1e4w'))

The two models have to match the alignment sequences, and the problem here is that while your alignment file header specifies only single chains (1:H through 216:H in 1ck0, and 1:H through 211:H in 1e4w) when you read the models you don't ask for those same ranges, so by default Modeller reads all chains. To fix this you need to specify model_segment when you read in the models, i.e.

mdl  = model(env, file='1ck0', model_segment=('1:H', '216:H'))
mdl2 = model(env, file='1e4w', model_segment=('1:H', '211:H'))
aln = alignment(env, file='test.ali', align_codes=('1ck0', '1e4w'))

Of course, this is a little error prone because you have to specify everything twice. But fortunately the alignment object remembers the residue:chain range specified in the alignment header, so you can simplify this to:

aln = alignment(env, file='test.ali', align_codes=('1ck0', '1e4w'))
mdl  = model(env, file='1ck0', model_segment=aln['1ck0'].range)
mdl2 = model(env, file='1e4w', model_segment=aln['1e4w'].range)

	Ben Webb, Modeller Caretaker
--
             http://www.salilab.org/modeller/
Modeller mail list: http://salilab.org/mailman/listinfo/modeller_usage