org.proteinshader.structure.enums
Enum AAColorEnum

java.lang.Object
  extended by java.lang.Enum<AAColorEnum>
      extended by org.proteinshader.structure.enums.AAColorEnum
All Implemented Interfaces:
Serializable, Comparable<AAColorEnum>

public enum AAColorEnum
extends Enum<AAColorEnum>

Provides an enumeration of an amino acid color scheme.

The amino acid color scheme used here was found at: http://life.nthu.edu.tw/~fmhsu/rasframe/COLORS.HTM

This color scheme is used by RasMol and is based on the amino acid color scheme used in Bob Fletterick's "Shapely Models".

The RGB values are shown below on a 0 to 255 scale, but they are converted to floats on a scale from 0.0 to 1.0 by the private constructor for AAColorEnum.


Enum Constant Summary
BLACK
          RGB = (0, 0, 0) for unknown.
BLUE
          RGB = (20, 90, 255) for LYS and ARG.
BRIGHT_RED
          RGB = (230, 10, 10) for ASP and GLU.
CYAN
          RGB = (0, 220, 220) for ASN and GLN.
DARK_GRAY
          RGB = (200, 200, 200) for ALA.
GREEN
          RGB = (15, 130, 15) for LEU, VAL, and ILE.
LIGHT_GRAY
          RGB = (235, 235, 235) for GLY.
MID_BLUE
          RGB = (50, 50, 170) for PHE and TYR.
ORANGE
          RGB = (250, 150, 0) for SER and THR.
PALE_BLUE
          RGB = (130, 130, 210) for HIS.
PEACH
          RGB = (220, 150, 130) for PRO.
PINK
          RGB = (180, 90, 180) for TRP.
YELLOW
          RGB = (230, 230, 0) for CYS and MET.
 
Method Summary
 float getBlue()
          Returns the blue component of the RGBA color as a float in the range from 0.0 to 1.0, inclusive.
 float getGreen()
          Returns the green component of the RGBA color as a float in the range from 0.0 to 1.0, inclusive.
 float getRed()
          Returns the red component of the RGBA color as a float in the range from 0.0 to 1.0, inclusive.
static AAColorEnum valueOf(String name)
          Returns the enum constant of this type with the specified name.
static AAColorEnum[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

BRIGHT_RED

public static final AAColorEnum BRIGHT_RED
RGB = (230, 10, 10) for ASP and GLU.


YELLOW

public static final AAColorEnum YELLOW
RGB = (230, 230, 0) for CYS and MET.


BLUE

public static final AAColorEnum BLUE
RGB = (20, 90, 255) for LYS and ARG.


ORANGE

public static final AAColorEnum ORANGE
RGB = (250, 150, 0) for SER and THR.


MID_BLUE

public static final AAColorEnum MID_BLUE
RGB = (50, 50, 170) for PHE and TYR.


CYAN

public static final AAColorEnum CYAN
RGB = (0, 220, 220) for ASN and GLN.


LIGHT_GRAY

public static final AAColorEnum LIGHT_GRAY
RGB = (235, 235, 235) for GLY.


GREEN

public static final AAColorEnum GREEN
RGB = (15, 130, 15) for LEU, VAL, and ILE.


DARK_GRAY

public static final AAColorEnum DARK_GRAY
RGB = (200, 200, 200) for ALA.


PINK

public static final AAColorEnum PINK
RGB = (180, 90, 180) for TRP.


PALE_BLUE

public static final AAColorEnum PALE_BLUE
RGB = (130, 130, 210) for HIS.


PEACH

public static final AAColorEnum PEACH
RGB = (220, 150, 130) for PRO. PEACH has been used to replace the politically incorrect FLESH because of the Crayola Crayon brew-haha.


BLACK

public static final AAColorEnum BLACK
RGB = (0, 0, 0) for unknown.

Method Detail

values

public static final AAColorEnum[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(AAColorEnum c : AAColorEnum.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static AAColorEnum valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name

getRed

public float getRed()
Returns the red component of the RGBA color as a float in the range from 0.0 to 1.0, inclusive.

Returns:
The red value as a float.

getGreen

public float getGreen()
Returns the green component of the RGBA color as a float in the range from 0.0 to 1.0, inclusive.

Returns:
The green value as a float.

getBlue

public float getBlue()
Returns the blue component of the RGBA color as a float in the range from 0.0 to 1.0, inclusive.

Returns:
The blue value as a float.


Copyright © 2007-2008