Skip to content
Snippets Groups Projects
Commit df7df159 authored by Gerardo Tauriello's avatar Gerardo Tauriello
Browse files

SCHWED-4334: fix gap handling in MM to allow reporting later.

parent e97a8222
No related branches found
No related tags found
No related merge requests found
......@@ -371,8 +371,11 @@ def MinimizeModelEnergy(mhandle, max_iterations=12, max_iter_sd=20,
# update model
simulation_ent = _GetSimEntity(sim)
mhandle.model = mol.CreateEntityFromView(simulation_ent.Select("ele!=H"),
True)
new_model = mol.CreateEntityFromView(simulation_ent.Select("ele!=H"), True)
# transfer gaps before overwriting model
for gap in mhandle.gaps:
gap.Transfer(new_model.FindChain(gap.GetChainName()))
mhandle.model = new_model
# return model with hydrogens
return simulation_ent
......
......@@ -390,12 +390,27 @@ class PipelineTests(unittest.TestCase):
# single chain
mhandle = self.getRawModel()
self.checkFinalModel(mhandle, exp_gaps=1, num_chains=1)
# repeat after sidechain reconstruction and MM
mhandle = self.getRawModel()
modelling.BuildSidechains(mhandle)
modelling.MinimizeModelEnergy(mhandle)
self.checkFinalModel(mhandle, exp_gaps=1, num_chains=1)
# homo-dimer
mhandle = self.getRawModelOligo("data/2aoh-1_cut")
self.checkFinalModel(mhandle, exp_gaps=2, num_chains=2)
# repeat after sidechain reconstruction and MM
mhandle = self.getRawModelOligo("data/2aoh-1_cut")
modelling.BuildSidechains(mhandle)
modelling.MinimizeModelEnergy(mhandle)
self.checkFinalModel(mhandle, exp_gaps=2, num_chains=2)
# hetero-dimer
mhandle = self.getRawModelOligo("data/5d52-1_cut")
self.checkFinalModel(mhandle, exp_gaps=2, num_chains=2)
# repeat after sidechain reconstruction and MM
mhandle = self.getRawModelOligo("data/5d52-1_cut")
modelling.BuildSidechains(mhandle)
modelling.MinimizeModelEnergy(mhandle)
self.checkFinalModel(mhandle, exp_gaps=2, num_chains=2)
def testCheckFinalModelRingPunches(self):
'''Check that we report models with ring punches.'''
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment