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

[modeller_usage] User defined restraints



Hello.
I want to define restraints while modeling with ligand and I want to define different restraints.
I use the following script
---------------------------------------------------------------------------------------------
...
class mymodel(automodel):
   def special_restraints(self, aln):
       rsr = self.restraints
       for ids in (('OD1:282:B', 'CA:765:B'),
                   ('OD2:282:B', 'CA:765:B'),
                   ('OD1:285:B','CA:765:B'),
                   ('OD2:460:B', 'CA:765:B'),
                   ('OE2:152:A', 'CA:765:B')):
           atoms = [self.atoms[i] for i in ids]
           rsr.add(forms.upper_bound(group=physical.upper_distance,
                                     feature=features.distance(*atoms),
                                     mean=2.5, stdev=0.1))
def special_restraints(self, aln):
       rsr2 = self.restraints
       for ids1 in (('OE2:152:A', 'CA:765:B')):
           atoms = [self.atoms[j] for j in ids1]
           rsr2.add(forms.upper_bound(group=physical.upper_distance,
                                     feature=features.distance(*atoms),
                                     mean=2.3, stdev=0.1))


env = environ()
env.io.hetatm = True
env.io.water = True
...

---------------------------------------------------------------------------------------------

Then I get this error

--------------------------------------------------------------------------------------------
Traceback (most recent call last):
 File "model-ca.py", line 32, in ?
   a.make()
File "C:\Program Files\Modeller9v1\modlib\modeller\automodel\automodel.py", line 108, in make
   self.homcsr(exit_stage)
File "C:\Program Files\Modeller9v1\modlib\modeller\automodel\automodel.py", line 427, in homcsr
   self.mkhomcsr(selection(self), aln)
File "C:\Program Files\Modeller9v1\modlib\modeller\automodel\automodel.py", line 537, in mkhomcsr
   self.special_restraints(aln)
 File "model-ca.py", line 19, in special_restraints
   atoms = [self.atoms[j] for j in ids1]
File "C:\Program Files\Modeller9v1\modlib\modeller\coordinates.py", line 127, in __getitem__
   (self.offset, self.length, self.suffix))
File "C:\Program Files\Modeller9v1\modlib\modeller\util\modutil.py", line 76, in handle_seq_indx
   int_indx = lookup_func(*args)
File "C:\Program Files\Modeller9v1\modlib\modeller\coordinates.py", line 40, in _indxatm
   newindx = _modeller.indxatm2(indx+suffix, self.modpt) - 1 - offset
_modeller.error: indxatm_278E> No ":" in ATOM:RESID[:CHAINID] atom identifier: O
---------------------------------------------------------------------------------------------

I am using python for the first time so that must be some problem with the script.
Do you have any suggestions?
Thank you!