Class 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:
    Serialized Form
    • Constructor Detail

      • ValenceCheckOptions

        @Deprecated
        public ValenceCheckOptions​(boolean localAromatic,
                                   boolean traditionalNallowed)
        Deprecated.
        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 Detail

      • 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
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object