gov.nasa.javaGenes.forceFields
Class AlleleTemplate
java.lang.Object
gov.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 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
alleles
protected Allele[][] alleles
names
protected java.lang.String[] names
- These names refer to the first dimension in alleles
AlleleTemplate
public AlleleTemplate(int[] size)
- Parameters:
size
- the sizes of the arrays
AlleleTemplate
public AlleleTemplate(int onlyArraySize)
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