Class PartialAtomicChargeColors

  • All Implemented Interfaces:
    IAtomColorer

    public class PartialAtomicChargeColors
    extends Object
    implements IAtomColorer
    Class defining the color which with atoms are colored.

    This scheme used the atomic partial charge to determine the Atom's color: uncharged atoms are colored white, positively charged atoms are blue, and negatively charge atoms are red.

    Source code:
    main
    Belongs to CDK module:
    render
    Keywords:
    atom coloring, partial charges
    • Constructor Detail

      • PartialAtomicChargeColors

        public PartialAtomicChargeColors()
    • Method Detail

      • getAtomColor

        public Color getAtomColor​(IAtom atom)
        Returns the a color reflecting the given atom's partial charge.
        Specified by:
        getAtomColor in interface IAtomColorer
        Parameters:
        atom - IAtom to get a color for
        Returns:
        the color for the given atom.
      • getAtomColor

        public Color getAtomColor​(IAtom atom,
                                  Color defaultColor)
        Returns the a color reflecting the given atom's partial charge, or defaults to the given color if no color is defined.
        Specified by:
        getAtomColor in interface IAtomColorer
        Parameters:
        atom - IAtom to get a color for
        defaultColor - Color returned if this scheme does not define a color for the passed IAtom
        Returns:
        the color for the given atom.