@TestClass(value="org.openscience.cdk.smiles.DeduceBondSystemToolTest") public class DeduceBondSystemTool extends Object
The calculation can be interrupted with setInterrupted(boolean)
,
but assumes that this class is not used in a threaded fashion. When a calculation
is interrupted, the boolean is reset to false.
Constructor and Description |
---|
DeduceBondSystemTool()
Constructor for the DeduceBondSystemTool object.
|
DeduceBondSystemTool(AllRingsFinder ringFinder)
Constructor for the DeduceBondSystemTool object accepting a custom
AllRingsFinder . |
Modifier and Type | Method and Description |
---|---|
IMolecule |
fixAromaticBondOrders(IMolecule molecule)
Added missing bond orders based on atom type information.
|
boolean |
isInterrupted()
Returns if the next or running calculation should be interrupted.
|
boolean |
isOK(IMolecule m)
Determines if, according to the algorithms implemented in this class, the given
molecule has properly distributed double bonds.
|
void |
setInterrupted(boolean interrupted)
Sets if the calculation should be interrupted.
|
@TestMethod(value="testConstructors") public DeduceBondSystemTool()
@TestMethod(value="testConstructors") public DeduceBondSystemTool(AllRingsFinder ringFinder)
AllRingsFinder
.ringFinder
- a custom AllRingsFinder
.@TestMethod(value="testPyrrole") public boolean isOK(IMolecule m) throws CDKException
m
- IMolecule
to check the bond orders for.CDKException
- thrown when something went wrong@TestMethod(value="xtestQuinone,xtestPyrrole") public IMolecule fixAromaticBondOrders(IMolecule molecule) throws CDKException
molecule
- IMolecule
for which to distribute double bond ordersIMolecule
with assigned double bonds.CDKException
- if something went wrong.@TestMethod(value="testInterruption") public void setInterrupted(boolean interrupted)
interrupted
- true, if the calculation should be canceled@TestMethod(value="testInterruption") public boolean isInterrupted()