JAL-4366 JAL-4371 allow cruft after inferred pdb ids, ex 1xyz_A.pdb yields 1xyzA
[jalview.git] / src / jalview / struture / PDBEntryUtils.java
index 2d67434..131030c 100644 (file)
@@ -61,11 +61,12 @@ public class PDBEntryUtils
     }
     return targetChainId;
   }
-  protected static Pattern id_and_chain=Pattern.compile("(\\d[0-9A-Za-z]{3})[_:|]?(.{1,2})?");
+  protected static Pattern id_and_chain=Pattern.compile("(\\d[0-9A-Za-z]{3})[_:|]?([0-9A-Za-z]{1,2})?.*");
 
   public static List<PDBEntry> inferPDBEntry(SequenceI seq)
   {
     Matcher matcher = id_and_chain.matcher(seq.getName());
+    
     if (matcher.matches())
     {
       String id = matcher.group(1);