public class NitrogenRule extends Object implements IRule
If a compound has an odd number of nitrogen atoms, then the molecular ion (the [M]+) will have an odd mass and the value for m/e will be odd.
If a compound has no nitrogen atom or an even number of nitrogen atoms, then the m/e value of [M]+ will be even.
| Name | Default | Description |
| charge | 0.0 | The Nitrogen rule of MolecularFormula |
| Constructor and Description |
|---|
NitrogenRule()
Constructor for the NitrogenRule object.
|
| Modifier and Type | Method and Description |
|---|---|
Object[] |
getParameters()
Gets the parameters attribute of the NitrogenRule object.
|
void |
setParameters(Object[] params)
Sets the parameters attribute of the NitrogenRule object.
|
double |
validate(IMolecularFormula formula)
Validate the nitrogen rule of this IMolecularFormula.
|
public void setParameters(Object[] params) throws CDKException
setParameters in interface IRuleparams - The new parameters valueCDKException - Description of the ExceptiongetParameters()public Object[] getParameters()
getParameters in interface IRulesetParameters(java.lang.Object[])public double validate(IMolecularFormula formula) throws CDKException
validate in interface IRuleformula - Parameter is the IMolecularFormulaCDKException - if an error occurs during the validation. See
documentation for individual rulesCopyright © 2018. All Rights Reserved.