+ return viewStructures(pdb, seqsForPdb, ap, null);
+ }
+
+ public JalviewStructureDisplayI viewStructures(PDBEntry pdb,
+ SequenceI[] seqsForPdb, AlignmentPanel ap, ViewerType viewerType)
+ {
+ if (sview != null)
+ {
+ sview.setAlignAddedStructures(superposeAdded);
+ String pdbId = pdb.getId();
+ if (!sview.addAlreadyLoadedFile(seqsForPdb, null, ap, pdbId))
+ {
+ sview.addToExistingViewer(pdb, seqsForPdb, null, ap, pdbId);
+ }
+ sview.updateTitleAndMenus();
+ sview.raiseViewer();
+ return sview;
+ }
+ if (viewerType == null)
+ viewerType = getViewerType();
+ if (viewerType.equals(ViewerType.JMOL))
+ {
+ sview = new AppJmol(pdb, seqsForPdb, null, ap);
+ }
+ else if (viewerType.equals(ViewerType.CHIMERA))
+ {
+ sview = new ChimeraViewFrame(pdb, seqsForPdb, null, ap);
+ }
+ else if (viewerType.equals(ViewerType.CHIMERAX))
+ {
+ sview = new ChimeraXViewFrame(pdb, seqsForPdb, null, ap);
+ }
+ else if (viewerType.equals(ViewerType.PYMOL))
+ {
+ sview = new PymolViewer(pdb, seqsForPdb, null, ap);
+ }
+ else
+ {
+ Console.error(UNKNOWN_VIEWER_TYPE + getViewerType().toString());
+ }
+ return sview;