problems with filling missing residue without moving exing ones
I could nicely fill missing residues 519-522 and 683-684 by using the normal protocol at /wiki/Missing residue. However, as I would like the existing residues not being modified, I used a script:
from modeller import * from modeller.automodel import * # Load the automodel class
log.verbose() env = environ()
# directories for input atom files env.io.atom_files_directory = ['.', '../atom_files']
class MyModel(automodel): def select_atoms(self): return selection(self.residue_range('518', '521'), self.residue_range('681', '683'))
a = MyModel(env, alnfile = 'alignment.ali', knowns = myPDB, sequence = 'myPDB_fill') a.starting_model= 1 a.ending_model = 1
a.make()
based on the last part of the wiki. Consistently, the error is:
................................. File "fill_resid_no-move.py", line 20, in ? a.make() File "/usr/lib/modeller9.10/modlib/modeller/automodel/automodel.py", line 106, in make atmsel = self._check_select_atoms() File "/usr/lib/modeller9.10/modlib/modeller/automodel/automodel.py", line 490, in _check_select_atoms atmsel = self.select_atoms() File "fill_resid_no-move.py", line 12, in select_atoms return selection(self.residue_range('518', '521'), File "/usr/lib/modeller9.10/modlib/modeller/coordinates.py", line 304, in residue_range start = self.residues[start]._num File "/usr/lib/modeller9.10/modlib/modeller/coordinates.py", line 234, in __getitem__ (self.offset, self.length, self.suffix)) File "/usr/lib/modeller9.10/modlib/modeller/util/modutil.py", line 23, in handle_seq_indx int_indx = lookup_func(*args) File "/usr/lib/modeller9.10/modlib/modeller/coordinates.py", line 298, in _indxres raise KeyError("No such residue: %s" % indx) KeyError: 'No such residue: 518'
I tried different selections as '518', '521' always getting error in finding the first residue in this '...' list.
alignment.ali is constructed, as in the wiki, of first the structure, then the sequence. At any event, the alignment.ali is the same that works well with the script that allows all atoms to move. I serched the web; hope this is no duplication.
Thanks for advice
francesco pietra
On 2/2/12 8:26 AM, Francesco Pietra wrote: > I could nicely fill missing residues 519-522 and 683-684 by using > the normal protocol at /wiki/Missing residue. However, as I would > like the existing residues not being modified, I used a script: ... > KeyError: 'No such residue: 518'
The residue numbers refer to the model, not the template, so the easiest thing to do is to look at the PDB file you generated the first time around and make sure you're selecting the right residues. Also note that if you have a chain ID, you must specify that (e.g. 518:A, 522:A).
> I serched the web; hope this is no duplication.
Really? This question has come up many times before. For example, a search for "No such residue" at http://salilab.org/modeller/search.html turns up a lot of similar posts (and answers).
Ben Webb, Modeller Caretaker
participants (2)
-
Francesco Pietra
-
Modeller Caretaker