public interface IQueryTool
Modifier and Type | Method and Description |
---|---|
int |
countMatches()
Returns the number of times the pattern was found in the target molecule.
|
java.util.List<java.util.List<java.lang.Integer>> |
getMatchingAtoms()
Get the atoms in the target molecule that match the query pattern.
|
java.lang.String |
getSmarts()
Returns the current SMARTS pattern being used.
|
java.util.List<java.util.List<java.lang.Integer>> |
getUniqueMatchingAtoms()
Get the atoms in the target molecule that match the query pattern.
|
boolean |
matches(org.openscience.cdk.interfaces.IAtomContainer atomContainer)
Perform a SMARTS match and check whether the query is present in the target molecule.
|
boolean |
matches(org.openscience.cdk.interfaces.IAtomContainer atomContainer,
boolean forceInitialization)
Perform a SMARTS match and check whether the query is present in the target molecule.
|
void |
setQueryCacheSize(int maxEntries)
Set the maximum size of the query cache.
|
void |
setSmarts(java.lang.String smarts)
Set a new SMARTS pattern.
|
int countMatches()
matches(org.openscience.cdk.interfaces.IAtomContainer)
. If not, the results may be undefined.java.util.List<java.util.List<java.lang.Integer>> getMatchingAtoms()
java.lang.String getSmarts()
java.util.List<java.util.List<java.lang.Integer>> getUniqueMatchingAtoms()
boolean matches(org.openscience.cdk.interfaces.IAtomContainer atomContainer) throws org.openscience.cdk.exception.CDKException
atomContainer
- The target moleculoeorg.openscience.cdk.exception.CDKException
- if there is an error in ring, aromaticity or isomorphism perceptiongetMatchingAtoms()
,
countMatches()
,
matches(org.openscience.cdk.interfaces.IAtomContainer, boolean)
boolean matches(org.openscience.cdk.interfaces.IAtomContainer atomContainer, boolean forceInitialization) throws org.openscience.cdk.exception.CDKException
atomContainer
- The target moleculoeforceInitialization
- If true, then the molecule is initialized (ring perception, aromaticity etc). If
false, the molecule is only initialized if it is different (in terms of object
reference) than one supplied in a previous call to this method.org.openscience.cdk.exception.CDKException
- if there is an error in ring, aromaticity or isomorphism perceptiongetMatchingAtoms()
,
countMatches()
,
matches(org.openscience.cdk.interfaces.IAtomContainer)
void setQueryCacheSize(int maxEntries)
maxEntries
- The maximum number of entriesvoid setSmarts(java.lang.String smarts) throws org.openscience.cdk.exception.CDKException
smarts
- The new SMARTS patternorg.openscience.cdk.exception.CDKException
- if there is an error in parsing the pattern