From: Jim Procter Date: Mon, 16 Oct 2017 14:04:57 +0000 (+0100) Subject: JAL-2777 patch for whitespace chain X-Git-Tag: Release_2_10_3b1~107^2~1 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=d5c825f47c13faafe6330906ae31fe2ad78bb22f;p=jalview.git JAL-2777 patch for whitespace chain --- diff --git a/src/jalview/ext/rbvi/chimera/AtomSpecModel.java b/src/jalview/ext/rbvi/chimera/AtomSpecModel.java index f923f7f..39d6704 100644 --- a/src/jalview/ext/rbvi/chimera/AtomSpecModel.java +++ b/src/jalview/ext/rbvi/chimera/AtomSpecModel.java @@ -120,7 +120,7 @@ public class AtomSpecModel for (String chain : modelData.keySet()) { - chain = chain.trim(); + chain = " ".equals(chain) ? chain : chain.trim(); List rangeList = modelData.get(chain); @@ -192,9 +192,10 @@ public class AtomSpecModel { sb.append(start).append("-").append(end); } - if (chain.length() > 0) - { - sb.append(".").append(chain); + + sb.append("."); + if (!" ".equals(chain)) { + sb.append(chain); } } }