public final class AllRingsFinder extends Object
AllRingsFinder.Threshold values have been precomputed on
PubChem-Compound and can be used with the usingThreshold(Threshold).
Alternatively, other ring sets which are a subset of this set offer a
tractable alternative.
AllRingsFinder arf = new AllRingsFinder();
for (IAtomContainer m : ms) {
try {
IRingSet rs = arf.findAllRings(m);
} catch (CDKException e) {
// molecule was too complex, handle error
}
}
| Modifier and Type | Class and Description |
|---|---|
static class |
AllRingsFinder.Threshold
The threshold values provide a limit at which the computation stops.
|
| Constructor and Description |
|---|
AllRingsFinder()
Default constructor using a threshold of
AllRingsFinder.Threshold.PubChem_99. |
AllRingsFinder(boolean logging)
Deprecated.
turn logging off by setting the level in the logger
implementation
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkTimeout()
Deprecated.
timeout not used
|
IRingSet |
findAllRings(IAtomContainer container)
Compute all rings in the given
IAtomContainer. |
IRingSet |
findAllRings(IAtomContainer container,
int maxRingSize)
Compute all rings up to and including the maxRingSize.
|
IRingSet |
findAllRingsInIsolatedRingSystem(IAtomContainer container)
Compute all rings in the given
IAtomContainer. |
IRingSet |
findAllRingsInIsolatedRingSystem(IAtomContainer atomContainer,
int maxRingSize)
Compute all rings up to an including the maxRingSize.
|
long |
getTimeout()
Deprecated.
timeout not used
|
AllRingsFinder |
setTimeout(long timeout)
Deprecated.
use the new threshold (during construction)
|
static AllRingsFinder |
usingThreshold(AllRingsFinder.Threshold threshold)
Create an
AllRingsFinder instance using the given threshold. |
@Deprecated public AllRingsFinder(boolean logging)
logging - true=logging will be done (slower), false = no logging.public AllRingsFinder()
AllRingsFinder.Threshold.PubChem_99.public IRingSet findAllRings(IAtomContainer container) throws CDKException
IAtomContainer. The container is
first partitioned into ring systems which are then processed separately.
If the molecule has already be partitioned, consider using findAllRingsInIsolatedRingSystem(IAtomContainer).container - The AtomContainer to be searched for ringsCDKException - An exception thrown if the threshold was exceededfindAllRings(IAtomContainer, int),
findAllRingsInIsolatedRingSystem(IAtomContainer)public IRingSet findAllRings(IAtomContainer container, int maxRingSize) throws CDKException
findAllRingsInIsolatedRingSystem(IAtomContainer, int).container - The AtomContainer to be searched for ringsmaxRingSize - Maximum ring size to consider. Provides a possible
breakout from recursion for complex compounds.CDKException - An exception thrown if the threshold was exceededpublic IRingSet findAllRingsInIsolatedRingSystem(IAtomContainer container) throws CDKException
IAtomContainer. No pre-processing
is done on the container.container - The Atom Container to find the ring systems ofCDKException - An exception thrown if the threshold was exceededpublic IRingSet findAllRingsInIsolatedRingSystem(IAtomContainer atomContainer, int maxRingSize) throws CDKException
atomContainer - the molecule to be searched for ringsmaxRingSize - Maximum ring size to consider. Provides a possible
breakout from recursion for complex compounds.CDKException - An exception thrown if the threshold was exceeded@Deprecated public void checkTimeout() throws CDKException
CDKException - The exception thrown in case of hitting the timeout@Deprecated public AllRingsFinder setTimeout(long timeout)
timeout - The new timeout value@Deprecated public long getTimeout()
public static AllRingsFinder usingThreshold(AllRingsFinder.Threshold threshold)
AllRingsFinder instance using the given threshold.
// import static AllRingsFinder.Threshold.PubChem_99; AllRingsFinder arf = AllRingsFinder.usingThreshold(PubChem_99);
threshold - the threshold valueCopyright © 2022. All rights reserved.