Dear MODELLER users!

 I am currently doing a homology modeling project, in which salt bridges are important. Therefore I want to make the most out of the refinement protocol (of course I will do some final refinement with other softwares), especially with molecular dynamics. I intend to use and slightly modify the automodel protocols, but I ran into some problems because of my limited python knowledge. My two questions are: the molecular dynamics refinement returns the final structure from each simulation, but I want it to return the ones with minimal energy (md_return='MINIMAL'), how could I specify it in my script while still using the standard automodel protocols (e.g. with md_level = refine.slow). My other question is that how could I also specify in my script to create a CHARMM trajectory of the automodel MD refinement steps(I tried it with automodel.get_refine_actions(), but I failed to define it properly because of my mentioned lack of python knowledge)?

Thank you for your help in advance!

 Best regards,
 Gergely Banoczi

 My script is:

MODELING SCRIPT


from modeller import *
from modeller.automodel import *   
from modeller.parallel import *
from mymodel import mymodel

j = job()
j.append(local_slave())
j.append(local_slave())
j.append(local_slave())
j.append(local_slave())
j.append(local_slave())
j.append(local_slave())
j.append(local_slave())
j.append(local_slave())

log.very_verbose()
env = environ()
env.io.atom_files_directory = ['.', '../atom_files']
env.io.hetatm = True
env.io.water = True

a = mymodel(env,deviation=0,
            alnfile  = 'xyz.ali' ,   
            knowns   = ('xyz','zxy') ,
            sequence = 'PcPAL', assess_methods=(assess.DOPE, assess.GA341))      
 
a.starting_model= 1                
a.ending_model  = 8
a.md_level = refine.slow
                                  
a.use_parallel_job(j)
a.make()



CLASS DEFINING SCRIPT



from modeller import *
from modeller.automodel import *   

class mymodel(automodel):
def special_patches(self, aln):
         self.rename_segments(segment_ids=['A', 'B', 'C', 'D'], renumber_residues=[25, 25, 25, 25])
        def special_restraints(self, aln):
rsr = self.restraints
at = self.atoms
s1 = selection(self.chains['A']).only_atom_types('CA')
s2 = selection(self.chains['B']).only_atom_types('CA')
s3 = selection(self.chains['C']).only_atom_types('CA')
s4 = selection(self.chains['D']).only_atom_types('CA')
rsr.symmetry.append(symmetry(s1, s2, 1.0))
rsr.symmetry.append(symmetry(s2, s3, 1.0))
rsr.symmetry.append(symmetry(s3, s4, 1.0))

def user_after_single_model(self): self.restraints.symmetry.report(1.0)