I'm making a model which is supposed to contain an alpha helix in
residues 26-46. I can do this with a top command file, by modifying the
special_restraints subroutine in __special.top:
SUBROUTINE ROUTINE = 'special_restraints'
#This one is to adjust helices in fxyd proteins
# SET ADD_RESTRAINTS = on
# MAKE_RESTRAINTS RESTRAINT_TYPE = 'alpha', RESIDUE_IDS = '14' '17'
RETURN
END_SUBROUTINE
This works with the following alignment file, and gives me the
uninterrupted helix I want.
>P1;gamma
structureX:gamma:FIRST:@:LAST : :undefined:undefined:-1.00:-1.00
MTGLSMDGGGSPKGDVDPFYYDYETVRNGGL------IFAGLAFIVGLLILLSRRFRCGGNKKRRQINEDEP*
>P1;gamma1
structureX:gamma1:FIRST:@:LAST : :undefined:undefined:-1.00:-1.00
MTGLSMDGGGSPKGDVDPFYYDYET------VRNGGLIFAGLAFIVGLLILLSRRFRCGGNKKRRQINEDEP*
When I use the same alignment file with a python routine copied from the
FAQ, it runs fine but it doesn't apply the restraint! I'd like to use
the new python command system for this kind of restraint, because the
restraints are directly in the command file and not off in
__special.top, but I can't make it work. Here is the python file I used:
# comparative modeling of gamma
from modeller.automodel import * # Load the automodel class
#This one is to set the entire TM to a helix in gamma
class mymodel(automodel):
def special_restraints(self, aln):
rsr = self.restraints
rsr.make(aln, restraint_type='ALPHA',residue_ids=('26','46'))
log.very_verbose() # request verbose output
env = environ() # create a new MODELLER environment to build this model in
env.io.hetatm = True
a = automodel(env,