Class ValenceCheckOptions
java.lang.Object
chemaxon.core.calculations.valencecheck.ValenceCheckOptions
- All Implemented Interfaces:
Serializable
Class created to make valence calculation configurable.
There are two options at the moment:
- Use local or global aromatic calculation:
- Local aromatic calculation does not check the Huckel rule in aromatic rings, it checks only if the atom has a correct aromatic valence. E.g.: c1cccn1 and c1cccc[nH]1 is accepted
- Global aromatic calculation checks the Huckel rule and reports if the aromatic system is incorrect. Because it needs to find all the rings of the aromatic system, it's slower that the local method.
- Allow or deny traditional forms of 5 valence Nitrogen
- If allowed the following 5 valence Nitrogen atoms are not marked as valence errors:
- CN(=O)=O
- CN(=O)=C
- CN(C)=O
- CN(C)(C)=O
- c1ccccn1=O
- If denied, only the following forms are allowed (they allowed with both setting)
- C[N+](=O)[O-]
- C[N+]([O-])=C
- C[N+](C)(C)[O-]
- c1cccc[n1+][O-]
- If allowed the following 5 valence Nitrogen atoms are not marked as valence errors:
- Since:
- version 6.0
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Builder for ValenceCheckOptions. -
Field Summary
Modifier and TypeFieldDescriptionstatic final ValenceCheckOptions
The default options: bothisLocalAromatic()
andisTraditionalNitrogensAllowed()
return true.static final ValenceCheckOptions
An options object withisLocalAromatic()
returning false andisTraditionalNitrogensAllowed()
returning true. -
Constructor Summary
ConstructorDescriptionValenceCheckOptions
(boolean localAromatic, boolean traditionalNAllowed) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionstatic ValenceCheckOptions.Builder
builder()
Creates a new builder.boolean
int
hashCode()
boolean
Do not calculate valence for ambiguous aromatic atoms behaving like aromatic Nitrogens (e.g.boolean
Returns if the traditional way of the ylidene and nitro groups if true the N in CN(=O)=O, CN(C)(C)=O, CN(=C)=O and c1ccccn1=O is accepted if false they are marked as valence error.toString()
-
Field Details
-
DEFAULT
The default options: bothisLocalAromatic()
andisTraditionalNitrogensAllowed()
return true. -
GLOBAL
An options object withisLocalAromatic()
returning false andisTraditionalNitrogensAllowed()
returning true.
-
-
Constructor Details
-
ValenceCheckOptions
@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public ValenceCheckOptions(boolean localAromatic, boolean traditionalNAllowed) Deprecated, for removal: This API element is subject to removal in a future version.since Marvin 6.2, UseValenceCheckOptions.Builder
for building ValenceCheckOptions.- Parameters:
localAromatic
- Do not calculate valence for ambiguous aromatic atoms behaving like aromatic Nitrogens (e.g. N, O+ or C-) or Borons (e.g. B, C+). Ambiguous aromatic atoms are ignored in valence calculations if set to true and no global aromatic rules are checkedtraditionalNAllowed
- traditionalNitrogenAllowed the traditional way of the ylidene and nitro groups if true the N in CN(=O)=O, CN(C)(C)=O, CN(=C)=O and c1ccccn1=O is accepted if false they are marked as valence error.
-
-
Method Details
-
builder
Creates a new builder. Equivalent tonew Builder()
.- Returns:
- the new builder
-
isLocalAromatic
public boolean isLocalAromatic()Do not calculate valence for ambiguous aromatic atoms behaving like aromatic Nitrogens (e.g. N, O+ or C-) or Borons (e.g. B, C+). Ambiguous aromatic atoms are ignored in valence calculations if set to true and no global aromatic rules are checked- Returns:
- the local aromatic setting
-
isTraditionalNitrogensAllowed
public boolean isTraditionalNitrogensAllowed()Returns if the traditional way of the ylidene and nitro groups if true the N in CN(=O)=O, CN(C)(C)=O, CN(=C)=O and c1ccccn1=O is accepted if false they are marked as valence error.- Returns:
- if the traditional Nitrogen representation is allowed
-
equals
-
hashCode
public int hashCode() -
toString
-
ValenceCheckOptions.Builder
for building ValenceCheckOptions.