/** * Returns Maximum Common Fragment between Query and Target as SMILES * * @return * @throws CloneNotSupportedException * @throws CDKException */ public synchronized String getCommonFragmentAsSMILES() throws CloneNotSupportedException, CDKException { SmilesGenerator aromatic = new SmilesGenerator(SmiFlavor.Unique | SmiFlavor.AtomAtomMap); return aromatic.create(getCommonFragment()); }
private synchronized Collection<Fragment> getMCSS(BaseMapping comparison) { Set<Fragment> matchList = new HashSet<>(); comparison.getAllAtomMapping().stream().forEach((mapping) -> { IAtomContainer match; try { match = mapping.getCommonFragment(); try { matchList.add(new Fragment(match)); } catch (CDKException ex) { LOGGER.error("ERROR IN MCS Thread: ", ex); } } catch (CloneNotSupportedException ex) { LOGGER.error("ERROR IN MCS Thread: ", ex); } }); return matchList; }
private synchronized Collection<Fragment> getMCSS(BaseMapping comparison) { Set<Fragment> matchList = new HashSet<>(); for (AtomAtomMapping mapping : comparison.getAllAtomMapping()) { IAtomContainer match; try { match = mapping.getCommonFragment(); try { matchList.add(new Fragment(match)); } catch (CDKException ex) { logger.error("ERROR IN MCS Thread: ", ex); } } catch (CloneNotSupportedException ex) { logger.error("ERROR IN MCS Thread: ", ex); } } return matchList; }
/** * Returns Maximum Common Fragment between Query and Target as SMILES * * @return * @throws CloneNotSupportedException * @throws CDKException */ public synchronized String getCommonFragmentAsSMILES() throws CloneNotSupportedException, CDKException { SmilesGenerator aromatic = SmilesGenerator.unique().withAtomClasses(); return aromatic.create(getCommonFragment()); }
private synchronized Collection<Fragment> getMCSS(BaseMapping comparison) { Set<Fragment> matchList = new HashSet<>(); for (AtomAtomMapping mapping : comparison.getAllAtomMapping()) { IAtomContainer match; try { match = mapping.getCommonFragment(); try { matchList.add(new Fragment(match)); } catch (CDKException ex) { logger.error("ERROR IN MCS Thread: ", ex); } } catch (CloneNotSupportedException ex) { logger.error("ERROR IN MCS Thread: ", ex); } } return matchList; }
/** * Returns Maximum Common Fragment between Query and Target as SMILES * * @return * @throws CloneNotSupportedException * @throws CDKException */ public synchronized String getCommonFragmentAsSMILES() throws CloneNotSupportedException, CDKException { SmilesGenerator smiles = new SmilesGenerator( // SmiFlavor.Unique| //SmiFlavor.UseAromaticSymbols| SmiFlavor.AtomAtomMap | SmiFlavor.Stereo); IAtomContainer commonFragment = getCommonFragment(); Aromaticity aromaticity = new Aromaticity(daylight(), Cycles.or(Cycles.all(), Cycles.or(Cycles.relevant(), Cycles.essential()))); aromaticity.apply(commonFragment); return smiles.create(commonFragment); }
IAtomContainer subgraph = smsd.getFirstAtomMapping().getCommonFragment(); String outpath = argumentHandler.getOutputFilepath(); String outtype = argumentHandler.getOutputFiletype();