From 21862098dbd2177c4f56be974f34f3469f5437e8 Mon Sep 17 00:00:00 2001
From: Stefan Bienert <stefan.bienert@unibas.ch>
Date: Thu, 12 Apr 2018 13:37:06 +0200
Subject: [PATCH] Fixed loading from mmCIF file, secondary structure stays
 unchanged

---
 CHANGELOG.txt                      |  6 ++++++
 modules/io/src/mol/mmcif_reader.cc | 21 ++-------------------
 2 files changed, 8 insertions(+), 19 deletions(-)

diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 45ebdf60c..4eb6a634d 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,3 +1,9 @@
+Changes in Release <RELEASE NUMBER>
+--------------------------------------------------------------------------------
+  * Removed habit of changing secondary structure of entities when loading
+    from mmCIF files. Before, OST would turn secondary structure 'EEH' into
+    'ECH' to make it look nicer in DNG. Now, 'EEH' stays 'EEH'.
+
 Changes in Release 1.7.1
 --------------------------------------------------------------------------------
 
diff --git a/modules/io/src/mol/mmcif_reader.cc b/modules/io/src/mol/mmcif_reader.cc
index 27a7c9bc8..905e28442 100644
--- a/modules/io/src/mol/mmcif_reader.cc
+++ b/modules/io/src/mol/mmcif_reader.cc
@@ -1543,17 +1543,7 @@ void MMCifReader::AssignSecStructure(mol::EntityHandle ent)
       continue;
     }
     mol::SecStructure alpha(mol::SecStructure::ALPHA_HELIX);
-    // some PDB files contain helix/strand entries that are adjacent to each 
-    // other. To avoid visual artifacts, we effectively shorten the first of
-    // the two secondary structure segments to insert one residue of coil 
-    // conformation.
-    mol::ResNum start = i->start, end = i->end;
-    if (helix_list_.end() != i+1 && // unit test
-        (*(i+1)).start.GetNum() <= end.GetNum()+1 &&
-        (*(i+1)).end.GetNum() > end.GetNum()) {
-      end = mol::ResNum((*(i+1)).start.GetNum()-2);
-    }
-    chain.AssignSecondaryStructure(alpha, start, end);
+    chain.AssignSecondaryStructure(alpha, i->start, i->end);
   }
 
   for (MMCifHSVector::const_iterator i=strand_list_.begin(),
@@ -1565,14 +1555,7 @@ void MMCifReader::AssignSecStructure(mol::EntityHandle ent)
       continue;
     }
     mol::SecStructure extended(mol::SecStructure::EXTENDED);
-    mol::ResNum start = i->start, end = i->end;
-    // see comment for helix assignment
-    if (strand_list_.end() != i+1 && // unit test
-        (*(i+1)).start.GetNum() <= end.GetNum()+1 &&
-        (*(i+1)).end.GetNum() > end.GetNum()) {
-      end=mol::ResNum((*(i+1)).start.GetNum()-2);
-    }
-    chain.AssignSecondaryStructure(extended, start, end);
+    chain.AssignSecondaryStructure(extended, i->start, i->end);
   }
 }
 
-- 
GitLab