JAL-674 avoid writing \0 for chain code
authorJim Procter <jprocter@dundee.ac.uk>
Thu, 27 Nov 2014 14:56:35 +0000 (14:56 +0000)
committerJim Procter <jprocter@dundee.ac.uk>
Thu, 27 Nov 2014 14:56:35 +0000 (14:56 +0000)
src/jalview/ext/jmol/PDBFileWithJmol.java
src/jalview/gui/Jalview2XML.java

index f5710d3..92dce36 100644 (file)
@@ -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);
index b608b95..d56a0dd 100644 (file)
@@ -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
                     + "");