Enum Class HydrogenState

java.lang.Object
java.lang.Enum<HydrogenState>
org.openscience.cdk.tools.manipulator.HydrogenState
All Implemented Interfaces:
Serializable, Comparable<HydrogenState>, Constable

public enum HydrogenState extends Enum<HydrogenState>
This set of constants controls how hydrogens are stored in chemical graphs. In an organic molecule typically half the atoms are hydrogen, it is inefficient to store them all as explicit IAtom instances, so they are commonly stored as a count on their parent atom. In CDK we refer to this as an implicit hydrogen count and is distinct from "implicit" hydrogens where the count is inferred. Except for Unsafe you can safely convert between this implicit count and explicit hydrogen representation without information loss.
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Explicit hydrogens will be kept/added on atoms/bonds with stereochemistry where the hydrogen assists in depiction.
    All hydrogens will be kept as explicit kept (if they are already) or converted to explicit and the count updated to 0.
    All explicit hydrogens that can safely be converted to a count on their attached atom will be suppressed.
    Explicit hydrogens will be kept/added on all atoms/bonds with stereochemistry.
    Contract all explicit hydrogens including bridged hydrogens (B2H6), hydrogens with atom maps, isotopic, polymer head/tails, and molecular hydrogen/ions.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the enum constant of this class with the specified name.
    static HydrogenState[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • Unsafe

      public static final HydrogenState Unsafe
      Contract all explicit hydrogens including bridged hydrogens (B2H6), hydrogens with atom maps, isotopic, polymer head/tails, and molecular hydrogen/ions. Using this option means in some cases the molecular formula will change and/or be irreversible back to the original state.
    • Minimal

      public static final HydrogenState Minimal
      All explicit hydrogens that can safely be converted to a count on their attached atom will be suppressed. Molecular hydrogen is left as [H][H].
    • Explicit

      public static final HydrogenState Explicit
      All hydrogens will be kept as explicit kept (if they are already) or converted to explicit and the count updated to 0.
    • Stereo

      public static final HydrogenState Stereo
      Explicit hydrogens will be kept/added on all atoms/bonds with stereochemistry. Other explicit hydrogens that can safely be suppressed will be.
    • Depiction

      public static final HydrogenState Depiction
      Explicit hydrogens will be kept/added on atoms/bonds with stereochemistry where the hydrogen assists in depiction. This includes tetrahedral atoms which are "boxed in" by three other stereo-centres (making it impossible to unambiguously wedge a bond) as well as atoms with 3 or more ring bonds which are easy to understand with an explicit hydrogen. Hydrogens will also be kept/added on Allene like molecules and inorganic (octahedral/square planar) configurations. Any other explicit hydrogens that can safely be suppressed will be.
  • Method Details

    • values

      public static HydrogenState[] 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

      public static HydrogenState valueOf(String name)
      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 name
      NullPointerException - if the argument is null