@Override public List<Atom[]> getAtomArrays() { if (atomArrays == null) { try { updateAtomArrays(); } catch (IOException e) { throw new NullPointerException(e.getMessage()); } catch (StructureException e) { throw new NullPointerException(e.getMessage()); } } return atomArrays; }
private void calcAlignment() { try { List<Structure> structures = tab.getStructures(); if ( structures.size() < 2) { System.err.println("please input more than 1 structure"); return; } List<StructureIdentifier> names = tab.getNames(); String message = "aligning: "; for (StructureIdentifier name:names){ message += name.getIdentifier() + " "; } System.out.println(message); alicalc = new MultipleAlignmentCalc(this, structures, names); thread = new Thread(alicalc); thread.start(); abortB.setEnabled(true); progress.setIndeterminate(true); ProgressThreadDrawer drawer = new ProgressThreadDrawer(progress); drawer.start(); } catch (StructureException e){ JOptionPane.showMessageDialog(null,"Could not align structures. " + "Exception: " + e.getMessage()); } }
} catch (StructureException e){ JOptionPane.showMessageDialog(null, "Could not align structures. Exception: " + e.getMessage()); } catch (IOException e) { JOptionPane.showMessageDialog(null,
/** * Generate the secondary structure for a Biojava structure object. * @param bioJavaStruct the Biojava structure for which it is to be calculate. */ public static void calculateDsspSecondaryStructure(Structure bioJavaStruct) { SecStrucCalc ssp = new SecStrucCalc(); try{ ssp.calculate(bioJavaStruct, true); } catch(StructureException e) { LOGGER.warn("Could not calculate secondary structure (error {}). Will try to get a DSSP file from the RCSB web server instead.", e.getMessage()); try { DSSPParser.fetch(bioJavaStruct.getPDBCode(), bioJavaStruct, true); //download from PDB the DSSP result } catch(Exception bige){ LOGGER.warn("Could not get a DSSP file from RCSB web server. There will not be secondary structure assignment for this structure ({}). Error: {}", bioJavaStruct.getPDBCode(), bige.getMessage()); } } }
@Override public void run() { CESymmParameters params = parent.getParameters(); try { Atom[] atoms = SymmetryTools.getRepresentativeAtoms(structure); CeSymmResult result = CeSymm.analyze(atoms, params); SymmetryDisplay.display(result); } catch (StructureException e) { logger.warn(e.getMessage()); } parent.notifyCalcFinished(); }
logger.warn("Could not merge by Structure. {}", e.getMessage()); } catch (StructureException e) { logger.warn("Error analyzing internal symmetry. {}", e.getMessage()); } catch (StructureException e) { logger.warn("Could not merge by Structure. {}", e.getMessage());
drawer.start(); } catch (StructureException e){ JOptionPane.showMessageDialog(null,"Could not align structures. Exception: " + e.getMessage()); } catch (IOException e) { JOptionPane.showMessageDialog(null,"Could not align structures. Exception: " + e.getMessage());
@Override public void run() { MultipleStructureAligner algorithm = parent.getMultipleStructureAligner(); try { List<Atom[]> atomArrays = new ArrayList<Atom[]>(); for (Structure s:structures){ Atom[] ca = StructureTools.getRepresentativeAtomArray(s); atomArrays.add(ca); } MultipleAlignment msa = algorithm.align(atomArrays); msa.getEnsemble().setStructureIdentifiers(names); MultipleAlignmentJmolDisplay.display(msa); } catch (StructureException e) { e.printStackTrace(); logger.warn(e.getMessage()); } parent.notifyCalcFinished(); }
@Override public void run() { // both structure have been downloaded, now calculate the alignment ... StructurePairAligner aligner = new StructurePairAligner(); try { aligner.align(structure1,structure2); } catch (StructureException e){ logger.warn(e.getMessage()); } AlternativeAlignment[] aligs = aligner.getAlignments(); //cluster similar results together ClusterAltAligs.cluster(aligs); showAlignment(aligner,aligs); //logger.info("done!"); parent.notifyCalcFinished(); }
logger.warn("Problem finding residue in site entry " + siteGen.getSite_id() + " - " + e.getMessage(), e.getMessage());
printXMLEQRKnownPositions(xml,afpChain,bk); } catch (StructureException ex ){ throw new IOException(ex.getMessage());
@Override public void run() { // both structure have been downloaded, now calculate the alignment ... StructureAlignment algorithm = parent.getStructureAlignment(); //StructurePairAligner aligner = new StructurePairAligner(); //aligner.setDebug(true); try { Atom[] ca1 = StructureTools.getRepresentativeAtomArray(structure1); Atom[] ca2 = StructureTools.getRepresentativeAtomArray(structure2); //System.out.println("ca1 size:" + ca1.length + " ca2 size: " + ca2.length); AFPChain afpChain = algorithm.align(ca1, ca2); afpChain.setName1(name1); afpChain.setName2(name2); StructureAlignmentJmol jmol = StructureAlignmentDisplay.display(afpChain, ca1, ca2); String title = jmol.getTitle(); ConfigStrucAligParams params = algorithm.getParameters(); if ( params != null) title += " " + algorithm.getParameters().toString(); jmol.setTitle(title); DisplayAFP.showAlignmentPanel(afpChain,ca1,ca2,jmol); System.out.println(afpChain.toCE(ca1,ca2)); } catch (StructureException e){ e.printStackTrace(); logger.warn(e.getMessage()); } //logger.info("done!"); parent.notifyCalcFinished(); }
c = s.getChainByPDB(chainId); } catch (StructureException e) { logger.warn(e.getMessage() + ". Chain id " + chainId + " did not match, trying upper case Chain id."); c = s.getChainByPDB(chainId.toUpperCase());