From f8cde294a098c1f729b8c7e95c7e238a17cd0581 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Thu, 27 Nov 2014 14:56:35 +0000 Subject: [PATCH] JAL-674 avoid writing \0 for chain code --- src/jalview/ext/jmol/PDBFileWithJmol.java | 5 ++++- src/jalview/gui/Jalview2XML.java | 3 +-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/jalview/ext/jmol/PDBFileWithJmol.java b/src/jalview/ext/jmol/PDBFileWithJmol.java index f5710d3..92dce36 100644 --- a/src/jalview/ext/jmol/PDBFileWithJmol.java +++ b/src/jalview/ext/jmol/PDBFileWithJmol.java @@ -188,7 +188,10 @@ public class PDBFileWithJmol extends AlignFile implements { String mt = model.getModelTitle() == null ? getDataName() : model.getModelTitle(); - mt += _lastChainId; + if (_lastChainId >= ' ') + { + mt += _lastChainId; + } AlignmentAnnotation ann = new AlignmentAnnotation( "Secondary Structure", "Secondary Structure for " + mt, asecstr); diff --git a/src/jalview/gui/Jalview2XML.java b/src/jalview/gui/Jalview2XML.java index b608b95..d56a0dd 100644 --- a/src/jalview/gui/Jalview2XML.java +++ b/src/jalview/gui/Jalview2XML.java @@ -1456,8 +1456,7 @@ public class Jalview2XML } ae.setPosition(a); - if (aa[i].annotations[a].secondaryStructure != ' ' - && aa[i].annotations[a].secondaryStructure != '\0') + if (aa[i].annotations[a].secondaryStructure > ' ') { ae.setSecondaryStructure(aa[i].annotations[a].secondaryStructure + ""); -- 1.7.10.2