Revert "JAL-2164 JAL-1919 disabled and removed PDB file parser configuration option...
[jalview.git] / src / jalview / structure / StructureSelectionManager.java
index 7db85ff..c27289c 100644 (file)
@@ -384,8 +384,21 @@ public class StructureSelectionManager
     boolean isMapUsingSIFTs = SiftsSettings.isMapWithSifts();
     try
     {
+
+      boolean isParseWithJMOL = StructureImportSettings
+              .getDefaultPDBFileParser().equalsIgnoreCase(
+                      StructureImportSettings.StructureParser.JMOL_PARSER
+                              .toString());
+      if (isParseWithJMOL || (pdbFile != null && isCIFFile(pdbFile)))
+      {
         pdb = new jalview.ext.jmol.JmolParser(addTempFacAnnot, parseSecStr,
                 secStructServices, pdbFile, protocol);
+      }
+      else
+      {
+        pdb = new PDBfile(addTempFacAnnot, parseSecStr, secStructServices,
+                pdbFile, protocol);
+      }
 
       if (pdb.getId() != null && pdb.getId().trim().length() > 0
               && AppletFormatAdapter.FILE.equals(protocol))