From: James Procter Date: Sun, 14 Jan 2024 15:05:10 +0000 (+0000) Subject: JAL-4366 JAL-4371 tighten up detection of chain code and allow two-character codes... X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=f93f2777f3fa13f1f48cb754f97169378c7a8f90;p=jalview.git JAL-4366 JAL-4371 tighten up detection of chain code and allow two-character codes JAL-3947 --- diff --git a/src/jalview/struture/PDBEntryUtils.java b/src/jalview/struture/PDBEntryUtils.java index 08d192f..2d67434 100644 --- a/src/jalview/struture/PDBEntryUtils.java +++ b/src/jalview/struture/PDBEntryUtils.java @@ -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 inferPDBEntry(SequenceI seq) { @@ -145,6 +145,8 @@ public class PDBEntryUtils putativeEntry = pdbe; return putativeEntry; } + } else { + return pdbe; } } return null;