JAL-860 fixed grammar for one structure vs many structures associated with selection
authorjprocter <jprocter@compbio.dundee.ac.uk>
Thu, 15 Sep 2011 13:16:51 +0000 (14:16 +0100)
committerjprocter <jprocter@compbio.dundee.ac.uk>
Thu, 15 Sep 2011 13:16:51 +0000 (14:16 +0100)
help/html/features/viewingpdbs.html
src/jalview/gui/PopupMenu.java

index 679f353..e9f28d5 100755 (executable)
@@ -38,22 +38,23 @@ structure is selected, one of the following will happen:</p>
 
        <li>If the structure is already shown, then you will be prompted
        to associate the sequence with an existing view of the selected
-       structure.</li>
+       structure. This is useful when working with multi-domain or multi-chain PDB files.</li>
 
        <li style="list-style: none">See the <a href="jmol.html">Jmol
        PDB viewer</a> help page for more information about the display.</li>
 </ul>
-
        <p>
-               Additionally, if several of the sequences in the currently selected
-               region of the alignment have associated structures, then Jalview will
-               provide a 'View <em>X</em> structures' entry in the submenu. This
-               option will open a new Jmol view containing all the structures
-               available for all selected sequences, superimposed using the currently
-               selected region of the alignment. (<em>This capability was added
-                       in Jalview 2.7</em>)
+               <em>Opening structures associated with the current selection</em><br />
+               If one or more of the sequences in the alignment are selected, then
+               the Structure submenu of the <a href="../menus/popupMenu.html">Sequence
+                       ID popup menu</a> will contain will include either a 'View all <em>X</em>
+               structures' entry in the submenu or a 'View structure for <em>Sequence</em>'
+               entry. Both these options will open a new Jmol view containing one, or
+               all the structures available for all selected sequences, superimposed
+               using the currently selected region of the alignment. (<em>This
+                       capability was added in Jalview 2.7</em>)
        </p>
-
+       <p><strong>Associating PDB files with Sequences</strong></p>
        <p>To associate PDB files with a sequence, right click on a sequence
 ID and select "Structure<strong>&rarr;</strong> Associate Structure with
 Sequence", and one of the submenus:</p>
@@ -69,9 +70,8 @@ Sequence", and one of the submenus:</p>
        EBI, to fetch the PDB file with the entered Id.<br>
        </li>
 
-       <li>Discover PDB Ids - Jalview uses WSDBFetch, provided by the
-       EBI, to discover PDB ids for all the sequences in the alignment which
-       have valid Uniprot names / accession ids.</li>
+       <li>Discover PDB Ids - Jalview uses the sequence's ID to query WSDBFetch, provided by the
+       EBI, and any enabled DAS servers, to discover PDB ids associated with the sequence.</li>
 </ul>
 
 <p><strong>Importing PDB Entries or files in PDB format</strong><br>
index ca6b199..d778125 100644 (file)
@@ -391,6 +391,7 @@ public class PopupMenu extends JPopupMenu
       }
       // Add a 'show all structures' for the current selection
       Hashtable<String, PDBEntry> pdbe=new Hashtable<String,PDBEntry>();
+      SequenceI sqass=null;
       for (SequenceI sq: ap.av.getSequenceSelection())
       {
         Vector<PDBEntry> pes = (Vector<PDBEntry>) sq.getDatasetSequence().getPDBId();
@@ -398,6 +399,10 @@ public class PopupMenu extends JPopupMenu
           for (PDBEntry pe: pes)
           {
             pdbe.put(pe.getId(),  pe);
+            if (sqass==null)
+            {
+              sqass = sq;
+            }
           }
         }
       }
@@ -405,7 +410,12 @@ public class PopupMenu extends JPopupMenu
       {
         final PDBEntry[] pe = pdbe.values().toArray(new PDBEntry[pdbe.size()]);
         final JMenuItem gpdbview;
-        structureMenu.add(gpdbview=new JMenuItem("View "+pdbe.size()+" structures."));
+        if (pdbe.size()==1)
+        {
+          structureMenu.add(gpdbview=new JMenuItem("View structure for "+sqass.getDisplayId(false)));
+        } else {
+          structureMenu.add(gpdbview=new JMenuItem("View all "+pdbe.size()+" structures."));
+        }
         gpdbview.setToolTipText("Open a new Jmol view with all structures associated with the current selection and superimpose them using the alignment.");
         gpdbview.addActionListener(new ActionListener()
         {