/** * {@inheritDoc} */ @Override public synchronized double getEuclideanDistance() { int decimalPlaces = 4; double sourceAtomCount; double targetAtomCount; double euclidean = -1.; if (getMappingCount() > 0) { AtomAtomMapping firstAtomMCS = getMCSList().iterator().next(); if (!firstAtomMCS.isEmpty()) { sourceAtomCount = (double) this.getMCSList().iterator() .next().getQuery().getAtomCount(); targetAtomCount = (double) this.getMCSList().iterator() .next().getTarget().getAtomCount(); double common = (double) firstAtomMCS.getCount(); euclidean = Math.sqrt(sourceAtomCount + targetAtomCount - 2 * common); BigDecimal dist = new BigDecimal(euclidean); dist = dist.setScale(decimalPlaces, BigDecimal.ROUND_HALF_UP); euclidean = dist.doubleValue(); } } return euclidean; }
/** * {@inheritDoc} */ @Override public synchronized double getTanimotoSimilarity() { int decimalPlaces = 4; double rAtomCount; double pAtomCount; double tanimotoAtom = 0.0; if (getMappingCount() > 0) { AtomAtomMapping firstAtomMCS = getMCSList().iterator().next(); if (!firstAtomMCS.isEmpty()) { rAtomCount = (double) this.getMCSList().iterator().next().getQuery().getAtomCount(); pAtomCount = (double) this.getMCSList().iterator().next().getTarget().getAtomCount(); double matchCount = (double) firstAtomMCS.getCount(); tanimotoAtom = (matchCount) / (rAtomCount + pAtomCount - matchCount); BigDecimal tan = new BigDecimal(tanimotoAtom); tan = tan.setScale(decimalPlaces, BigDecimal.ROUND_HALF_UP); tanimotoAtom = tan.doubleValue(); } } return tanimotoAtom; }
/** * {@inheritDoc} */ @Override public synchronized double getTanimotoSimilarity() { int decimalPlaces = 4; double rAtomCount; double pAtomCount; double tanimotoAtom = 0.0; if (getMappingCount() > 0) { AtomAtomMapping firstAtomMCS = getMCSList().iterator().next(); if (!firstAtomMCS.isEmpty()) { rAtomCount = (double) this.getMCSList().iterator().next().getQuery().getAtomCount(); pAtomCount = (double) this.getMCSList().iterator().next().getTarget().getAtomCount(); double matchCount = (double) firstAtomMCS.getCount(); tanimotoAtom = (matchCount) / (rAtomCount + pAtomCount - matchCount); BigDecimal tan = new BigDecimal(tanimotoAtom); tan = tan.setScale(decimalPlaces, BigDecimal.ROUND_HALF_UP); tanimotoAtom = tan.doubleValue(); } } return tanimotoAtom; }
/** * {@inheritDoc} */ @Override public synchronized double getEuclideanDistance() { int decimalPlaces = 4; double sourceAtomCount; double targetAtomCount; double euclidean = -1.; if (getMappingCount() > 0) { AtomAtomMapping firstAtomMCS = getMCSList().iterator().next(); if (!firstAtomMCS.isEmpty()) { sourceAtomCount = (double) this.getMCSList().iterator() .next().getQuery().getAtomCount(); targetAtomCount = (double) this.getMCSList().iterator() .next().getTarget().getAtomCount(); double common = (double) firstAtomMCS.getCount(); euclidean = Math.sqrt(sourceAtomCount + targetAtomCount - 2 * common); BigDecimal dist = new BigDecimal(euclidean); dist = dist.setScale(decimalPlaces, BigDecimal.ROUND_HALF_UP); euclidean = dist.doubleValue(); } } return euclidean; }
/** * {@inheritDoc} */ @Override public synchronized double getEuclideanDistance() { int decimalPlaces = 4; double sourceAtomCount; double targetAtomCount; double euclidean = -1.; if (getMappingCount() > 0) { AtomAtomMapping firstAtomMCS = getMCSList().iterator().next(); if (!firstAtomMCS.isEmpty()) { sourceAtomCount = (double) this.getMCSList().iterator() .next().getQuery().getAtomCount(); targetAtomCount = (double) this.getMCSList().iterator() .next().getTarget().getAtomCount(); double common = (double) firstAtomMCS.getCount(); euclidean = Math.sqrt(sourceAtomCount + targetAtomCount - 2 * common); BigDecimal dist = new BigDecimal(euclidean); dist = dist.setScale(decimalPlaces, BigDecimal.ROUND_HALF_UP); euclidean = dist.doubleValue(); } } return euclidean; }
/** * {@inheritDoc} */ @Override public synchronized double getTanimotoSimilarity() { int decimalPlaces = 4; double rAtomCount; double pAtomCount; double tanimotoAtom = 0.0; if (getMappingCount() > 0) { AtomAtomMapping firstAtomMCS = getMCSList().iterator().next(); if (!firstAtomMCS.isEmpty()) { rAtomCount = (double) this.getMCSList().iterator().next().getQuery().getAtomCount(); pAtomCount = (double) this.getMCSList().iterator().next().getTarget().getAtomCount(); double matchCount = (double) firstAtomMCS.getCount(); tanimotoAtom = (matchCount) / (rAtomCount + pAtomCount - matchCount); BigDecimal tan = new BigDecimal(tanimotoAtom); tan = tan.setScale(decimalPlaces, BigDecimal.ROUND_HALF_UP); tanimotoAtom = tan.doubleValue(); } } return tanimotoAtom; }
IAtomContainer product = getTarget(); int stereoMisMatchScore = 0; if (getMappingCount() > 0) { AtomAtomMapping firstAtomMCS = getMCSList().iterator().next(); for (IAtom indexI : firstAtomMCS.getMappingsByAtoms().keySet()) {
IAtomContainer product = getTarget(); int stereoMisMatchScore = 0; if (getMappingCount() > 0) { AtomAtomMapping firstAtomMCS = getMCSList().iterator().next(); for (IAtom indexI : firstAtomMCS.getMappingsByAtoms().keySet()) {
IAtomContainer product = getTarget(); int stereoMisMatchScore = 0; if (getMappingCount() > 0) { AtomAtomMapping firstAtomMCS = getMCSList().iterator().next(); for (IAtom indexI : firstAtomMCS.getMappingsByAtoms().keySet()) {
@Override public synchronized void setChemFilters(boolean stereoFilter, boolean fragmentFilter, boolean energyFilter) { if (getMappingCount() > 0) { if (energyFilter) { try { sortResultsByEnergies(); this.bondEnergiesList = getSortedEnergy(); } catch (CDKException ex) { Logger.error(Level.SEVERE, null, ex); } } if (fragmentFilter) { sortResultsByFragments(); this.fragmentSizeList = getSortedFragment(); } if (stereoFilter) { try { sortResultsByStereoAndBondMatch(); this.stereoScoreList = getStereoMatches(); } catch (CDKException ex) { Logger.error(Level.SEVERE, null, ex); } } } }
@Override public synchronized void setChemFilters(boolean stereoFilter, boolean fragmentFilter, boolean energyFilter) { if (getMappingCount() > 0) { if (energyFilter) { try { sortResultsByEnergies(); this.bondEnergiesList = getSortedEnergy(); } catch (CDKException ex) { Logger.error(Level.SEVERE, null, ex); } } if (fragmentFilter) { sortResultsByFragments(); this.fragmentSizeList = getSortedFragment(); } if (stereoFilter) { try { sortResultsByStereoAndBondMatch(); this.stereoScoreList = getStereoMatches(); } catch (CDKException ex) { Logger.error(Level.SEVERE, null, ex); } } } }
@Override public synchronized void setChemFilters(boolean stereoFilter, boolean fragmentFilter, boolean energyFilter) { if (getMappingCount() > 0) {