Class pmr.molecule.AminoAcid
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class pmr.molecule.AminoAcid

java.lang.Object
   |
   +----pmr.molecule.AminoAcid

public class AminoAcid
extends Object
Provides the properties for a given aminoacid type; can retrieve these by 1- or 3(+)-letter codes; the latter has the capability of expanding to (say) HPRO, ORN, etc, whilst 1-letters are limited to one character. The term '3-letter' will refer to longer strings where necessary

Note that this class has (say) 20 instances and is effectively a provider of reference data and resettable properties such as colours.

Author:
(C) P. Murray-Rust, 1996

Constructor Index

 o AminoAcid(String, String, String, String, String[])
create from 1-letter, 3-letter, name, smiles, pdb atom names.

Method Index

 o debug()
 o get1Letter(String)
return 1-letter code if valid 3-letter arg, else "?"
 o get1LetterSequence(String[])
get a gapless string of 1-letter codes from an array of 3-letter Strings
 o get3Letter(String)
if the arg is 1-letter, return the 3-letter, else return unchanged; unknown 1-letter returns "UNK"
 o get3LetterSequence(String)
get an array of 3-letter Strings from a string of 1-letters; gaps are skipped
 o getAminoAcid(String)
get AminoAcid, hashed by one-letter or three-letter codes
 o getColor()
get the color of this AminoAcid
 o getFullName(String)
get fullname from code; returns null if not found
 o getHydrophobicity()
get hydrophobicity (Eisenberg, e.g.
 o getMonomerMolWt(String)
get molecular weight of 'monomer': -N-CH(R)-C(=O)- (i.e.
 o getPAM250(AminoAcid, AminoAcid)
returns score for a1 replacing a2 (from W.A.Pearson, Methods in Enzymology, (e.d R.Doolittle) ISBN 0-12-182084-X, Academic Press, San Diego, 183, (1990) 63-98

Not yet written

 o getRealProperty(String)
get a real value already set with setRealProperty(); if name is not found, returns Double.NaN;
 o getSMILES(String)
get SMILES from code; returns null if not found
 o main(String[])
a test program on a nonsense sequence
 o setColor(Color)
set the color of this AminoAcid
 o setColor(String, Color)
sets the colour of an amino acid by its code
 o setRealProperty(String, double)
set a real value (double) for a given property, indexed by case-insensitive string.

Constructors

 o AminoAcid
  public AminoAcid(String a1,
                   String a3,
                   String nam,
                   String sm,
                   String pdb[])
create from 1-letter, 3-letter, name, smiles, pdb atom names. This is not normally called except at static initialisation or if you discover a new AA.

Methods

 o setColor
  public static void setColor(String code,
                              Color color)
sets the colour of an amino acid by its code
 o setColor
  public void setColor(Color color)
set the color of this AminoAcid
 o getColor
  public Color getColor()
get the color of this AminoAcid
 o getHydrophobicity
  public double getHydrophobicity()
get hydrophobicity (Eisenberg, e.g. Fasman p 637)
 o setRealProperty
  public void setRealProperty(String name,
                              double value)
set a real value (double) for a given property, indexed by case-insensitive string. Example:
aa.setRealProperty("MYHYDROPHOB", 3.2);
 o getRealProperty
  public double getRealProperty(String name)
get a real value already set with setRealProperty(); if name is not found, returns Double.NaN;
 o getAminoAcid
  public static AminoAcid getAminoAcid(String code)
get AminoAcid, hashed by one-letter or three-letter codes
 o getFullName
  public static String getFullName(String code)
get fullname from code; returns null if not found
 o getSMILES
  public static String getSMILES(String code)
get SMILES from code; returns null if not found
 o getMonomerMolWt
  public static double getMonomerMolWt(String code)
get molecular weight of 'monomer': -N-CH(R)-C(=O)- (i.e. missing OH2. These monomers can be combined to give the molecular weight of a peptide. Neutral monomers are used. unknown code returns 0.0;
 o get3Letter
  public static String get3Letter(String code)
if the arg is 1-letter, return the 3-letter, else return unchanged; unknown 1-letter returns "UNK"
 o get1Letter
  public static String get1Letter(String code)
return 1-letter code if valid 3-letter arg, else "?"
 o get3LetterSequence
  public static String[] get3LetterSequence(String s1)
get an array of 3-letter Strings from a string of 1-letters; gaps are skipped
 o get1LetterSequence
  public static String get1LetterSequence(String s3[])
get a gapless string of 1-letter codes from an array of 3-letter Strings
 o getPAM250
  public int getPAM250(AminoAcid a1,
                       AminoAcid a2)
returns score for a1 replacing a2 (from W.A.Pearson, Methods in Enzymology, (e.d R.Doolittle) ISBN 0-12-182084-X, Academic Press, San Diego, 183, (1990) 63-98

Not yet written

 o debug
  public void debug()
 o main
  public static void main(String args[])
a test program on a nonsense sequence

All Packages  Class Hierarchy  This Package  Previous  Next  Index