X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fio%2FAppletFormatAdapter.java;h=9695891e566bad7f332692a2cf64e68d476e2110;hb=37de9310bec3501cbc6381e0c3dcb282fcaad812;hp=da7eb1da92673dad8d17848ba8fadaaaa760b99a;hpb=13bc8a3fb89b083922d9fa9dad5050e6aaa1f661;p=jalview.git diff --git a/src/jalview/io/AppletFormatAdapter.java b/src/jalview/io/AppletFormatAdapter.java index da7eb1d..9695891 100755 --- a/src/jalview/io/AppletFormatAdapter.java +++ b/src/jalview/io/AppletFormatAdapter.java @@ -27,6 +27,7 @@ import jalview.datamodel.AlignmentAnnotation; import jalview.datamodel.AlignmentI; import jalview.datamodel.AlignmentView; import jalview.datamodel.PDBEntry.Type; +import jalview.ext.jmol.JmolParser; import jalview.structure.StructureImportSettings; import jalview.util.MessageManager; @@ -279,20 +280,34 @@ public class AppletFormatAdapter } else if (format.equals("PDB")) { - + // TODO obtain config value from preference settings. + // Set value to 'true' to test PDB processing with Jmol: JAL-1213 + boolean isParseWithJMOL = StructureImportSettings + .getDefaultPDBFileParser().equalsIgnoreCase( + StructureImportSettings.StructureParser.JMOL_PARSER + .toString()); + if (isParseWithJMOL) + { + StructureImportSettings.addSettings(annotFromStructure, + localSecondaryStruct, serviceSecondaryStruct); + alignFile = new jalview.ext.jmol.JmolParser(inFile, type); + } + else + { StructureImportSettings.addSettings(annotFromStructure, localSecondaryStruct, serviceSecondaryStruct); - alignFile = new jalview.ext.jmol.JmolParser(annotFromStructure, + StructureImportSettings.setShowSeqFeatures(true); + alignFile = new MCview.PDBfile(annotFromStructure, localSecondaryStruct, serviceSecondaryStruct, inFile, type); + } ((StructureFile) alignFile).setDbRefType(format); } else if (format.equalsIgnoreCase("mmCIF")) { StructureImportSettings.addSettings(annotFromStructure, localSecondaryStruct, serviceSecondaryStruct); - alignFile = new jalview.ext.jmol.JmolParser(annotFromStructure, - localSecondaryStruct, serviceSecondaryStruct, inFile, type); + alignFile = new jalview.ext.jmol.JmolParser(inFile, type); ((StructureFile) alignFile).setDbRefType(format); } else if (format.equals("STH")) @@ -426,8 +441,7 @@ public class AppletFormatAdapter { StructureImportSettings.addSettings(annotFromStructure, localSecondaryStruct, serviceSecondaryStruct); - alignFile = new jalview.ext.jmol.JmolParser(annotFromStructure, - localSecondaryStruct, serviceSecondaryStruct, source); + alignFile = new JmolParser(source); } else { @@ -441,8 +455,7 @@ public class AppletFormatAdapter { StructureImportSettings.addSettings(annotFromStructure, localSecondaryStruct, serviceSecondaryStruct); - alignFile = new jalview.ext.jmol.JmolParser(annotFromStructure, - localSecondaryStruct, serviceSecondaryStruct, source); + alignFile = new JmolParser(source); ((StructureFile) alignFile).setDbRefType(Type.MMCIF); } else if (format.equals("STH"))