@Override public synchronized int getMappingCount() { return this.getMCSList().isEmpty() ? 0 : this.getMCSList().size(); }
@Override public synchronized int getMappingCount() { return this.getMCSList().isEmpty() ? 0 : this.getMCSList().size(); }
@Override public synchronized int getMappingCount() { return this.getMCSList().isEmpty() ? 0 : this.getMCSList().size(); }
public synchronized void clearMaps() { this.getMCSList().clear(); }
public synchronized void clearMaps() { this.getMCSList().clear(); }
public synchronized void clearMaps() { this.getMCSList().clear(); }
/** * {@inheritDoc} * * @return */ @Override public synchronized List<AtomAtomMapping> getAllAtomMapping() { return Collections.unmodifiableList(new ArrayList<>(getMCSList())); }
/** * {@inheritDoc} * * @return */ @Override public synchronized List<AtomAtomMapping> getAllAtomMapping() { return Collections.unmodifiableList(new ArrayList<>(getMCSList())); }
/** * {@inheritDoc} * * @return */ @Override public synchronized List<AtomAtomMapping> getAllAtomMapping() { return Collections.unmodifiableList(new ArrayList<>(getMCSList())); }
/** * {@inheritDoc} * * @return */ @Override public synchronized AtomAtomMapping getFirstAtomMapping() { return getMCSList().isEmpty() ? new AtomAtomMapping(getQuery(), getTarget()) : getMCSList().iterator().next(); }
/** * @return the allBondMCS */ public synchronized List<Map<IBond, IBond>> getAllBondMaps() { if (!getMCSList().isEmpty()) { return makeBondMapsOfAtomMaps(getQuery(), getTarget(), getMCSList()); } return new ArrayList<>(); }
/** * {@inheritDoc} * * @return */ @Override public synchronized AtomAtomMapping getFirstAtomMapping() { return getMCSList().isEmpty() ? new AtomAtomMapping(getQuery(), getTarget()) : getMCSList().iterator().next(); }
/** * @return the allBondMCS */ public synchronized List<Map<IBond, IBond>> getAllBondMaps() { if (!getMCSList().isEmpty()) { return makeBondMapsOfAtomMaps(getQuery(), getTarget(), getMCSList()); } return new ArrayList<>(); }
/** * @return the allBondMCS */ public synchronized List<Map<IBond, IBond>> getAllBondMaps() { if (!getMCSList().isEmpty()) { return makeBondMapsOfAtomMaps(getQuery(), getTarget(), getMCSList()); } return new ArrayList<>(); }
/** * {@inheritDoc} * * @return */ @Override public synchronized AtomAtomMapping getFirstAtomMapping() { return getMCSList().isEmpty() ? new AtomAtomMapping(getQuery(), getTarget()) : getMCSList().iterator().next(); }
/** * {@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; }
/** * {@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; }