From 3f99da8e47b928b548b230ab0993ebe18a051593 Mon Sep 17 00:00:00 2001
From: Gerardo Tauriello <gerardo.tauriello@unibas.ch>
Date: Fri, 13 May 2016 17:58:34 +0200
Subject: [PATCH] SCHWED-882: fixed return value of MinimizeModelEnergy

---
 modelling/pymod/_pipeline.py | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/modelling/pymod/_pipeline.py b/modelling/pymod/_pipeline.py
index 0e9c1807..d1a6df7e 100644
--- a/modelling/pymod/_pipeline.py
+++ b/modelling/pymod/_pipeline.py
@@ -330,12 +330,11 @@ def MinimizeModelEnergy(mhandle, max_iterations=12, max_iter_sd=20,
             break
 
     # update model
-    simulation_ent = sim.GetEntity()
-    mhandle.model = mol.CreateEntityFromView(\
-                            simulation_ent.Select("peptide=true and ele!=H"),
-                            True)
+    simulation_ent = _GetSimEntity(sim)
+    mhandle.model = mol.CreateEntityFromView(simulation_ent.Select("ele!=H"),
+                                             True)
     # return model with hydrogens
-    return mol.CreateEntityFromView(simulation_ent.Select("peptide=true"), True)
+    return simulation_ent
 
 def CheckFinalModel(mhandle):
     '''Performs samity checks on final models and reports problems.
-- 
GitLab