Re: [modeller_usage] Trouble with angle restrain in chimera
To: João Rodrigues <>
Subject: Re: [modeller_usage] Trouble with angle restrain in chimera
From: virginia miguel <>
Date: Tue, 4 Sep 2012 06:09:04 -0700 (PDT)
Cc:
João! Thank you very much for your help! that work out! Sorry to bother you again but now the error that appears is the following:
File "model-multiple.py", line 17, in special_restraints
feature=features.angle(a['CA:796'],
TypeError: unsubscriptable object
For what i can understand it does not recognize a sequence of atoms in
class MyModel(automodel):
def special_restraints(self, aln):
rsr = self.restraints
at = self.atoms
f = forms.gaussian(group=physical.angle,
feature=features.angle(a['CA:796'],
a['CA:822'],
a['CA:855']),
mean=2.827, stdev=0.010)
I have tried
feature=features.angle(a['CA:796', 'CA:822','CA:855']),
and
feature=features.angle(a 'CA:796', 'CA:822','CA:855' ),
but they did not worked. Do you know how could I fix this?
I arise in the morning torn between a desire to improve the world and a
desire to enjoy the world. This makes it hard to plan the day. (E.B. White)
--- El lun 3-sep-12, João Rodrigues <> escribió:
De: João Rodrigues <>
Asunto: Re: [modeller_usage] Trouble with angle restrain in chimera
Para: "virginia miguel" <>
Cc:
Fecha: lunes, 3 de septiembre de 2012, 17:24
Hey Virginia,
You have one less indentation level in that line. Python then considers it out of the class MyModel and thus, rsr is not previously declared. Just hit tab/4 spaces behind rsr.add and it should work.
Best,
João
No dia 3 de Set de 2012 22:45, "virginia miguel" <> escreveu:
Hi everyone,
I am trying to build a chimera protein based on two known structures that do not overlap, and I am trying to specify an angle restrain between the two domains that are model to give information of their relative orientation obtained experimentally using this script:
# 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
env = environ() # create a new MODELLER environment to build this model in
# directories for input atom files
env.io.atom_files_directory = './:../atom_files'
class MyModel(automodel):
def special_restraints(self, aln):
rsr = self.restraints
at = self.atoms
f = forms.gaussian(group=physical.angle,
feature=features.angle(a['CA:796'],
a['CA:822'],
a['CA:855']),
mean=2.827, stdev=0.010)
rsr.add(f)
a = MyModel(env,
alnfile = 'align2.ali', # alignment filename
knowns = ('2OK2','1FW6','1E3M'), # codes of the templates
sequence = 'PAOI') # code of the target
a.starting_model= 1 # index of the first model
a.ending_model = 50 # index of the last model
# (determines how many models to calculate)
a.make()
but I get this error:
File "model-multiple.py", line 12, in ?
class MyModel(automodel):
File "model-multiple.py", line 21, in MyModel
rsr.add(f)
NameError: name 'rsr' is not defined
So I do not know what I am missing....if someone can help me!
Thank you in advance! Virginia.
I arise in the morning torn between a desire to improve the world and a
desire to enjoy the world. This makes it hard to plan the day. (E.B. White)
_______________________________________________
modeller_usage mailing list
https://salilab.org/mailman/listinfo/modeller_usage
-----Adjunto en línea a continuación-----
_______________________________________________
modeller_usage mailing list
https://salilab.org/mailman/listinfo/modeller_usage