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 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
{
Viewer viewer = null;
- public JmolParser(String inFile, DataSourceType sourceType)
+ public JmolParser(boolean immediate, Object inFile,
+ DataSourceType sourceType) throws IOException
+ {
+ // BH 2018 File or String for filename
+ super(immediate, inFile, sourceType);
+ }
+
+ public JmolParser(Object inFile, DataSourceType sourceType)
throws IOException
{
super(inFile, sourceType);
* 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)
List<Atom> 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);
}
lastID = tmpatom.resNumIns.trim();
}
- xferSettings();
+ if (isParseImmediately())
+ {
+ // configure parsing settings from the static singleton
+ xferSettings();
+ }
makeResidueList();
makeCaBondList();
prot.add(chainseq);
}
- if (StructureImportSettings.isProcessSecondaryStructure())
+ // look at local setting for adding secondary tructure
+ if (predictSecondaryStructure)
{
createAnnotation(chainseq, chain, ms.at);
}