From: Jim Procter Date: Wed, 14 Sep 2016 18:58:04 +0000 (+0100) Subject: JAL-2164 create RESNUM features with padding the same as for pre 2.10 features X-Git-Tag: Release_2_10_0~41^2~6 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=bdeec1956a01efb7fdc6100961c6fb596c93404e;p=jalview.git JAL-2164 create RESNUM features with padding the same as for pre 2.10 features --- diff --git a/src/jalview/ext/jmol/JmolParser.java b/src/jalview/ext/jmol/JmolParser.java index 7836d24..ddb4492 100644 --- a/src/jalview/ext/jmol/JmolParser.java +++ b/src/jalview/ext/jmol/JmolParser.java @@ -28,6 +28,7 @@ import jalview.io.FileParse; import jalview.io.StructureFile; import jalview.schemes.ResidueProperties; import jalview.structure.StructureImportSettings; +import jalview.util.Format; import jalview.util.MessageManager; import java.io.IOException; @@ -230,8 +231,8 @@ public class JmolParser extends StructureFile implements JmolStatusListener curAtom.resNumber = atom.getResno(); curAtom.occupancy = ms.occupancies != null ? ms.occupancies[atom .getIndex()] : Float.valueOf(atom.getOccupancy100()); - curAtom.resNumIns = ("" + curAtom.resNumber + curAtom.insCode) - .trim(); + String fmt = new Format("%4i").form(curAtom.resNumber); + curAtom.resNumIns = (fmt + curAtom.insCode); curAtom.tfactor = atom.getBfactor100() / 100f; curAtom.type = 0; // significantAtoms.add(curAtom);