X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fext%2Fjmol%2FJmolParser.java;h=65b4b9627c1b09a30ed2af0149b15460db0f6fc3;hb=ab889432b2f2ebea75aca36e814efc42ab50b9ac;hp=7836d24404ddabe97c5e269b7c63564c5e57b4c5;hpb=3f12f4932226512316ec113e600695150431fd0a;p=jalview.git diff --git a/src/jalview/ext/jmol/JmolParser.java b/src/jalview/ext/jmol/JmolParser.java index 7836d24..65b4b96 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; @@ -60,15 +61,13 @@ public class JmolParser extends StructureFile implements JmolStatusListener { Viewer viewer = null; - public JmolParser(boolean addAlignmentAnnotations, boolean predictSecStr, - boolean externalSecStr, String inFile, String type) + public JmolParser(String inFile, String type) throws IOException { super(inFile, type); } - public JmolParser(boolean addAlignmentAnnotations, boolean predictSecStr, - boolean externalSecStr, FileParse fp) throws IOException + public JmolParser(FileParse fp) throws IOException { super(fp); } @@ -125,8 +124,13 @@ public class JmolParser extends StructureFile implements JmolStatusListener { try { + /* + * params -o (output to sysout) -i (no info logging, less verbose) + * -n (nodisplay) -x (exit when finished) + * see http://wiki.jmol.org/index.php/Jmol_Application + */ viewer = (Viewer) JmolViewer.allocateViewer(null, null, null, null, - null, "-x -o -n", this); + null, "-x -o -n -i", this); // ensure the 'new' (DSSP) not 'old' (Ramachandran) SS method is used viewer.setBooleanProperty("defaultStructureDSSP", true); } catch (ClassCastException x) @@ -230,8 +234,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);