@TestClass(value="org.openscience.cdk.tools.manipulator.BondManipulatorTest") public class BondManipulator extends Object
AtomContainerManipulator.replaceAtomByAtom(container, atom1, atom2);will replace the Atom in the AtomContainer, but in all the ElectronContainer's it participates too.
Constructor and Description |
---|
BondManipulator() |
Modifier and Type | Method and Description |
---|---|
static IBond.Order |
createBondOrder(double bondOrder)
Convenience method to convert a double into an IBond.Order.
|
static IBond.Order |
decreaseBondOrder(IBond.Order oldOrder)
Returns the IBond.Order one lower.
|
static void |
decreaseBondOrder(IBond bond)
Decrease the order of a bond.
|
static double |
destroyBondOrder(IBond.Order bondOrder)
Convert a
IBond.Order to a numeric value. |
static IAtom[] |
getAtomArray(IBond container)
Constructs an array of Atom objects from Bond.
|
static IBond.Order |
getMaximumBondOrder(Iterator<IBond> bonds)
Returns the maximum bond order for a List of bonds, given an iterator to the list.
|
static IBond.Order |
getMaximumBondOrder(List<IBond> bonds)
Returns the maximum bond order for a List of bonds.
|
static IBond.Order |
getMinimumBondOrder(Iterator<IBond> bonds)
Returns the minimum bond order for a List of bonds, given an iterator
to the list.
|
static IBond.Order |
getMinimumBondOrder(List<IBond> bonds)
Returns the minimum bond order for a List of bonds.
|
static int |
getSingleBondEquivalentSum(Iterator<IBond> bonds)
Get the single bond equivalent (SBE) of a list of bonds, given an iterator to the list.
|
static int |
getSingleBondEquivalentSum(List<IBond> bonds)
Get the single bond equivalent (SBE) of a list of bonds.
|
static IBond.Order |
increaseBondOrder(IBond.Order oldOrder)
Returns the IBond.Order one higher.
|
static void |
increaseBondOrder(IBond bond)
Increment the bond order of this bond.
|
static boolean |
isHigherOrder(IBond.Order first,
IBond.Order second)
Returns true if the first bond has a higher bond order than the second bond.
|
static boolean |
isLowerOrder(IBond.Order first,
IBond.Order second)
Returns true if the first bond has a lower bond order than the second bond.
|
@TestMethod(value="testGetAtomArray_IBond") public static IAtom[] getAtomArray(IBond container)
container
- The Bond object.@TestMethod(value="testIsLowerOrder_IBond_Order_IBond_Order") public static boolean isLowerOrder(IBond.Order first, IBond.Order second)
first
- The first bond order objectsecond
- The second bond order objectisHigherOrder(org.openscience.cdk.interfaces.IBond.Order, org.openscience.cdk.interfaces.IBond.Order)
@TestMethod(value="testIsHigherOrder_IBond_Order_IBond_Order") public static boolean isHigherOrder(IBond.Order first, IBond.Order second)
first
- The first bond order objectsecond
- The second bond order objectisLowerOrder(org.openscience.cdk.interfaces.IBond.Order, org.openscience.cdk.interfaces.IBond.Order)
@TestMethod(value="testIncreaseBondOrder_IBond_Order") public static IBond.Order increaseBondOrder(IBond.Order oldOrder)
oldOrder
- the old orderincreaseBondOrder(org.openscience.cdk.interfaces.IBond)
,
decreaseBondOrder(org.openscience.cdk.interfaces.IBond.Order)
,
decreaseBondOrder(org.openscience.cdk.interfaces.IBond)
@TestMethod(value="testIncreaseBondOrder_IBond") public static void increaseBondOrder(IBond bond)
bond
- The bond whose order is to be incrementedincreaseBondOrder(org.openscience.cdk.interfaces.IBond.Order)
,
decreaseBondOrder(org.openscience.cdk.interfaces.IBond.Order)
,
decreaseBondOrder(org.openscience.cdk.interfaces.IBond)
@TestMethod(value="testDecreaseBondOrder_IBond_Order") public static IBond.Order decreaseBondOrder(IBond.Order oldOrder)
oldOrder
- the old orderdecreaseBondOrder(org.openscience.cdk.interfaces.IBond)
,
increaseBondOrder(org.openscience.cdk.interfaces.IBond.Order)
,
increaseBondOrder(org.openscience.cdk.interfaces.IBond.Order)
@TestMethod(value="testDecreaseBondOrder_IBond") public static void decreaseBondOrder(IBond bond)
bond
- The bond in questiondecreaseBondOrder(org.openscience.cdk.interfaces.IBond.Order)
,
increaseBondOrder(org.openscience.cdk.interfaces.IBond.Order)
,
increaseBondOrder(org.openscience.cdk.interfaces.IBond.Order)
@TestMethod(value="testCreateBondOrder_double") public static IBond.Order createBondOrder(double bondOrder)
bondOrder
- The numerical bond orderIBond.Order
destroyBondOrder(org.openscience.cdk.interfaces.IBond.Order)
@TestMethod(value="testDestroyBondOrder_IBond_Order") public static double destroyBondOrder(IBond.Order bondOrder)
IBond.Order
to a numeric value.
Single, double, triple and quadruple bonds are converted to 1.0, 2.0, 3.0
and 4.0 respectively.bondOrder
- The bond order objectcreateBondOrder(double)
@TestMethod(value="testGetMaximumBondOrder_List") public static IBond.Order getMaximumBondOrder(List<IBond> bonds)
bonds
- The list of bonds to search throughgetMaximumBondOrder(java.util.Iterator)
@TestMethod(value="testGetMaximumBondOrder_Iterator") public static IBond.Order getMaximumBondOrder(Iterator<IBond> bonds)
bonds
- An iterator for the list of bondsgetMaximumBondOrder(java.util.List)
@TestMethod(value="testGetMinimumBondOrder_List") public static IBond.Order getMinimumBondOrder(List<IBond> bonds)
bonds
- The list of bonds to search throughgetMinimumBondOrder(java.util.Iterator)
@TestMethod(value="testGetMinimumBondOrder_Iterator") public static IBond.Order getMinimumBondOrder(Iterator<IBond> bonds)
bonds
- An iterator for the list of bondsgetMinimumBondOrder(java.util.List)
@TestMethod(value="testGetSingleBondEquivalentSum_List") public static int getSingleBondEquivalentSum(List<IBond> bonds)
bonds
- The list of bondsgetSingleBondEquivalentSum(java.util.Iterator)
@TestMethod(value="testGetSingleBondEquivalentSum_Iterator") public static int getSingleBondEquivalentSum(Iterator<IBond> bonds)
bonds
- An iterator to the list of bonds