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)
Deprecated.
use
IBond.Order.numeric().doubleValue() instead |
static IAtom[] |
getAtomArray(IBond container)
Constructs an array of Atom objects from Bond.
|
static IBond.Order |
getMaximumBondOrder(IBond.Order firstOrder,
IBond.Order secondOrder)
Returns the maximum bond order for the two bond orders.
|
static IBond.Order |
getMaximumBondOrder(IBond firstBond,
IBond secondBond)
Returns the maximum bond order for the two bonds.
|
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.
|
public static IAtom[] getAtomArray(IBond container)
container
- The Bond object.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)
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)
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)
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)
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)
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)
public static IBond.Order createBondOrder(double bondOrder)
bondOrder
- The numerical bond orderIBond.Order
destroyBondOrder(org.openscience.cdk.interfaces.IBond.Order)
public static double destroyBondOrder(IBond.Order bondOrder)
IBond.Order.numeric().doubleValue()
insteadIBond.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)
public static IBond.Order getMaximumBondOrder(List<IBond> bonds)
bonds
- The list of bonds to search throughgetMaximumBondOrder(java.util.Iterator)
public static IBond.Order getMaximumBondOrder(Iterator<IBond> bonds)
bonds
- An iterator for the list of bondsgetMaximumBondOrder(java.util.List)
public static IBond.Order getMaximumBondOrder(IBond firstBond, IBond secondBond)
firstBond
- first bond to comparesecondBond
- second bond to comparepublic static IBond.Order getMaximumBondOrder(IBond.Order firstOrder, IBond.Order secondOrder)
firstOrder
- first bond order to comparesecondOrder
- second bond order to comparepublic static IBond.Order getMinimumBondOrder(List<IBond> bonds)
bonds
- The list of bonds to search throughgetMinimumBondOrder(java.util.Iterator)
public static IBond.Order getMinimumBondOrder(Iterator<IBond> bonds)
bonds
- An iterator for the list of bondsgetMinimumBondOrder(java.util.List)
public static int getSingleBondEquivalentSum(List<IBond> bonds)
bonds
- The list of bondsgetSingleBondEquivalentSum(java.util.Iterator)
Copyright © 2021. All rights reserved.