JAL-3489 ensure all chains mapped when loading local multimeric PDB file bug/JAL-3489mapChainsFromFile
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Fri, 29 Nov 2019 13:16:43 +0000 (13:16 +0000)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Fri, 29 Nov 2019 13:16:43 +0000 (13:16 +0000)
src/jalview/gui/AlignFrame.java
src/jalview/gui/AssociatePdbFileWithSeq.java
src/jalview/gui/StructureChooser.java

index fcb6572..39123d5 100644 (file)
@@ -4519,7 +4519,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
                     PDBEntry pe = new AssociatePdbFileWithSeq()
                             .associatePdbWithSeq((String) fm[0],
                                     (DataSourceType) fm[1], toassoc, false,
-                                    Desktop.instance);
+                                    Desktop.instance, false);
                     if (pe != null)
                     {
                       System.err.println("Associated file : "
index fe0aedf..c68914c 100644 (file)
@@ -28,8 +28,6 @@ import jalview.io.StructureFile;
 import jalview.structure.StructureSelectionManager;
 import jalview.util.MessageManager;
 
-import javax.swing.JOptionPane;
-
 /**
  * GUI related routines for associating PDB files with sequences
  * 
@@ -40,19 +38,24 @@ public class AssociatePdbFileWithSeq
 {
 
   /**
-   * assocate the given PDB file with
+   * Associates the given file as a PDB structure for the given sequence.
    * 
    * @param choice
+   * @param file
    * @param sequence
+   * @param prompt
+   * @param ssmp
+   * @param forViewer
+   * @return
    */
   public PDBEntry associatePdbWithSeq(String choice, DataSourceType file,
           SequenceI sequence, boolean prompt,
-          StructureSelectionManagerProvider ssmp)
+          StructureSelectionManagerProvider ssmp, boolean forViewer)
   {
     PDBEntry entry = new PDBEntry();
     StructureFile pdbfile = null;
     pdbfile = StructureSelectionManager.getStructureSelectionManager(ssmp)
-            .setMapping(false, new SequenceI[]
+            .setMapping(forViewer, new SequenceI[]
             { sequence }, null, choice, file);
     if (pdbfile == null)
     {
index ec2ebe3..0709dbb 100644 (file)
@@ -1004,7 +1004,7 @@ public class StructureChooser extends GStructureChooser
           PDBEntry fileEntry = new AssociatePdbFileWithSeq()
                   .associatePdbWithSeq(selectedPdbFileName,
                           DataSourceType.FILE, selectedSequence, true,
-                          Desktop.instance);
+                          Desktop.instance, true);
 
           sViewer = launchStructureViewer(
                   ssm, new PDBEntry[]