Thank you Ben,
I have a few follow-up questions. I will enumerate them for clarity:
1) does select_loop_atoms use template-derived restraints if they are
available?
2) does it also use secondary structure restraints if they are defined..
i.e.:
SUBROUTINE ROUTINE = 'special_restraints'
SET ADD_RESTRAINTS = on
MAKE_RESTRAINTS RESTRAINT_TYPE = 'alpha', RESIDUE_IDS = '153' '162'
RETURN
END_SUBROUTINE
3) when I have used select_loopo_atoms in the past, often the loops look
"over-refined" as if they don't fit into the context of the protein. Is it
possible that I'm using it wrong? ... or is it that the answer to (1) and
(2) above is, "no."
4) is it possible to pick multiple segments to refine with select_atoms as
well as select_loop_atoms? I have been able to do this with
select_loop_atoms, but haven't figured it out with select_atoms.
5) This is probably trivial and I'm a bit embarrassed to ask, but in the
python scripts, is is possible to have multiple def statements? For example
if I wanted to select atoms for loop modelling, AND impose secondary
structure constraints at the same time? For example, I tried something to
the effect below, but I don't believe it's correct, because I get
complaints about "indentation" or something::
from modeller.automodel import *
log.verbose()
# Override the 'select_atoms' routine in the 'automodel' class
class mymodel(automodel):
# select only certain segments for refinement
def select_atoms(self):
self.pick_atoms(selection_segment=('100:', '103:'),
selection_search='segment', pick_atoms_set=1,
res_types='all', atom_types='all',
selection_from='all', selection_status='initialize')
self.pick_atoms(selection_segment=('154:', '177:'),
selection_search='segment', pick_atoms_set=1,
res_types='all', atom_types='all',
selection_from='all', selection_status='add')
# special restraints
def special_restraints(self, aln):
rsr = self.restraints
# An alpha-helix:
rsr.make(aln, restraint_type='ALPHA', residue_ids=('99', '102'),
spline_on_site=False)
rsr.make(aln, restraint_type='ALPHA', residue_ids=('153', '179'),
spline_on_site=False)
env = environ()
env.io.atom_files_directory = './'
# Choose 1 for env.edat.nonbonded_sel_atoms if you want the selected atoms
to "feel"
# the unselected atoms. If you want them not to "feel" them, choose 2.
env.edat.nonbonded_sel_atoms = 1
m = mymodel(env, alnfile='alignment.ali', knowns=('temp','kvap'),
sequence='1out')
m.starting_model = 1
m.ending_model = 2
m.make()#
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
David Bostick Office: 262 Venable Hall
Dept. of Physics and Astronomy Phone: (919)962-0165
Program in Molecular and Cellular Biophysics
UNC-Chapel Hill
CB #3255 Phillips Hall
Chapel Hill, NC 27599 http://www.unc.edu/~dbostick
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
On Tue, 26 Jul 2005, Modeller Caretaker wrote:
> David L. Bostick wrote:
> > I have searched the archives of the discussion forum for this and found a
> > few questions, but no answers. I wish to impart the template structure to
> > a sequence exactly, and select only the loops for refinement. I am using
> > modeller 7v7, and have not switched to 8 yet. I would be interested in
> > ways to do this for both versions, but most interested in 7v7.
>
> You can use TOP scripts with both Modeller 7v7 and Modeller 8.
>
> > SUBROUTINE ROUTINE = 'select_atoms'
> > PICK_ATOMS SELECTION_SEGMENT='100:' '105:', SELECTION_SEARCH='segment', ;
> > PICK_ATOMS_SET=1, RES_TYPES='all', ATOM_TYPES='all', ;
> > SELECTION_FROM='all', SELECTION_STATUS='initialize'
> > RETURN
> > END_SUBROUTINE
> >
> > but I have no idea how to extend this to do multiple loop modelling all at
> > the same time... i.e. segment 100-105, 158-164, 200-206, etc... all at
> > once.
>
> First, you use select_loop_atoms, not select_atoms, for loop refinement.
>
> You can simply call PICK_ATOMS multiple times; every time after the
> first, set SELECTION_STATUS to 'add':
>
> SUBROUTINE ROUTINE = 'select_loop_atoms'
> PICK_ATOMS SELECTION_SEGMENT='100:' '105:', ;
> SELECTION_SEARCH='segment', PICK_ATOMS_SET=1, ;
> RES_TYPES='all', ATOM_TYPES='all', ;
> SELECTION_FROM='all', SELECTION_STATUS='initialize'
> PICK_ATOMS SELECTION_SEGMENT='158:' '164:', ;
> SELECTION_SEARCH='segment', PICK_ATOMS_SET=1, ;
> RES_TYPES='all', ATOM_TYPES='all', ;
> SELECTION_FROM='all', SELECTION_STATUS='add'
> PICK_ATOMS SELECTION_SEGMENT='200:' '206:', ;
> SELECTION_SEARCH='segment', PICK_ATOMS_SET=1, ;
> RES_TYPES='all', ATOM_TYPES='all', ;
> SELECTION_FROM='all', SELECTION_STATUS='add'
> RETURN
> END_SUBROUTINE
>
> ...and so on. For Python with Modeller 8v1, use the loop.py example at
> http://salilab.org/modeller/manual/node33.html as your base and use a
> select_loop_atoms routine similar to the following:
>
> def select_loop_atoms(self):
> stat = 'INITIALIZE'
> for segs in (('100:', '105:'), ('158:', '164:'),
> ('200:', '206:')):
> self.pick_atoms(selection_segment=segs,
> selection_search='segment',
> pick_atoms_set=1,
> res_types='all',
> atom_types='all',
> selection_from='all',
> selection_status=stat)
> stat = 'ADD'
>
> Ben Webb, Modeller Caretaker
> --
> http://www.salilab.org/modeller/
> Modeller mail list: http://salilab.org/mailman/listinfo/modeller_usage
>