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

[modeller_usage] symmetry restrain



Hi,

I'm trying to built a protein with 4 identical chains using the symmetry restrain to CA atoms as section "2.2.11 Building multi-chain models with symmetry"  from modeller 9v7 manual.

This is my input:







# Homology modeling with multiple templates

from modeller import *              # Load standard Modeller classes
from modeller.automodel import *    # Load the automodel class

log.verbose()    # request verbose output


# Override the special_restraints and user_after_single_model methods:
class MyModel(automodel):
    def special_restraints(self, aln):
        # Constrain the A, B, C and D chains to be identical (but only restrain
        # the C-alpha atoms, to reduce the number of interatomic distances
        # that need to be calculated):
        s1 = selection(self.chains['A']).only_atom_types('CA')
        s2 = selection(self.chains['B']).only_atom_types('CA')
        s3 = selection(self.chains['C']).only_atom_types('CA')
        s4 = selection(self.chains['D']).only_atom_types('CA')
        self.restraints.symmetry.append(symmetry(s1, s2, s3, s4, 1.0))
    def user_after_single_model(self):
        # Report on symmetry violations greater than 1A after building
        # each model:
        self.restraints.symmetry.report(1.0)



env = environ()  # create a new MODELLER environment to build this model in

# directories for input atom files
#env.io.atom_files_directory = ['.', '../atom_files']


a = MyModel(env, alnfile='xynB1-multiple.ali', knowns=('3C2U', '1YIF', '2EXH'), sequence = 'xynB', assess_methods=(assess.DOPE, assess.GA341))               # code of the target
a.starting_model= 1                 
a.ending_model  = 2                 
                                    
a.make()  









The problem is that the program stops and the following error message appears at the shell:


  File "model-multiple.py", line 37, in ?
    a.make()  
  File "/usr/lib/modeller9v7/modlib/modeller/automodel/automodel.py", line 98, in make
    self.homcsr(exit_stage)
  File "/usr/lib/modeller9v7/modlib/modeller/automodel/automodel.py", line 435, in homcsr
    self.mkhomcsr(selection(self), aln)
  File "/usr/lib/modeller9v7/modlib/modeller/automodel/automodel.py", line 523, in mkhomcsr
    self.special_restraints(aln)
  File "model-multiple.py", line 19, in special_restraints
    self.restraints.symmetry.append(symmetry(s1, s2, s3, s4, 1.0))
TypeError: __init__() takes exactly 4 arguments (6 given)


This is line 19:  self.restraints.symmetry.append(symmetry(s1, s2, s3, s4, 1.0))

Someone could tell me what i am doing wrong?  I can not find clues at the google.

Thanks for any help.

Flavio