public void run() {
progressDialog.setPrimaryProgressCounterIndeterminate(true);
int selectedPdbIndex = (Integer) pdbMatchesJTable.getValueAt(pdbMatchesJTable.getSelectedRow(), 0);
PdbParameter lParam = uniProtPdb.getPdbs().get(selectedPdbIndex - 1);
String link = "http://www.rcsb.org/pdb/files/" + lParam.getPdbaccession() + ".pdb";
jmolPanel.getViewer().openFile(link);
if (ribbonModel) {
jmolPanel.getViewer().evalString("select all; ribbon only;");
} else if (backboneModel) {
jmolPanel.getViewer().evalString("select all; backbone only; backbone 100;");
}
if (!progressDialog.isRunCanceled()) {
spinModel(spinModel);
jmolStructureShown = true;
((TitledBorder) pdbOuterPanel.getBorder()).setTitle(PeptideShakerGUI.TITLED_BORDER_HORIZONTAL_PADDING + "PDB Structure (" + lParam.getPdbaccession() + ")"
+ PeptideShakerGUI.TITLED_BORDER_HORIZONTAL_PADDING);
pdbOuterPanel.repaint();
}
if (!progressDialog.isRunCanceled()) {
progressDialog.setTitle("Mapping Peptides. Please Wait...");
// get the chains
chains = lParam.getBlocks();
int selectedChainIndex = (Integer) pdbChainsJTable.getValueAt(pdbChainsJTable.getSelectedRow(), 0);
chainSequence = chains[selectedChainIndex - 1].getBlockSequence(lParam.getPdbaccession());
// update the peptide to pdb mappings
updatePeptideToPdbMapping();
}