From 7678327cf1277b622a4a0b88c5266586365d4a74 Mon Sep 17 00:00:00 2001
From: Valerio Mariani <valerio.mariani@unibas.ch>
Date: Mon, 4 Feb 2013 13:46:34 +0100
Subject: [PATCH] Fixed removal of terminal OXT oxygens when removing
 non-standard residues

---
 tools/molck/main.cc | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)

diff --git a/tools/molck/main.cc b/tools/molck/main.cc
index 6b896ac68..94e5a97f5 100644
--- a/tools/molck/main.cc
+++ b/tools/molck/main.cc
@@ -289,6 +289,7 @@ int main(int argc, char *argv[])
       }
       std::cerr << " --> removed " << hremoved << " hydrogen atoms" << std::endl;
     }
+    
     if (rm_oxt_atoms) {
       std::cerr << "removing OXT atoms" << std::endl;
       int oremoved=0;
@@ -302,19 +303,6 @@ int main(int argc, char *argv[])
       std::cerr << " --> removed " << oremoved << " OXT atoms" << std::endl;
     }
 
-    if (rm_non_std) {
-      std::cerr << "removing OXT atoms" << std::endl;
-      int oremoved=0;
-      AtomHandleList atoms=ent.GetAtomList();
-      for (AtomHandleList::const_iterator i=atoms.begin(), e=atoms.end(); i!=e; ++i) {
-         if (i->GetName()=="OXT") {
-           edi.DeleteAtom(*i);
-           oremoved++;   
-         }
-      }
-      std::cerr << " --> removed " << oremoved << " OXT atoms" << std::endl;
-    }
-
     checker.CheckForCompleteness();
     checker.CheckForUnknownAtoms();
     checker.CheckForNonStandard();
@@ -339,6 +327,7 @@ int main(int argc, char *argv[])
       }
       std::cerr << std::endl;
     }
+    
     if (assign_elem)  {
       ChainHandleList chains=ent.GetChainList();
       for (ChainHandleList::const_iterator c=chains.begin();c!=chains.end();++c) {
-- 
GitLab