From: tcofoegbu Date: Wed, 31 Aug 2016 13:18:53 +0000 (+0100) Subject: JAL-2148 further enhancment to CA HETATM processing X-Git-Tag: Release_2_10_0~60^2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=43522cd06017137882e382baad33cbeef02bbbe9;p=jalview.git JAL-2148 further enhancment to CA HETATM processing --- diff --git a/src/jalview/ext/jmol/JmolParser.java b/src/jalview/ext/jmol/JmolParser.java index 848e7db..7c3ff42 100644 --- a/src/jalview/ext/jmol/JmolParser.java +++ b/src/jalview/ext/jmol/JmolParser.java @@ -257,6 +257,10 @@ public class JmolParser extends StructureFile implements JmolStatusListener // diff < 5 then mark as valid and update termination Atom if (chainTerMap.containsKey(curAtomChId)) { + if (curAtom.getResno() < chainTerMap.get(curAtomChId).getResno()) + { + return false; + } if ((curAtom.getResno() - chainTerMap.get(curAtomChId).getResno()) < 5) { chainTerMap.put(curAtomChId, curAtom); @@ -268,6 +272,10 @@ public class JmolParser extends StructureFile implements JmolStatusListener // atom with previously terminated chain encountered else if (chainTerMap.containsKey(curAtomChId)) { + if (curAtom.getResno() < chainTerMap.get(curAtomChId).getResno()) + { + return false; + } if ((curAtom.getResno() - chainTerMap.get(curAtomChId).getResno()) < 5) { chainTerMap.put(curAtomChId, curAtom);