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

[modeller_usage] Imposing rigid body restraint



Trying to hold a range of atoms rigid during optimization. I get an error message. Can anyone spot what I’m doing wrong here?

Code:
class MyModel(automodel):
	def special_restraints(self, aln):
		rsr = self.restraints
		at = self.atoms

		rsr.add(secondary_structure.alpha(self.residue_range('138:A','149:A')))
		rsr.add(secondary_structure.alpha(self.residue_range('523:B','530:B')))
		r1 = rigid_body(self.residue_range('152:A','384:A'))
		rsr.rigid_bodies.append(rigid_body(r1))

a = MyModel(env, alnfile='KdpD_full_align.ali',
              knowns=('KdpD_GAF_bent_dimerA','KdpD_GAF_bent_dimerB','4CTI_mod_HAMP-delA','4CTI_mod_HAMP-delB'), sequence='KdpD_GDK_homodimer',
              assess_methods=(assess.DOPE,
#                              #soap_protein_od.Scorer(),
                              assess.GA341))
a.starting_model = 1
a.ending_model = 5

a.make()
————
Result:

Traceback (most recent call last):
  File "model-single-restraint.py", line 28, in <module>
    a.make()
  File "/Library/modeller-9.19/modlib/modeller/automodel/automodel.py", line 112, in make
    self.homcsr(exit_stage)
  File "/Library/modeller-9.19/modlib/modeller/automodel/automodel.py", line 561, in homcsr
    self.mkhomcsr(selection(self), aln)
  File "/Library/modeller-9.19/modlib/modeller/automodel/automodel.py", line 649, in mkhomcsr
    self.special_restraints(aln)
  File "model-single-restraint.py", line 15, in special_restraints
    rsr.rigid_bodies.append(rigid_body(r1))
  File "/Library/modeller-9.19/modlib/modeller/util/modlist.py", line 77, in append
    self[dim] = obj
  File "/Library/modeller-9.19/modlib/modeller/util/modlist.py", line 38, in __setitem__
    self._setfunc(ret, val)
  File "/Library/modeller-9.19/modlib/modeller/rigid_body_list.py", line 24, in _setfunc
    _modeller.mod_rigid_body_set(mdl.modpt, indx, obj._get_base_atoms(mdl),
  File "/Library/modeller-9.19/modlib/modeller/rigid_body.py", line 18, in _get_base_atoms
    return mdl.get_list_atom_indices(self._atoms, None)
  File "/Library/modeller-9.19/modlib/modeller/coordinates.py", line 298, in get_list_atom_indices
    (objinds, mdl) = obj.get_atom_indices()
AttributeError: 'rigid_body' object has no attribute 'get_atom_indices'