X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fstructure%2FStructureSelectionManager.java;h=cd986c0550cecca569f19e213f22cd26e3aacbbc;hb=32d1b850ae63a01a6b3fae305d9577ac16552515;hp=cdb4e0a2079126d1d7995ef75d4f831fe0bab00d;hpb=d156987a513b1da92fd6fbf7678b4a8e7ffc8d08;p=jalview.git diff --git a/src/jalview/structure/StructureSelectionManager.java b/src/jalview/structure/StructureSelectionManager.java index cdb4e0a..cd986c0 100644 --- a/src/jalview/structure/StructureSelectionManager.java +++ b/src/jalview/structure/StructureSelectionManager.java @@ -398,8 +398,11 @@ public class StructureSelectionManager { // FIXME if sourceType is not null, we've lost data here sourceType = AppletFormatAdapter.checkProtocol(pdbFile); - pdb = new JmolParser(pdbFile, sourceType); - + pdb = new JmolParser(false, pdbFile, sourceType); + pdb.addSettings(parseSecStr && processSecondaryStructure, + parseSecStr && addTempFacAnnot, + parseSecStr && secStructServices); + pdb.doParse(); if (pdb.getId() != null && pdb.getId().trim().length() > 0 && DataSourceType.FILE == sourceType) { @@ -573,6 +576,13 @@ public class StructureSelectionManager { System.err.println(e.getMessage()); } + catch (Exception e) + { + System.err + .println( + "Unexpected exception during SIFTS mapping - falling back to NW for this sequence/structure pair"); + System.err.println(e.getMessage()); + } } if (!foundSiftsMappings.isEmpty()) { @@ -606,7 +616,10 @@ public class StructureSelectionManager } if (forStructureView) { - mappings.addAll(seqToStrucMapping); + for (StructureMapping sm : seqToStrucMapping) + { + addStructureMapping(sm); // not addAll! + } } if (progress != null) { @@ -658,7 +671,10 @@ public class StructureSelectionManager public void addStructureMapping(StructureMapping sm) { - mappings.add(sm); + if (!mappings.contains(sm)) + { + mappings.add(sm); + } } /**