Class RDBERule
- java.lang.Object
-
- org.openscience.cdk.formula.rules.RDBERule
-
- All Implemented Interfaces:
IRule
public class RDBERule extends Object implements IRule
Ring Double Bond Equivalents (RDBE) or Double Bond Equivalents (DBE) are calculated from valence values of elements contained in a formula and should tell the number of bonds - or rings. Since this formula will fail for MFs with higher valence states such as N(V), P(V), S(IV) or S(VI), this method will focus on the lowest valence state for these elements.
The equation used is: D = 1 + [0.5 SUM_i(N_i(V_I-2))]
where D is the unsaturation, i is the total number of different elements in the composition, N_i the number of atoms of element i, and Vi is the common valence of the atom i.
Table 1: Parameters set by this rule. Name Default Description charge 0.0 The RDBE rule of MolecularFormula - Author:
- miguelrojasch
- Source code:
- main
- Belongs to CDK module:
- formula
- Created on:
- 2008-06-11
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
RDBERule.Combinations
-
Constructor Summary
Constructors Constructor Description RDBERule()
Constructor for the RDBE object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object[]
getParameters()
Gets the parameters attribute of the RDBRule object.List<Double>
getRDBEValue(IMolecularFormula formula)
Method to extract the Ring Double Bond Equivalents (RDB) value.void
setParameters(Object[] params)
Sets the parameters attribute of the RDBE object.double
validate(IMolecularFormula formula)
Validate the RDBRule of this IMolecularFormula.boolean
validate(IMolecularFormula formula, double value)
Validate the ion state.
-
-
-
Method Detail
-
setParameters
public void setParameters(Object[] params) throws CDKException
Sets the parameters attribute of the RDBE object.- Specified by:
setParameters
in interfaceIRule
- Parameters:
params
- The new parameters value- Throws:
CDKException
- Description of the Exception- See Also:
getParameters()
-
getParameters
public Object[] getParameters()
Gets the parameters attribute of the RDBRule object.- Specified by:
getParameters
in interfaceIRule
- Returns:
- The parameters value
- See Also:
setParameters(java.lang.Object[])
-
validate
public double validate(IMolecularFormula formula) throws CDKException
Validate the RDBRule of this IMolecularFormula.- Specified by:
validate
in interfaceIRule
- Parameters:
formula
- Parameter is the IMolecularFormula- Returns:
- A double value meaning 1.0 True, 0.0 False
- Throws:
CDKException
- if an error occurs during the validation. See documentation for individual rules
-
validate
public boolean validate(IMolecularFormula formula, double value) throws CDKException
Validate the ion state. It takes into account that neutral, nonradical compounds always have an even-numbered pair-wiser arrangement of binding electrons signilizaded by an integer DBE value. Charged compounds due to soft ionzation techniques will give an odd number of binding electrons and a fractional DBE (X.05).- Parameters:
formula
- Parameter is the IMolecularFormulavalue
- The RDBE value- Returns:
- True, if corresponds with
- Throws:
CDKException
-
getRDBEValue
public List<Double> getRDBEValue(IMolecularFormula formula)
Method to extract the Ring Double Bond Equivalents (RDB) value. It test all possible oxidation states.- Parameters:
formula
- The IMolecularFormula object- Returns:
- The RDBE value
- See Also:
createTable()
-
-