a = MyLoopModel(env, alnfile=alignment,
                          knowns=known_templates,
   assess_methods=(assess.DOPEHR,assess.normalized_dope),
                          sequence='target')
                a.starting_model = 1
                a.ending_model = 2

This seems to contradict your statement above. Two models is probably not going to give you sufficient sampling - as John W suggested, you should be building many more models - perhaps 100.


That was a test code to explain why I don't get enough models. Of course the numbers I use are much higher.


                a.loop.starting_model = 1           # First loop model
                a.loop.ending_model   = 5          # Last loop model

The .IL files are initial (unoptimized) loops, so they are of little utility. But there should be many more loop (.BL) models generated. The log file will tell you why a particular model optimization failed.

 
Indeed I have 9 messages like this:

target.BL00010001.pdb     check_inf__E> Atom 1 has out-of-range coordinates (usually infinity).
The objective function can thus not be calculated.
 
2) I 'd like to ask your opinion about the most effective way to find a
near-native protein conformation in low sequence identity levels. How
should the parameters shown above be set? I don't care if it's running a
day or so as long as I get good results.

Build more models - that's the most effective way.


You mean without loop optimization? From your experience what values should be assigned to the following parameters:

# Normal VTFM model optimization:
a.library_schedule = autosched.normal
a.max_var_iterations = 200 # 200 by default
# Very thorough MD model optimization:
a.md_level = refine.slow
a.repeat_optimization = 1
a.loop.md_level       = refine.slow # Loop model refinement level