private boolean hasMap(AtomAtomMapping map, List<AtomAtomMapping> mappings) { for (AtomAtomMapping test : mappings) { if (test.equals(map)) { return true; } } return false; } }
private static int getSMSDSolutionCount(IAtomContainer queryMol, IAtomContainer target) throws CDKException { Substructure substructure = new Substructure(queryMol, target, true, true, true, false); if (substructure.isSubgraph()) { return 1; } else { return 0; } }
private synchronized boolean substructureAlgorithm() throws CDKException { Substructure mcs; if (getQuery() instanceof IQueryAtomContainer) { mcs = new Substructure((IQueryAtomContainer) getQuery(), getTarget(), true); } else { mcs = new Substructure(getQuery(), getTarget(), isMatchBonds(), isMatchRings(), isMatchAtomType(), true); } clearMaps(); if (mcs.isSubgraph()) { getMCSList().addAll(mcs.getAllAtomMapping()); } return mcs.isSubgraph(); }
private synchronized boolean substructureAlgorithm() throws CDKException { if (DEBUG) { System.out.println("Check substructureAlgorithm"); } Substructure mcs; if (getQuery() instanceof IQueryAtomContainer) { mcs = new Substructure((IQueryAtomContainer) getQuery(), getTarget(), atomMatcher, bondMatcher, true); } else { mcs = new Substructure(getQuery(), getTarget(), atomMatcher, bondMatcher, true); } clearMaps(); if (mcs.isSubgraph()) { getMCSList().addAll(mcs.getAllAtomMapping()); } return mcs.isSubgraph(); }
/** * {@inheritDoc} * * @return */ @Override public synchronized AtomAtomMapping getFirstAtomMapping() { return getMCSList().isEmpty() ? new AtomAtomMapping(getQuery(), getTarget()) : getMCSList().iterator().next(); }
private synchronized void chooseAlgorithm() { switch (algorithmType) { case CDKMCS: cdkMCSAlgorithm(); break; case DEFAULT: defaultMCSAlgorithm(); break; case MCSPlus: mcsPlusAlgorithm(); break; case VFLibMCS: vfLibMCSAlgorithm(); break; } }
private synchronized void mcsBuilder(IAtomContainer mol1, IAtomContainer mol2) { int rBondCount = mol1.getBondCount(); int pBondCount = mol2.getBondCount(); int rAtomCount = mol1.getAtomCount(); int pAtomCount = mol2.getAtomCount(); if ((rBondCount == 0 && rAtomCount > 0) || (pBondCount == 0 && pAtomCount > 0)) { singleMapping(); } else { chooseAlgorithm(); } }
AtomAtomMapping getMapping() { AtomAtomMapping mapping = new AtomAtomMapping(source, target); for (int i = 0; i < size; i++) { mapping.put(source.getAtom(i), target.getAtom(sharedState.sourceMapping[i])); } return mapping; }
/** * Returns atom index of the given atom in the query molecule * * @param atom * @return */ public synchronized int getQueryIndex(IAtom atom) { return getQuery().getAtomNumber(atom); }
/** * Returns atom index of the given atom in the target molecule * * @param atom * @return */ public synchronized int getTargetIndex(IAtom atom) { return getTarget().getAtomNumber(atom); }
/** * 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 boolean substructureAlgorithm() throws CDKException { Substructure mcs; if (getQuery() instanceof IQueryAtomContainer) { mcs = new Substructure((IQueryAtomContainer) getQuery(), getTarget(), true); } else { mcs = new Substructure(getQuery(), getTarget(), isMatchBonds(), isMatchRings(), isMatchAtomType(), true); } clearMaps(); if (mcs.isSubgraph()) { getMCSList().addAll(mcs.getAllAtomMapping()); } return mcs.isSubgraph(); }
/** * {@inheritDoc} * * @return */ @Override public synchronized AtomAtomMapping getFirstAtomMapping() { return getMCSList().isEmpty() ? new AtomAtomMapping(getQuery(), getTarget()) : getMCSList().iterator().next(); }
private synchronized void chooseAlgorithm() { switch (algorithmType) { case CDKMCS: cdkMCSAlgorithm(); break; case DEFAULT: defaultMCSAlgorithm(); break; case MCSPlus: mcsPlusAlgorithm(); break; case VFLibMCS: vfLibMCSAlgorithm(); break; } }
private synchronized void mcsBuilder(IAtomContainer mol1, IAtomContainer mol2) { int rBondCount = mol1.getBondCount(); int pBondCount = mol2.getBondCount(); int rAtomCount = mol1.getAtomCount(); int pAtomCount = mol2.getAtomCount(); if ((rBondCount == 0 && rAtomCount > 0) || (pBondCount == 0 && pAtomCount > 0)) { singleMapping(); } else { chooseAlgorithm(); } }
private synchronized boolean hasMap(AtomAtomMapping map, List<AtomAtomMapping> mapGlobal) { for (AtomAtomMapping test : mapGlobal) { if (test.equals(map)) { return true; } } return false; }
/** * {@inheritDoc} * * @return */ @Override public synchronized AtomAtomMapping getFirstAtomMapping() { return getMCSList().isEmpty() ? new AtomAtomMapping(getQuery(), getTarget()) : getMCSList().iterator().next(); }
private synchronized boolean hasMap(AtomAtomMapping map, List<AtomAtomMapping> mapGlobal) { for (AtomAtomMapping test : mapGlobal) { if (test.equals(map)) { return true; } } return false; }
private boolean hasMap(AtomAtomMapping map, List<AtomAtomMapping> mappings) { for (AtomAtomMapping test : mappings) { if (test.equals(map)) { return true; } } return false; } }