JavaGenes, NASA Ames. Written largely by Al Globus

gov.nasa.javaGenes.forceFields
Class AlleleTemplate

java.lang.Object
  extended bygov.nasa.javaGenes.forceFields.AlleleTemplate
All Implemented Interfaces:
java.io.Serializable

public class AlleleTemplate
extends java.lang.Object
implements java.io.Serializable

a two-dimensional array of alleles. Each one-dimensional array also has a name. Two-dimensional arrays are used for convenience when searching for molecular mechanics parameters for multi-species potentials. Each chemical species gets one array and a name. By convention, any parameters that refer to two different species are found at the end of the array for each species. The first multi-species parameter refers to the zeroeth array, the second to Allele[1], etc. opt to the current species minus 1.

See Also:
allele, Serialized Form

Field Summary
protected  Allele[][] alleles
           
protected  java.lang.String[] names
          These names refer to the first dimension in alleles
 
Constructor Summary
AlleleTemplate(int onlyArraySize)
           
AlleleTemplate(int[] size)
           
 
Method Summary
 void addArray(int size)
           
 Allele getAllele(int i, int j)
           
 Allele getAllele(java.lang.String name)
           
 java.lang.String getHeader()
           
 int[] getIndices(java.lang.String name)
           
 java.lang.String getName(int index)
           
 int getSize(int index)
           
 boolean hasAllele(int i, int j)
           
 boolean hasArray(java.lang.String n)
           
 void makeFiles()
          create a file "alleles.tsd" with the allele information in it
 int numberOfArrays()
           
 void setAllele(Allele allele, int i, int j)
           
 void setName(java.lang.String name, int index)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

alleles

protected Allele[][] alleles

names

protected java.lang.String[] names
These names refer to the first dimension in alleles

Constructor Detail

AlleleTemplate

public AlleleTemplate(int[] size)
Parameters:
size - the sizes of the arrays

AlleleTemplate

public AlleleTemplate(int onlyArraySize)
Method Detail

addArray

public void addArray(int size)

hasArray

public boolean hasArray(java.lang.String n)

numberOfArrays

public int numberOfArrays()
Returns:
the number of allele arrays (alleles.length)

getSize

public int getSize(int index)
Returns:
the length of the index allele array

getAllele

public Allele getAllele(int i,
                        int j)

getAllele

public Allele getAllele(java.lang.String name)

getIndices

public int[] getIndices(java.lang.String name)

hasAllele

public boolean hasAllele(int i,
                         int j)
Returns:
true if an allele exists at the indicated location

setAllele

public void setAllele(Allele allele,
                      int i,
                      int j)

setName

public void setName(java.lang.String name,
                    int index)

getName

public java.lang.String getName(int index)

toString

public java.lang.String toString()

getHeader

public java.lang.String getHeader()

makeFiles

public void makeFiles()
create a file "alleles.tsd" with the allele information in it


JavaGenes, NASA Ames. Written largely by Al Globus