Class PartialAtomicChargeColors
java.lang.Object
org.openscience.cdk.renderer.color.PartialAtomicChargeColors
- All Implemented Interfaces:
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAtomColor
(IAtom atom) Returns the a color reflecting the given atom's partial charge.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.
-
Constructor Details
-
PartialAtomicChargeColors
public PartialAtomicChargeColors()
-
-
Method Details
-
getAtomColor
Returns the a color reflecting the given atom's partial charge.- Specified by:
getAtomColor
in interfaceIAtomColorer
- Parameters:
atom
- IAtom to get a color for- Returns:
- the color for the given atom.
-
getAtomColor
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 interfaceIAtomColorer
- Parameters:
atom
- IAtom to get a color fordefaultColor
- Color returned if this scheme does not define a color for the passed IAtom- Returns:
- the color for the given atom.
-