Class PartialAtomicChargeColors
- java.lang.Object
-
- org.openscience.cdk.renderer.color.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 Summary
Constructors Constructor Description PartialAtomicChargeColors()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Color
getAtomColor(IAtom atom)
Returns the a color reflecting the given atom's partial charge.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.
-
-
-
Method Detail
-
getAtomColor
public Color getAtomColor(IAtom atom)
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
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 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.
-
-