Class ValenceCheckOptions

java.lang.Object
chemaxon.core.calculations.valencecheck.ValenceCheckOptions
All Implemented Interfaces:
Serializable

@PublicApi public class ValenceCheckOptions extends Object implements 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-]
Since:
version 6.0
See Also:
  • Field Details

  • 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, Use ValenceCheckOptions.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 checked
      traditionalNAllowed - 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

      public static ValenceCheckOptions.Builder builder()
      Creates a new builder. Equivalent to new 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

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object