2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $$Year-Rel$$ The Jalview Authors
5 * This file is part of Jalview.
7 * Jalview is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation, either version 3
10 * of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 * The Jalview Authors are detailed in the 'AUTHORS' file.
23 import jalview.api.AlignmentViewPanel;
24 import jalview.bin.Cache;
25 import jalview.datamodel.AlignmentI;
26 import jalview.datamodel.PDBEntry;
27 import jalview.datamodel.SequenceI;
28 import jalview.gui.StructureViewer.ViewerType;
29 import jalview.gui.ViewSelectionMenu.ViewSetProvider;
30 import jalview.io.DataSourceType;
31 import jalview.io.JalviewFileChooser;
32 import jalview.io.JalviewFileView;
33 import jalview.jbgui.GStructureViewer;
34 import jalview.schemes.ColourSchemeI;
35 import jalview.schemes.ColourSchemes;
36 import jalview.structure.StructureMapping;
37 import jalview.structures.models.AAStructureBindingModel;
38 import jalview.util.MessageManager;
39 import jalview.ws.dbsources.Pdb;
41 import java.awt.Color;
42 import java.awt.Component;
43 import java.awt.event.ActionEvent;
44 import java.awt.event.ActionListener;
45 import java.awt.event.ItemEvent;
46 import java.awt.event.ItemListener;
47 import java.io.BufferedReader;
49 import java.io.FileOutputStream;
50 import java.io.FileReader;
51 import java.io.IOException;
52 import java.io.PrintWriter;
53 import java.util.ArrayList;
54 import java.util.List;
55 import java.util.Random;
56 import java.util.Vector;
58 import javax.swing.ButtonGroup;
59 import javax.swing.JCheckBoxMenuItem;
60 import javax.swing.JColorChooser;
61 import javax.swing.JMenu;
62 import javax.swing.JMenuItem;
63 import javax.swing.JRadioButtonMenuItem;
64 import javax.swing.event.MenuEvent;
65 import javax.swing.event.MenuListener;
68 * Base class with common functionality for JMol, Chimera or other structure
74 public abstract class StructureViewerBase extends GStructureViewer
75 implements Runnable, ViewSetProvider
78 * names for colour options (additional to Jalview colour schemes)
82 BySequence, ByChain, ChargeCysteine, ByViewer
86 * list of sequenceSet ids associated with the view
88 protected List<String> _aps = new ArrayList<>();
91 * list of alignment panels to use for superposition
93 protected Vector<AlignmentViewPanel> _alignwith = new Vector<>();
96 * list of alignment panels that are used for colouring structures by aligned
99 protected Vector<AlignmentViewPanel> _colourwith = new Vector<>();
101 private String viewId = null;
103 private AlignmentPanel ap;
105 protected boolean alignAddedStructures = false;
107 protected volatile boolean _started = false;
109 protected volatile boolean addingStructures = false;
111 protected Thread worker = null;
113 protected boolean allChainsSelected = false;
115 protected JMenu viewSelectionMenu;
118 * set after sequence colouring has been applied for this structure viewer.
119 * used to determine if the final sequence/structure mapping has been
122 protected volatile boolean seqColoursApplied = false;
124 private IProgressIndicator progressBar = null;
126 private Random random = new Random();
129 * Default constructor
131 public StructureViewerBase()
137 * @return true if added structures should be aligned to existing one(s)
140 public boolean isAlignAddedStructures()
142 return alignAddedStructures;
148 * if added structures should be aligned to existing one(s)
151 public void setAlignAddedStructures(boolean alignAdded)
153 alignAddedStructures = alignAdded;
159 * @return true if this Jmol instance is linked with the given alignPanel
161 public boolean isLinkedWith(AlignmentPanel ap2)
163 return _aps.contains(ap2.av.getSequenceSetId());
166 public boolean isUsedforaligment(AlignmentViewPanel ap2)
169 return (_alignwith != null) && _alignwith.contains(ap2);
173 public boolean isUsedForColourBy(AlignmentViewPanel ap2)
175 return (_colourwith != null) && _colourwith.contains(ap2);
180 * @return TRUE if the view is NOT being coloured by the alignment colours.
182 public boolean isColouredByViewer()
184 return !getBinding().isColourBySequence();
187 public String getViewId()
191 viewId = System.currentTimeMillis() + "." + this.hashCode();
196 protected void setViewId(String viewId)
198 this.viewId = viewId;
201 public abstract String getStateInfo();
203 protected void buildActionMenu()
205 if (_alignwith == null)
207 _alignwith = new Vector<>();
209 if (_alignwith.size() == 0 && ap != null)
214 for (Component c : viewerActionMenu.getMenuComponents())
216 if (c != alignStructs)
218 viewerActionMenu.remove((JMenuItem) c);
224 public AlignmentPanel getAlignmentPanel()
229 protected void setAlignmentPanel(AlignmentPanel alp)
235 public AlignmentPanel[] getAllAlignmentPanels()
237 AlignmentPanel[] t, list = new AlignmentPanel[0];
238 for (String setid : _aps)
240 AlignmentPanel[] panels = PaintRefresher.getAssociatedPanels(setid);
243 t = new AlignmentPanel[list.length + panels.length];
244 System.arraycopy(list, 0, t, 0, list.length);
245 System.arraycopy(panels, 0, t, list.length, panels.length);
254 * set the primary alignmentPanel reference and add another alignPanel to the
255 * list of ones to use for colouring and aligning
259 public void addAlignmentPanel(AlignmentPanel nap)
261 if (getAlignmentPanel() == null)
263 setAlignmentPanel(nap);
265 if (!_aps.contains(nap.av.getSequenceSetId()))
267 _aps.add(nap.av.getSequenceSetId());
272 * remove any references held to the given alignment panel
277 public void removeAlignmentPanel(AlignmentViewPanel nap)
281 _alignwith.remove(nap);
282 _colourwith.remove(nap);
283 if (getAlignmentPanel() == nap)
285 setAlignmentPanel(null);
286 for (AlignmentPanel aps : getAllAlignmentPanels())
290 setAlignmentPanel(aps);
295 } catch (Exception ex)
298 if (getAlignmentPanel() != null)
304 public void useAlignmentPanelForSuperposition(AlignmentPanel nap)
306 addAlignmentPanel(nap);
307 if (!_alignwith.contains(nap))
313 public void excludeAlignmentPanelForSuperposition(AlignmentPanel nap)
315 if (_alignwith.contains(nap))
317 _alignwith.remove(nap);
321 public void useAlignmentPanelForColourbyseq(AlignmentPanel nap,
322 boolean enableColourBySeq)
324 useAlignmentPanelForColourbyseq(nap);
325 getBinding().setColourBySequence(enableColourBySeq);
326 seqColour.setSelected(enableColourBySeq);
327 viewerColour.setSelected(!enableColourBySeq);
330 public void useAlignmentPanelForColourbyseq(AlignmentPanel nap)
332 addAlignmentPanel(nap);
333 if (!_colourwith.contains(nap))
335 _colourwith.add(nap);
339 public void excludeAlignmentPanelForColourbyseq(AlignmentPanel nap)
341 if (_colourwith.contains(nap))
343 _colourwith.remove(nap);
347 public abstract ViewerType getViewerType();
350 * add a new structure (with associated sequences and chains) to this viewer,
351 * retrieving it if necessary first.
357 * if true, new structure(s) will be aligned using associated
361 protected void addStructure(final PDBEntry pdbentry,
362 final SequenceI[] seqs, final String[] chains,
363 final IProgressIndicator alignFrame)
365 if (pdbentry.getFile() == null)
367 if (worker != null && worker.isAlive())
369 // a retrieval is in progress, wait around and add ourselves to the
371 new Thread(new Runnable()
376 while (worker != null && worker.isAlive() && _started)
380 Thread.sleep(100 + ((int) Math.random() * 100));
382 } catch (Exception e)
386 // and call ourselves again.
387 addStructure(pdbentry, seqs, chains, alignFrame);
393 // otherwise, start adding the structure.
394 getBinding().addSequenceAndChain(new PDBEntry[] { pdbentry },
396 { seqs }, new String[][] { chains });
397 addingStructures = true;
399 worker = new Thread(this);
404 protected boolean hasPdbId(String pdbId)
406 return getBinding().hasPdbId(pdbId);
410 * Returns a list of any viewer of the instantiated type. The list is
411 * restricted to those linked to the given alignment panel if it is not null.
413 protected List<StructureViewerBase> getViewersFor(AlignmentPanel alp)
415 return Desktop.instance.getStructureViewers(alp, this.getClass());
419 public void addToExistingViewer(PDBEntry pdbentry, SequenceI[] seq,
420 String[] chains, final AlignmentViewPanel apanel, String pdbId)
423 * JAL-1742 exclude view with this structure already mapped (don't offer
424 * to align chain B to chain A of the same structure); code may defend
425 * against this possibility before we reach here
431 AlignmentPanel alignPanel = (AlignmentPanel) apanel; // Implementation error if this
433 useAlignmentPanelForSuperposition(alignPanel);
434 addStructure(pdbentry, seq, chains, alignPanel.alignFrame);
438 * Adds mappings for the given sequences to an already opened PDB structure,
439 * and updates any viewers that have the PDB file
446 public void addSequenceMappingsToStructure(SequenceI[] seq,
447 String[] chains, final AlignmentViewPanel alpanel,
450 AlignmentPanel apanel = (AlignmentPanel) alpanel;
452 // TODO : Fix multiple seq to one chain issue here.
454 * create the mappings
456 apanel.getStructureSelectionManager().setMapping(seq, chains,
457 pdbFilename, DataSourceType.FILE, getProgressIndicator());
460 * alert the FeatureRenderer to show new (PDB RESNUM) features
462 if (apanel.getSeqPanel().seqCanvas.fr != null)
464 apanel.getSeqPanel().seqCanvas.fr.featuresAdded();
465 // note - we don't do a refresh for structure here because we do it
466 // explicitly for all panels later on
467 apanel.paintAlignment(true, false);
471 * add the sequences to any other viewers (of the same type) for this pdb
474 // JBPNOTE: this looks like a binding routine, rather than a gui routine
475 for (StructureViewerBase viewer : getViewersFor(null))
477 AAStructureBindingModel bindingModel = viewer.getBinding();
478 for (int pe = 0; pe < bindingModel.getPdbCount(); pe++)
480 if (bindingModel.getPdbEntry(pe).getFile().equals(pdbFilename))
482 bindingModel.addSequence(pe, seq);
483 viewer.addAlignmentPanel(apanel);
485 * add it to the set of alignments used for colouring structure by
488 viewer.useAlignmentPanelForColourbyseq(apanel);
489 viewer.buildActionMenu();
490 apanel.getStructureSelectionManager()
491 .sequenceColoursChanged(apanel);
499 public boolean addAlreadyLoadedFile(SequenceI[] seq, String[] chains,
500 final AlignmentViewPanel apanel, String pdbId)
502 String alreadyMapped = apanel.getStructureSelectionManager()
503 .alreadyMappedToFile(pdbId);
505 if (alreadyMapped == null)
510 addSequenceMappingsToStructure(seq, chains, apanel, alreadyMapped);
514 void setChainMenuItems(List<String> chainNames)
516 chainMenu.removeAll();
517 if (chainNames == null || chainNames.isEmpty())
521 JMenuItem menuItem = new JMenuItem(
522 MessageManager.getString("label.all"));
523 menuItem.addActionListener(new ActionListener()
526 public void actionPerformed(ActionEvent evt)
528 allChainsSelected = true;
529 for (int i = 0; i < chainMenu.getItemCount(); i++)
531 if (chainMenu.getItem(i) instanceof JCheckBoxMenuItem)
533 ((JCheckBoxMenuItem) chainMenu.getItem(i)).setSelected(true);
536 showSelectedChains();
537 allChainsSelected = false;
541 chainMenu.add(menuItem);
543 for (String chain : chainNames)
545 menuItem = new JCheckBoxMenuItem(chain, true);
546 menuItem.addItemListener(new ItemListener()
549 public void itemStateChanged(ItemEvent evt)
551 if (!allChainsSelected)
553 showSelectedChains();
558 chainMenu.add(menuItem);
563 * Action on selecting one of Jalview's registered colour schemes
566 public void changeColour_actionPerformed(String colourSchemeName)
568 AlignmentI al = getAlignmentPanel().av.getAlignment();
569 ColourSchemeI cs = ColourSchemes.getInstance()
570 .getColourScheme(colourSchemeName, getAlignmentPanel().av, al,
572 getBinding().colourByJalviewColourScheme(cs);
576 * Builds the colour menu
578 protected void buildColourMenu()
580 colourMenu.removeAll();
581 AlignmentI al = getAlignmentPanel().av.getAlignment();
584 * add colour by sequence, by chain, by charge and cysteine
586 colourMenu.add(seqColour);
587 colourMenu.add(chainColour);
588 colourMenu.add(chargeColour);
589 chargeColour.setEnabled(!al.isNucleotide());
592 * add all 'simple' (per-residue) colour schemes registered to Jalview
594 ButtonGroup itemGroup = ColourMenuHelper.addMenuItems(colourMenu, this,
598 * add 'colour by viewer' (menu item text is set in subclasses)
600 viewerColour.setSelected(false);
601 viewerColour.addActionListener(new ActionListener()
604 public void actionPerformed(ActionEvent actionEvent)
606 viewerColour_actionPerformed();
609 colourMenu.add(viewerColour);
612 * add 'set background colour'
614 JMenuItem backGround = new JMenuItem();
616 .setText(MessageManager.getString("action.background_colour"));
617 backGround.addActionListener(new ActionListener()
620 public void actionPerformed(ActionEvent actionEvent)
622 background_actionPerformed();
625 colourMenu.add(backGround);
628 * add colour buttons to a group so their selection is
629 * mutually exclusive (background colour is a separate option)
631 itemGroup.add(seqColour);
632 itemGroup.add(chainColour);
633 itemGroup.add(chargeColour);
634 itemGroup.add(viewerColour);
638 * Construct menu items
640 protected void initMenus()
642 AAStructureBindingModel binding = getBinding();
644 seqColour = new JRadioButtonMenuItem();
645 seqColour.setText(MessageManager.getString("action.by_sequence"));
646 seqColour.setName(ViewerColour.BySequence.name());
647 seqColour.setSelected(binding.isColourBySequence());
648 seqColour.addActionListener(new ActionListener()
651 public void actionPerformed(ActionEvent actionEvent)
653 seqColour_actionPerformed();
657 chainColour = new JRadioButtonMenuItem();
658 chainColour.setText(MessageManager.getString("action.by_chain"));
659 chainColour.setName(ViewerColour.ByChain.name());
660 chainColour.addActionListener(new ActionListener()
663 public void actionPerformed(ActionEvent actionEvent)
665 chainColour_actionPerformed();
669 chargeColour = new JRadioButtonMenuItem();
670 chargeColour.setText(MessageManager.getString("label.charge_cysteine"));
671 chargeColour.setName(ViewerColour.ChargeCysteine.name());
672 chargeColour.addActionListener(new ActionListener()
675 public void actionPerformed(ActionEvent actionEvent)
677 chargeColour_actionPerformed();
681 viewerColour = new JRadioButtonMenuItem();
682 // text is set in overrides of this method
683 viewerColour.setName(ViewerColour.ByViewer.name());
684 viewerColour.setSelected(!binding.isColourBySequence());
686 if (_colourwith == null)
688 _colourwith = new Vector<>();
690 if (_alignwith == null)
692 _alignwith = new Vector<>();
695 ViewSelectionMenu seqColourBy = new ViewSelectionMenu(
696 MessageManager.getString("label.colour_by"), this, _colourwith,
700 public void itemStateChanged(ItemEvent e)
702 if (!seqColour.isSelected())
708 // update the Chimera display now.
709 seqColour_actionPerformed();
713 viewMenu.add(seqColourBy);
715 final ItemListener handler = new ItemListener()
718 public void itemStateChanged(ItemEvent e)
720 alignStructs.setEnabled(!_alignwith.isEmpty());
721 alignStructs.setToolTipText(MessageManager.formatMessage(
722 "label.align_structures_using_linked_alignment_views",
726 viewSelectionMenu = new ViewSelectionMenu(
727 MessageManager.getString("label.superpose_with"), this,
728 _alignwith, handler);
729 handler.itemStateChanged(null);
730 viewerActionMenu.add(viewSelectionMenu, 0);
731 viewerActionMenu.addMenuListener(new MenuListener()
734 public void menuSelected(MenuEvent e)
736 handler.itemStateChanged(null);
740 public void menuDeselected(MenuEvent e)
745 public void menuCanceled(MenuEvent e)
754 * Sends commands to the structure viewer to superimpose structures based on
755 * currently associated alignments. May optionally return an error message for
759 protected String alignStructsWithAllAlignPanels()
761 if (getAlignmentPanel() == null)
766 if (_alignwith.size() == 0)
768 _alignwith.add(getAlignmentPanel());
774 reply = getBinding().superposeStructures(_alignwith);
775 if (reply != null && !reply.isEmpty())
777 String text = MessageManager
778 .formatMessage("error.superposition_failed", reply);
779 statusBar.setText(text);
781 } catch (Exception e)
783 StringBuffer sp = new StringBuffer();
784 for (AlignmentViewPanel alignPanel : _alignwith)
786 sp.append("'" + alignPanel.getViewName() + "' ");
788 Cache.log.info("Couldn't align structures with the " + sp.toString()
789 + "associated alignment panels.", e);
795 public void background_actionPerformed()
797 Color col = JColorChooser.showDialog(this,
798 MessageManager.getString("label.select_background_colour"),
802 getBinding().setBackgroundColour(col);
807 public void viewerColour_actionPerformed()
809 if (viewerColour.isSelected())
811 // disable automatic sequence colouring.
812 getBinding().setColourBySequence(false);
817 public void chainColour_actionPerformed()
819 chainColour.setSelected(true);
820 getBinding().colourByChain();
824 public void chargeColour_actionPerformed()
826 chargeColour.setSelected(true);
827 getBinding().colourByCharge();
831 public void seqColour_actionPerformed()
833 AAStructureBindingModel binding = getBinding();
834 binding.setColourBySequence(seqColour.isSelected());
835 if (_colourwith == null)
837 _colourwith = new Vector<>();
839 if (binding.isColourBySequence())
841 if (!binding.isLoadingFromArchive())
843 if (_colourwith.size() == 0 && getAlignmentPanel() != null)
845 // Make the currently displayed alignment panel the associated view
846 _colourwith.add(getAlignmentPanel().alignFrame.alignPanel);
849 // Set the colour using the current view for the associated alignframe
850 for (AlignmentViewPanel alignPanel : _colourwith)
852 binding.colourBySequence(alignPanel);
854 seqColoursApplied = true;
859 public void pdbFile_actionPerformed()
861 JalviewFileChooser chooser = new JalviewFileChooser(
862 Cache.getProperty("LAST_DIRECTORY"));
864 chooser.setFileView(new JalviewFileView());
865 chooser.setDialogTitle(MessageManager.getString("label.save_pdb_file"));
866 chooser.setToolTipText(MessageManager.getString("action.save"));
868 int value = chooser.showSaveDialog(this);
870 if (value == JalviewFileChooser.APPROVE_OPTION)
872 BufferedReader in = null;
875 // TODO: cope with multiple PDB files in view
876 in = new BufferedReader(
877 new FileReader(getBinding().getStructureFiles()[0]));
878 File outFile = chooser.getSelectedFile();
880 PrintWriter out = new PrintWriter(new FileOutputStream(outFile));
882 while ((data = in.readLine()) != null)
884 if (!(data.indexOf("<PRE>") > -1 || data.indexOf("</PRE>") > -1))
890 } catch (Exception ex)
892 ex.printStackTrace();
900 } catch (IOException e)
910 public void viewMapping_actionPerformed()
912 CutAndPasteTransfer cap = new CutAndPasteTransfer();
915 cap.appendText(getBinding().printMappings());
916 } catch (OutOfMemoryError e)
919 "composing sequence-structure alignments for display in text box.",
924 Desktop.addInternalFrame(cap,
925 MessageManager.getString("label.pdb_sequence_mapping"), 550,
929 protected abstract String getViewerName();
932 * Configures the title and menu items of the viewer panel.
935 public void updateTitleAndMenus()
937 AAStructureBindingModel binding = getBinding();
938 if (binding.hasFileLoadingError())
943 setChainMenuItems(binding.getChainNames());
945 this.setTitle(binding.getViewerTitle(getViewerName(), true));
948 * enable 'Superpose with' if more than one mapped structure
950 viewSelectionMenu.setEnabled(false);
951 if (getBinding().getStructureFiles().length > 1
952 && getBinding().getSequence().length > 1)
954 viewSelectionMenu.setEnabled(true);
958 * Show action menu if it has any enabled items
960 viewerActionMenu.setVisible(false);
961 for (int i = 0; i < viewerActionMenu.getItemCount(); i++)
963 if (viewerActionMenu.getItem(i).isEnabled())
965 viewerActionMenu.setVisible(true);
970 if (!binding.isLoadingFromArchive())
972 seqColour_actionPerformed();
977 public String toString()
983 public boolean hasMapping()
985 if (worker != null && (addingStructures || _started))
989 if (getBinding() == null)
991 if (_aps == null || _aps.size() == 0)
993 // viewer has been closed, but we did at some point run.
998 String[] pdbids = getBinding().getStructureFiles();
1004 for (String pdbid:pdbids) {
1005 StructureMapping sm[] = getBinding().getSsm().getMapping(pdbid);
1006 if (sm!=null && sm.length>0 && sm[0]!=null) {
1010 // only return true if there is a mapping for every structure file we have loaded
1011 if (p == 0 || p != pdbids.length)
1015 // and that coloring has been applied
1016 return seqColoursApplied;
1020 public void raiseViewer()
1026 public long startProgressBar(String msg)
1028 // TODO would rather have startProgress/stopProgress as the
1029 // IProgressIndicator interface
1030 long tm = random.nextLong();
1031 if (progressBar != null)
1033 progressBar.setProgressBar(msg, tm);
1039 public void stopProgressBar(String msg, long handle)
1041 if (progressBar != null)
1043 progressBar.setProgressBar(msg, handle);
1047 protected IProgressIndicator getProgressIndicator()
1052 protected void setProgressIndicator(IProgressIndicator pi)
1057 protected void setProgressMessage(String message, long id)
1059 if (progressBar != null)
1061 progressBar.setProgressBar(message, id);
1066 public void showConsole(boolean show)
1068 // default does nothing
1072 * Show only the selected chain(s) in the viewer
1074 protected void showSelectedChains()
1076 List<String> toshow = new ArrayList<>();
1077 for (int i = 0; i < chainMenu.getItemCount(); i++)
1079 if (chainMenu.getItem(i) instanceof JCheckBoxMenuItem)
1081 JCheckBoxMenuItem item = (JCheckBoxMenuItem) chainMenu.getItem(i);
1082 if (item.isSelected())
1084 toshow.add(item.getText());
1088 getBinding().showChains(toshow);
1092 * Tries to fetch a PDB file and save to a temporary local file. Returns the
1093 * saved file path if successful, or null if not.
1095 * @param processingEntry
1098 protected String fetchPdbFile(PDBEntry processingEntry)
1100 String filePath = null;
1101 Pdb pdbclient = new Pdb();
1102 AlignmentI pdbseq = null;
1103 String pdbid = processingEntry.getId();
1104 long handle = System.currentTimeMillis()
1105 + Thread.currentThread().hashCode();
1108 * Write 'fetching PDB' progress on AlignFrame as we are not yet visible
1110 String msg = MessageManager.formatMessage("status.fetching_pdb",
1113 getAlignmentPanel().alignFrame.setProgressBar(msg, handle);
1114 // long hdl = startProgressBar(MessageManager.formatMessage(
1115 // "status.fetching_pdb", new Object[]
1119 pdbseq = pdbclient.getSequenceRecords(pdbid);
1120 } catch (Exception e)
1123 "Error retrieving PDB id " + pdbid + ": " + e.getMessage());
1126 msg = pdbid + " " + MessageManager.getString("label.state_completed");
1127 getAlignmentPanel().alignFrame.setProgressBar(msg, handle);
1128 // stopProgressBar(msg, hdl);
1131 * If PDB data were saved and are not invalid (empty alignment), return the
1134 if (pdbseq != null && pdbseq.getHeight() > 0)
1136 // just use the file name from the first sequence's first PDBEntry
1137 filePath = new File(pdbseq.getSequenceAt(0).getAllPDBEntries()
1138 .elementAt(0).getFile()).getAbsolutePath();
1139 processingEntry.setFile(filePath);