Class SymbolVisibility

java.lang.Object
org.openscience.cdk.renderer.SymbolVisibility
Direct Known Subclasses:
SelectionVisibility

public abstract class SymbolVisibility extends Object
Predicate that defines whether an atom symbol is displayed in a structure diagram.

 SymbolVisibility visibility = SymbolVisibility.iupacRecommendations();
 
Author:
John May
  • Constructor Details

    • SymbolVisibility

      public SymbolVisibility()
  • Method Details

    • visible

      public abstract boolean visible(IAtom atom, List<IBond> neighbors, RendererModel model)
      Determine if an atom with the specified bonds is visible.
      Parameters:
      atom - an atom
      neighbors - neighboring bonds
      Returns:
      whether the atom symbol is visible
    • all

      public static SymbolVisibility all()
      All atom symbols are visible.
      Returns:
      visibility that displays all symbols
    • iupacRecommendations

      public static SymbolVisibility iupacRecommendations()
      Displays a symbol based on the preferred representation from the IUPAC guidelines (GR-2.1.2) [Jonathan Brecher. Pure Appl. Chem. 2008. 80]. Carbons are unlabeled unless they have abnormal valence, parallel bonds, or are terminal (i.e. methyl, methylene, etc).
      Returns:
      symbol visibility instance
    • iupacRecommendationsWithoutTerminalCarbon

      public static SymbolVisibility iupacRecommendationsWithoutTerminalCarbon()
      Displays a symbol based on the acceptable representation from the IUPAC guidelines (GR-2.1.2) [Jonathan Brecher. Pure Appl. Chem. 2008. 80]. Carbons are unlabeled unless they have abnormal valence, parallel bonds. The recommendations note that it is acceptable to leave methyl groups unlabelled.
      Returns:
      symbol visibility instance