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
On 2/4/11 1:56 PM, flavio seixas wrote: > 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. ... > The problem is that the program stops and the following error message > appears at the shell: > self.restraints.symmetry.append(symmetry(s1, s2, s3, s4, 1.0)) > TypeError: __init__() takes exactly 4 arguments (6 given)
Just like the error message says, you cannot create a symmetry element that contains 4 selections. As in the example, it can only contain 2 selections; it is a pairwise restraint. So you would need to restrain each pair (s1-s2, s2-s3 and s3-s4) individually.
For an example, see http://salilab.org/archives/modeller_usage/2009/msg00084.html
Ben Webb, Modeller Caretaker
Thanks Ben. It works very well. I have another doubt.
I also want to restrain the residues 100 to 105 as alpha helix at all four chains.
If I use the following restrain:
rsr.add(secondary_structure.alpha(self.residue_range('100:A', '105:A')))
...before the chain symmetry restrain argument, it will be apply to all chains as consequence, or do I need to restrain this range for all chains by selection, like I did for chain A?
If the last option was the correct, how should I make the selection? Is there an example?
Regards,
Flavio
--- On Fri, 2/4/11, Modeller Caretaker modeller-care@salilab.org wrote:
> From: Modeller Caretaker modeller-care@salilab.org > Subject: Re: [modeller_usage] symmetry restrain > To: "flavio seixas" oivalf_nix@yahoo.com > Cc: modeller_usage@salilab.org > Date: Friday, February 4, 2011, 7:38 PM > On 2/4/11 1:56 PM, flavio seixas > wrote: > > 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. > ... > > The problem is that the program stops and the > following error message > > appears at the shell: > > self.restraints.symmetry.append(symmetry(s1, s2, s3, > s4, 1.0)) > > TypeError: __init__() takes exactly 4 arguments (6 > given) > > Just like the error message says, you cannot create a > symmetry element > that contains 4 selections. As in the example, it can only > contain 2 > selections; it is a pairwise restraint. So you would need > to restrain > each pair (s1-s2, s2-s3 and s3-s4) individually. > > For an example, see > http://salilab.org/archives/modeller_usage/2009/msg00084.html > > Ben Webb, Modeller Caretaker > -- > modeller-care@salilab.org > http://www.salilab.org/modeller/ > Modeller mail list: http://salilab.org/mailman/listinfo/modeller_usage > _______________________________________________ > modeller_usage mailing list > modeller_usage@salilab.org > https://salilab.org/mailman/listinfo/modeller_usage >
On 2/5/11 5:05 PM, flavio seixas wrote: > I also want to restrain the residues 100 to 105 as alpha helix at all > four chains. > > If I use the following restrain: > > rsr.add(secondary_structure.alpha(self.residue_range('100:A', > '105:A'))) > > ...before the chain symmetry restrain argument, it will be apply to > all chains as consequence, or do I need to restrain this range for > all chains by selection, like I did for chain A?
If you are constraining all atoms in each chain in your symmetry restraints, then in principle you would only need to create one of these secondary structure restraints (it doesn't matter whether you do it before or after the symmetry restraint). But usually we recommend only constraining a subset of the atoms, such as all backbone or all CA, since otherwise the symmetry restraint can become rather slow (it has to calculate all internal distances). So it probably makes sense to create a secondary structure restraint for each chain.
> If the last option was the correct, how should I make the selection?
Just add four separate secondary structure restraints, each with its own selection. (Just duplicate the line you have 3 times, and change the chain ID each time.)
A word of warning: there is no guarantee that a secondary structure restraint will force helical conformation. See recent discussions on this mailing list.
Ben Webb, Modeller Caretaker
participants (2)
-
flavio seixas
-
Modeller Caretaker