From 846761e9e8ad292266a616df6e28f67fe130a53a Mon Sep 17 00:00:00 2001
From: Gabriel Studer <gabriel.studer@unibas.ch>
Date: Fri, 29 Jun 2018 11:56:19 +0200
Subject: [PATCH] Make reading of ANISOU record more permissive if hetatms are
 disabled

Hetatms are potentially skipped but if they come with an ANISOU record,
ost expects them to be there. As a solution we simply increase the
permissiveness as we already do it when having the calpha_only option
active.
---
 modules/io/src/mol/pdb_reader.cc | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/io/src/mol/pdb_reader.cc b/modules/io/src/mol/pdb_reader.cc
index ffa04e6ec..a0a5f3b4f 100644
--- a/modules/io/src/mol/pdb_reader.cc
+++ b/modules/io/src/mol/pdb_reader.cc
@@ -629,7 +629,9 @@ void PDBReader::ParseAnisou(const StringRef& line, int line_num,
   }
   String aname(atom_name.str());
   if (!curr_residue_.IsValid()) {
-    if (profile_.fault_tolerant || profile_.calpha_only) {
+    if (profile_.fault_tolerant || 
+        profile_.calpha_only || 
+        profile_.no_hetatms) {
       return;
     } 
     const char* fmt_str="invalid ANISOU record for inexistent atom on line %d";
@@ -639,6 +641,7 @@ void PDBReader::ParseAnisou(const StringRef& line, int line_num,
   if (!atom.IsValid()) {
     if (profile_.fault_tolerant ||
         profile_.calpha_only  ||
+        profile_.no_hetatms ||
         warned_name_mismatch_) {
       return;
     }
-- 
GitLab