From: gmungoc Date: Fri, 29 Nov 2019 13:16:43 +0000 (+0000) Subject: JAL-3489 ensure all chains mapped when loading local multimeric PDB file X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=4ffa5161216adc501b127408f1596f507b9c7b92;p=jalview.git JAL-3489 ensure all chains mapped when loading local multimeric PDB file --- diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index fcb6572..39123d5 100644 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -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 : " diff --git a/src/jalview/gui/AssociatePdbFileWithSeq.java b/src/jalview/gui/AssociatePdbFileWithSeq.java index fe0aedf..c68914c 100644 --- a/src/jalview/gui/AssociatePdbFileWithSeq.java +++ b/src/jalview/gui/AssociatePdbFileWithSeq.java @@ -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) { diff --git a/src/jalview/gui/StructureChooser.java b/src/jalview/gui/StructureChooser.java index ec2ebe3..0709dbb 100644 --- a/src/jalview/gui/StructureChooser.java +++ b/src/jalview/gui/StructureChooser.java @@ -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[]