Dear Modelling Community,<br><br>I have two pdb structures I am interested in superposing, using an alignment I have created outside of modeller. The alignment is in pir format, and only represents a single chain from each PDB (each PDB has multiple chains in this case). Ideally, I would like to have the superposition be performed by only considering a subset of the aligned residues that I define (the most conserved positions).<br>
<br>I have already looked through the superpose.py example, converted my alignment into pir format, and familiarized myself with the modeller &#39;selection&#39; object. Unfortunately, I am running into problems when I attempt to run the superposition. The pir alignment I am using is below:<br>
<br>&gt;P1;1ck0<br>structureX:1ck0:1:H:216:H:Ab1:Human:2.0:0.10<br>QVQLQESGGGLVQPRGSLKLSCAASGFTFNTDAMNWVRQAPGKGLEWVARIRSKGFNFATYYADSVRDRFTISRD<br>DSQSMLYLQMNNLKTEDTGIYYCVRGRDGEAMDYWGQGTTLTVSSAKTTPPSVYPLAPM--------VTLGCLVK<br>
GYFPEPVTVTWNSGSLSSGVHTFPAVLQSDLYTLSSSVTVPSSPRPSETVTCNVAHPASSTKVDKKIVN<br>*<br>&gt;P1;1e4w<br>structureX:1e4w:1:H:211:H:Ab2:Human:2.0:0.10<br>QVQLQQPGAELVKPGASVKLSCKASGFTFTNYWMHWVKQRPGQGLEWIGEILPS--NGRTNYNEKFKTKATLTVD<br>KSSNTAYMQLSSLTSEDSAVYYCARSPS----DYWGQGTTLTVSSAKTTAPSVYPLAPVCGDTTGSSVTLGCLVK<br>
GYFPEPVTLTWNSGSLSSGVHTFPAVLQSDLYTLSSSVTVTSSTWPSQSITCNVAHPASSTKVDKKIEP<br>*<br><br>When I attempt to just swap out these pdbs and this alignment with the ones in the example superpose.py, it returns an error, complaining that my submitted sequence length does not match the pdb sequence length. <br>
<br>-bash-3.00$ mod9v3 superpose.py<br>Traceback (most recent call last):<br>&nbsp; File &quot;superpose.py&quot;, line 17, in ?<br>&nbsp;&nbsp;&nbsp; r = atmsel2.superpose(mdl2, aln)<br>&nbsp; File &quot;/usr/lib/modeller9v3/modlib/modeller/selection.py&quot;, line 476, in superpose<br>
&nbsp;&nbsp;&nbsp; fit, refine_local, rms_cutoff)<br>_modeller.ModellerError: chk_aln_340E&gt; Number of residues in model (&nbsp;&nbsp;&nbsp;&nbsp; 427) does not match that in alignment (&nbsp;&nbsp;&nbsp;&nbsp; 211).<br><br><br>What am I doing wrong? The superpose.py I used is shown below.<br>
<br># Example for: selection.superpose()<br><br># This will use a given alignment to superpose Calpha atoms of<br># one structure (2ctx) on the other (1fas).<br><br>from modeller import *<br><br>env = environ()<br>env.io.atom_files_directory = &#39;/datasets/pdb/&#39;<br>
<br>mdl&nbsp; = model(env, file=&#39;1ck0&#39;)<br>mdl2 = model(env, file=&#39;1e4w&#39;)<br>aln = alignment(env, file=&#39;test.ali&#39;, align_codes=(&#39;1ck0&#39;, &#39;1e4w&#39;))<br><br>atmsel = selection(mdl).only_atom_types(&#39;CA&#39;)<br>
r = atmsel.superpose(mdl2, aln)<br><br># We can now use the calculated RMS, DRMS, etc. from the returned &#39;r&#39; object:<br>rms = r.rms<br>drms = r.drms<br>print &quot;%d equivalent positions&quot; % r.num_equiv_pos<br>
<br>mdl2.write(file=&#39;1e4w.fit&#39;)<br><br><br><br><br>