From 43522cd06017137882e382baad33cbeef02bbbe9 Mon Sep 17 00:00:00 2001 From: tcofoegbu Date: Wed, 31 Aug 2016 14:18:53 +0100 Subject: [PATCH] JAL-2148 further enhancment to CA HETATM processing --- src/jalview/ext/jmol/JmolParser.java | 8 ++++++++ 1 file changed, 8 insertions(+) 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); -- 1.7.10.2