From ba6e54f9d8d110a2babb5a39ba6781c704521b4e Mon Sep 17 00:00:00 2001
From: Gabriel Studer <gabriel.studer@unibas.ch>
Date: Wed, 23 Dec 2015 09:53:40 +0100
Subject: [PATCH] bugfix

---
 modules/mol/mm/src/modeller.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/mol/mm/src/modeller.cc b/modules/mol/mm/src/modeller.cc
index 808d86345..1a9da3094 100644
--- a/modules/mol/mm/src/modeller.cc
+++ b/modules/mol/mm/src/modeller.cc
@@ -36,7 +36,7 @@ bool BoundToSG(const ost::mol::AtomHandle& atom){
   ost::mol::AtomHandleList bound_atoms = atom.GetBondPartners();
   for(ost::mol::AtomHandleList::iterator i = bound_atoms.begin();
       i != bound_atoms.end(); ++i){
-    if(i->GetResidue() != atom.GetResidue()) continue;
+    if(i->GetResidue() == atom.GetResidue()) continue;
     if(i->GetName() != "SG") continue;
     if(IsCysteine(i->GetResidue())) return true;
   }
-- 
GitLab