Enum Class FormulaGenerationRule
- All Implemented Interfaces:
Serializable
,Comparable<FormulaGenerationRule>
,java.lang.constant.Constable
Molecular formula generation settings.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionDot-disconnected molecular formula of a multifragment molecule.
For example:C7H5O2.Na
for sodium benzoate.Show the formal (total) charge at the end of the molecular formula, instead of showing the charge of each atom separately.
IfDOT_DISCONNECTED_FRAGMENTS
is also applied, then the charge of each fragment will be shown separately.
This rule has no effect ifIGNORE_CHARGE
is also applied.
For example:[O-]NO -> NO2[-]
Ignore charges in the generated molecular formula.
For example:[O-]N[O+] -> NO2
The generated molecular formula will not contain isotopic information.
For example:C5[13C]H6 -> C6H6
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
Returns true if the charge of each atom should be ignored in the formula based on the given rules.static boolean
showFormalCharge
(Set<FormulaGenerationRule> rules) Returns true if the formal charge should be shown at the end of the formula based on the given rules.static FormulaGenerationRule
Returns the enum constant of this class with the specified name.static FormulaGenerationRule[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
IGNORE_MASS_NUMBERS
The generated molecular formula will not contain isotopic information.
For example:C5[13C]H6 -> C6H6
-
IGNORE_CHARGE
Ignore charges in the generated molecular formula.
For example:[O-]N[O+] -> NO2
-
FORMAL_CHARGE
Show the formal (total) charge at the end of the molecular formula, instead of showing the charge of each atom separately.
IfDOT_DISCONNECTED_FRAGMENTS
is also applied, then the charge of each fragment will be shown separately.
This rule has no effect ifIGNORE_CHARGE
is also applied.
For example:[O-]NO -> NO2[-]
-
DOT_DISCONNECTED_FRAGMENTS
Dot-disconnected molecular formula of a multifragment molecule.
For example:C7H5O2.Na
for sodium benzoate.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
ignoreAtomCharges
Returns true if the charge of each atom should be ignored in the formula based on the given rules. -
showFormalCharge
Returns true if the formal charge should be shown at the end of the formula based on the given rules.
-