On 1/23/15 7:24 PM, Edelmiro Moman wrote:
I would like to build protein models in which the CA coordinates of certain residues are identical to those of the (single) template. If I have understood it correctly, the following should do precisely that: class MyModel(automodel): def select_atoms(self): # Refine all atoms except the CAs of residues20-40 and 70-80 : return selection(self) - selection(self.residue_range('20', '40')).only_atom_types('CA') return selection(self) - selection(self.residue_range('70', '80')).only_atom_types('CA')
You're close, but the first return statement will, er, return, so the second one will never get called ;) You want something like
return selection(self) - selection(self.residue_range('20', '40')).only_atom_types('CA') - selection(self.residue_range('70', '80')).only_atom_types('CA')
instead. (Also note that technically this restricts the CA coordinates to those in the initial model, not the template. But since the default initial model construction simply copies the coordinates of identically named atoms from the template when you only have a single template - and every residue type contains a CA atom - this works out to be the same thing.)
Ben Webb, Modeller Caretaker -- http://www.salilab.org/modeller/ Modeller mail list: http://salilab.org/mailman/listinfo/modeller_usage