JAL-4366 JAL-4371 tighten up detection of chain code and allow two-character codes...
[jalview.git] / src / jalview / struture / PDBEntryUtils.java
index 08d192f..2d67434 100644 (file)
@@ -61,7 +61,7 @@ public class PDBEntryUtils
     }
     return targetChainId;
   }
-  protected static Pattern id_and_chain=Pattern.compile("(\\d[0-9A-Za-z]{3})[_:]?(.+)*");
+  protected static Pattern id_and_chain=Pattern.compile("(\\d[0-9A-Za-z]{3})[_:|]?(.{1,2})?");
 
   public static List<PDBEntry> inferPDBEntry(SequenceI seq)
   {
@@ -145,6 +145,8 @@ public class PDBEntryUtils
           putativeEntry = pdbe;
           return putativeEntry;
         }
+      } else {
+        return pdbe;
       }
     }
     return null;