From 029d1fe76782e1ed33388ebbf6040d69b87a40b8 Mon Sep 17 00:00:00 2001
From: Tobias Schmidt <tobias.schmidt@unibas.ch>
Date: Thu, 3 Feb 2011 14:37:28 +0100
Subject: [PATCH] read sdf files with minimalistic bond definitions (e.g. from
 rdkit)

---
 modules/io/src/mol/sdf_reader.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/io/src/mol/sdf_reader.cc b/modules/io/src/mol/sdf_reader.cc
index 347da9930..655ee8fa0 100644
--- a/modules/io/src/mol/sdf_reader.cc
+++ b/modules/io/src/mol/sdf_reader.cc
@@ -227,9 +227,9 @@ void SDFReader::ParseAndAddBond(const String& line, int line_num,
 
   LOG_TRACE( "line: [" << line << "]" );
 
-  if(line.length()<18 || line.length()>21) {
+  if(line.length()<9 || line.length()>21) {
     String msg="Bad bond line %d: Not correct number of characters on the"
-               " line: %i (should be between 18 and 21)";
+               " line: %i (should be between 9 and 21)";
     throw IOException(str(format(msg) % line_num % line.length()));
   }
 
-- 
GitLab