X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fext%2Fjmol%2FJmolParser.java;fp=src%2Fjalview%2Fext%2Fjmol%2FJmolParser.java;h=a9c5f5cb74e1d02cfbf98fc88df835c5bdd46479;hb=8a43b8353b89a47002ef17c959ed61281fc4d826;hp=2a510a25efda224b038ecc9cc470b9de91698558;hpb=55bfdb07355198ae1a1a8b5e14933b4669113ca6;p=jalview.git diff --git a/src/jalview/ext/jmol/JmolParser.java b/src/jalview/ext/jmol/JmolParser.java index 2a510a2..a9c5f5c 100644 --- a/src/jalview/ext/jmol/JmolParser.java +++ b/src/jalview/ext/jmol/JmolParser.java @@ -45,9 +45,9 @@ import org.jmol.c.STR; import org.jmol.modelset.ModelSet; import org.jmol.viewer.Viewer; -import MCview.Atom; -import MCview.PDBChain; -import MCview.Residue; +import mc_view.Atom; +import mc_view.PDBChain; +import mc_view.Residue; /** * Import and process files with Jmol for file like PDB, mmCIF @@ -59,13 +59,14 @@ public class JmolParser extends StructureFile implements JmolStatusListener { Viewer viewer = null; - public JmolParser(boolean immediate, String inFile, + public JmolParser(boolean immediate, Object inFile, DataSourceType sourceType) throws IOException { + // BH 2018 File or String for filename super(immediate, inFile, sourceType); } - public JmolParser(String inFile, DataSourceType sourceType) + public JmolParser(Object inFile, DataSourceType sourceType) throws IOException { super(inFile, sourceType); @@ -133,8 +134,8 @@ public class JmolParser extends StructureFile implements JmolStatusListener * params -o (output to sysout) -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); + + viewer = JalviewJmolBinding.getJmolData(this); // ensure the 'new' (DSSP) not 'old' (Ramachandran) SS method is used viewer.setBooleanProperty("defaultStructureDSSP", true); } catch (ClassCastException x) @@ -171,16 +172,16 @@ public class JmolParser extends StructureFile implements JmolStatusListener List significantAtoms = convertSignificantAtoms(ms); for (Atom tmpatom : significantAtoms) { - try + if (tmpatom.resNumIns.trim().equals(lastID)) + { + // phosphorylated protein - seen both CA and P.. + continue; + } + tmpchain = findChain(tmpatom.chain); + if (tmpchain != null) { - tmpchain = findChain(tmpatom.chain); - if (tmpatom.resNumIns.trim().equals(lastID)) - { - // phosphorylated protein - seen both CA and P.. - continue; - } tmpchain.atoms.addElement(tmpatom); - } catch (Exception e) + } else { tmpchain = new PDBChain(getId(), tmpatom.chain); getChains().add(tmpchain);