Hi,
I generated a model with all hydrogens using allhmodel.
Now I want to refine a loop in this model using the script below.
However, the hydrogens are being removed in the generated models.

Would you help me?

from modeller import *
from modeller.automodel import *

log.verbose()
env = environ()

env.io.atom_files_directory = ['.', '../atom_files']

# Read in HETATM records from template PDBs
env.io.hetatm = True
env.io.water = True
env.io.hydrogen = True

# Create a new class based on 'loopmodel' so that we can redefine
# select_loop_atoms
class MyLoop(loopmodel):
    # This routine picks the residues to be refined by loop modeling
    def select_loop_atoms(self):
        # Two residue ranges (both will be refined simultaneously)
        return selection(self.residue_range('399:', '406:'))

m = MyLoop(env, inimodel='Model172.pdb', sequence='protein', loop_assess_methods=(assess.DOPE, assess.GA341))

m.loop.starting_model= 1           # index of the first loop model
m.loop.ending_model  = 200        # index of the last loop model
m.loop.md_level = refine.very_fast  # loop refinement method

m.make()

# Get a list of all successfully built models from m.loop.outputs
ok_models = filter(lambda x: x['failure'] is None, m.loop.outputs)

# Rank the models by DOPE score
key = 'DOPE score'
ok_models.sort(lambda a,b: cmp(a[key], b[key]))

# Get top model
m = ok_models[0]

print "Top model 1: %s (DOPE score %.3f)" % (m['name'], m[key])
m = ok_models[1]

print "Top model 2: %s (DOPE score %.3f)" % (m['name'], m[key])
m = ok_models[2]

print "Top model 3: %s (DOPE score %.3f)" % (m['name'], m[key])
m = ok_models[3]

print "Top model 4: %s (DOPE score %.3f)" % (m['name'], m[key])
m = ok_models[4]

print "Top model 5: %s (DOPE score %.3f)" % (m['name'], m[key])

 
------------------------------------- Flavio Augusto Vicente Seixas Laboratory of Structural Biochemistry Department of Biochemistry Universidade Estadual de Maringá, PR, Brazil http://www.uem.br