@Test public void testMatchAtomCount() throws CDKException { SmilesParser sp = new SmilesParser(DefaultChemObjectBuilder.getInstance()); IAtomContainer query = sp.parseSmiles("CC"); IAtomContainer target = sp.parseSmiles("C1CCC12CCCC2"); Isomorphism smsd = new Isomorphism(query, target, Algorithm.DEFAULT, true, false, true); Assert.assertEquals(18, smsd.getAllAtomMapping().size()); Assert.assertTrue(smsd.isSubgraph()); IQueryAtomContainer queryContainer = QueryAtomContainerCreator.createSymbolAndBondOrderQueryContainer(query); smsd = new Isomorphism(queryContainer, target, Algorithm.DEFAULT); Assert.assertTrue(smsd.isSubgraph()); }
@Override public synchronized boolean isSubgraph() { float mappingSize; if (getMappingCount() > 0) { mappingSize = getAllAtomMapping().iterator().next().getCount(); } else { return false; } int sourceAtomCount = getQuery().getAtomCount(); int targetAtomCount = getTarget().getAtomCount(); if (mappingSize == sourceAtomCount && mappingSize <= targetAtomCount) { if (mappingSize == 1) { return true; } else if (!getAllBondMaps().isEmpty() && getAllBondMaps().iterator().next().size() == getQuery().getBondCount()) { return true; } } return false; }
Isomorphism extends BaseMapping implements Serializable { @Override public synchronized boolean isSubgraph() { float mappingSize; if (getMappingCount() > 0) { mappingSize = getAllAtomMapping().iterator().next().getCount(); } else { return false; } int sourceAtomCount = getQuery().getAtomCount(); int targetAtomCount = getTarget().getAtomCount(); if (mappingSize == sourceAtomCount && mappingSize <= targetAtomCount) { if (mappingSize == 1) { return true; } else if (!getAllBondMaps().isEmpty() && getAllBondMaps().iterator().next().size() == getQuery().getBondCount()) { return true; } } return false; } }
Isomorphism extends BaseMapping implements Serializable { @Override public synchronized boolean isSubgraph() { float mappingSize; if (getMappingCount() > 0) { mappingSize = getAllAtomMapping().iterator().next().getCount(); } else { return false; } int sourceAtomCount = getQuery().getAtomCount(); int targetAtomCount = getTarget().getAtomCount(); if (mappingSize == sourceAtomCount && mappingSize <= targetAtomCount) { if (mappingSize == 1) { return true; } else if (!getAllBondMaps().isEmpty() && getAllBondMaps().iterator().next().size() == getQuery().getBondCount()) { return true; } } return false; } Isomorphism(
            IQueryAtomContainer query,
            IAtomContainer target,
            Algorithm algorithmType);  Isomorphism(
            IAtomContainer query,
            IAtomContainer target,
            Algorithm algorithmType,
            boolean bondTypeFlag,
            boolean matchRings,
            boolean matchAtomType); }
Isomorphism extends BaseMapping implements Serializable { @Override public synchronized boolean isSubgraph() { float mappingSize; if (getMappingCount() > 0) { mappingSize = getAllAtomMapping().iterator().next().getCount(); } else { return false; } int sourceAtomCount = getQuery().getAtomCount(); int targetAtomCount = getTarget().getAtomCount(); if (mappingSize == sourceAtomCount && mappingSize <= targetAtomCount) { if (mappingSize == 1) { return true; } else if (!getAllBondMaps().isEmpty() && getAllBondMaps().iterator().next().size() == getQuery().getBondCount()) { return true; } } return false; } Isomorphism(
            IQueryAtomContainer query,
            IAtomContainer target,
            Algorithm algorithmType);  Isomorphism(
            IAtomContainer query,
            IAtomContainer target,
            Algorithm algorithmType,
            boolean bondTypeFlag,
            boolean matchRings,
            boolean matchAtomType); @Override synchronized boolean isSubgraph(); double getBondSensitiveMcGregorOut(); void setBondSenSitiveMcGregorOut(double bondSensitiveMcGregorOut); double getBondInSensitiveMcGregor(); void setBondInSenSitiveMcGregor(double bondInSensitiveMcGregor); }
Isomorphism extends BaseMapping implements Serializable { @Override public synchronized boolean isSubgraph() { float mappingSize; if (getMappingCount() > 0) { mappingSize = getAllAtomMapping().iterator().next().getCount(); } else { return false; } int sourceAtomCount = getQuery().getAtomCount(); int targetAtomCount = getTarget().getAtomCount(); if (mappingSize == sourceAtomCount && mappingSize <= targetAtomCount) { if (mappingSize == 1) { return true; } else if (!getAllBondMaps().isEmpty() && getAllBondMaps().iterator().next().size() == getQuery().getBondCount()) { return true; } } return false; } Isomorphism(
            IQueryAtomContainer query,
            IAtomContainer target,
            Algorithm algorithmType);  Isomorphism(
            IAtomContainer query,
            IAtomContainer target,
            Algorithm algorithmType,
            boolean bondTypeFlag,
            boolean matchRings,
            boolean matchAtomType); @Override synchronized boolean isSubgraph(); double getBondSensitiveMcGregorOut(); void setBondSenSitiveMcGregorOut(double bondSensitiveMcGregorOut); double getBondInSensitiveMcGregor(); void setBondInSenSitiveMcGregor(double bondInSensitiveMcGregor);  }