Package jgromacs.data
Class Residue
java.lang.Object
jgromacs.data.Residue
- All Implemented Interfaces:
Cloneable
Objects of this class represent a single residue
-
Constructor Summary
ConstructorsConstructorDescriptionResidue()
Constructs a new Residue objectResidue
(int index, String name, String chainID, ResidueType residueType) Constructs a new Residue object of given index, name, chainID and residue typeResidue
(int index, String name, ResidueType residueType) Constructs a new Residue object of given index, name and residue typeConstructs a new Residue object of given name -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a new atom to the residueclone()
Returns an identical Residue objectdouble
distanceAlphaCarbons
(Residue other) Returns the Euclidean distance of alpha-carbon atoms of this amino acid an anotherdouble
distanceClosest
(Residue other) Returns the Euclidean distance of the closest atoms of this amino acid and anotherdouble
distanceClosestHeavy
(Residue other) Returns the Euclidean distance of the closest heavy atoms of this amino acid and anotherboolean
Returns true if the two residues are identicalReturns the 1 letter code of residue typeReturns the 3 letter code of residue typeReturns the coordinates of all atomsReturns the alpha carbon atom if any (otherwise returns null)Returns the position of alpha-carbon atomgetAtom
(int i) Returns atom #i of the residuegetAtomByIndex
(int index) Returns the atom of given indexgetAtomByName
(String name) Returns the atom of nameReturns the index set of all atomsReturns the list of atoms as an ArrayList objectReturns the index set of backbone atomsReturns the beta carbon atom if any (otherwise returns null)Returns the carbonyl oxygen atom of amino acidReturns the chain ID of residueReturns residue index and the 3 letter code of residue typeReturns the C-terminal carbon atom of amino acidReturns the delta carbon atom if any (otherwise returns null)Returns the epsilon carbon atom if any (otherwise returns null)Returns the gamma carbon atom if any (otherwise returns null)Returns the index set of heavy atomsReturns the index set of hydrogen atomsint
getIndex()
Returns the index of residueReturns the index set of main chain atomsReturns the index set of main chain atoms and beta carbon atomReturns the index set of main chain atoms and hydrogen atomsgetName()
Returns the name of residueReturns the N-terminal nitrogen atom of amino acidint
Returns the number of atoms in the residueReturns the type of residueReturns the index set of side chain atomsReturns the index set of side chain atoms except of hydrogen atomsReturns the zeta carbon atom if any (otherwise returns null)int
hashCode()
Returns hash codeboolean
Returns true if it is an amino acidboolean
Returns true if the given atom is in the residueboolean
isOther()
Returns true if it is not an amino acid neither a water moleculeboolean
isWater()
Returns true if it is a water moleculevoid
removeAtom
(int i) Removes atom #i from the residuevoid
removeAtom
(Atom atom) Removes the given atom from the residuevoid
removeAtomByIndex
(int index) Removes atom of given index from the residuevoid
setAllAtomCoordinates
(PointList pointlist) Sets the coordinates of all atomsvoid
Replaces atom #i of the residue with the given atomvoid
setAtomCoordinates
(int i, Point3D coordinates) Sets the coordinates of atom #ivoid
setAtomOfIndexCoordinates
(int index, Point3D coordinates) Sets the coordinates of atom of given indexvoid
setChainID
(String chainID) Sets the chain ID of residuevoid
setIndex
(int index) Sets the index of residuevoid
Sets the name of residuevoid
setResidueType
(ResidueType residueType) Sets the type of residuetoString()
Returns the String representation of residueReturns summary information about the residue
-
Constructor Details
-
Residue
public Residue()Constructs a new Residue object -
Residue
Constructs a new Residue object of given name -
Residue
Constructs a new Residue object of given index, name and residue type -
Residue
Constructs a new Residue object of given index, name, chainID and residue type
-
-
Method Details
-
getIndex
public int getIndex()Returns the index of residue- Returns:
- index of the residue
-
setIndex
public void setIndex(int index) Sets the index of residue- Parameters:
index
- index of the residue
-
getName
Returns the name of residue- Returns:
- name of the residue
-
setName
Sets the name of residue- Parameters:
name
- name of the residue
-
getResidueType
Returns the type of residue- Returns:
- residue type
-
setResidueType
Sets the type of residue- Parameters:
residueType
- residue type
-
getChainID
Returns the chain ID of residue- Returns:
- chain ID of residue
-
setChainID
Sets the chain ID of residue- Parameters:
chainID
- chain ID
-
getNumberOfAtoms
public int getNumberOfAtoms()Returns the number of atoms in the residue- Returns:
- number of atoms
-
getAtomsAsArrayList
Returns the list of atoms as an ArrayList object- Returns:
- list of atoms as an ArrayList
-
getAtom
Returns atom #i of the residue- Returns:
- atom #i
-
getAtomByIndex
Returns the atom of given index- Parameters:
index
- index of atom- Returns:
- atom of given index
-
getAtomByName
Returns the atom of name- Parameters:
name
- name of atom- Returns:
- atom of given name
-
get1LetterCode
Returns the 1 letter code of residue type- Returns:
- 1 letter code
-
get3LetterCode
Returns the 3 letter code of residue type- Returns:
- 3 letter code
-
getCombinedCode
Returns residue index and the 3 letter code of residue type- Returns:
- combined code
-
addAtom
Adds a new atom to the residue- Parameters:
atom
- new atom
-
setAtom
Replaces atom #i of the residue with the given atom- Parameters:
atom
- new atom
-
removeAtom
public void removeAtom(int i) Removes atom #i from the residue -
removeAtom
Removes the given atom from the residue- Parameters:
atom
- the atom to be removed
-
removeAtomByIndex
public void removeAtomByIndex(int index) Removes atom of given index from the residue- Parameters:
index
- index of atom to be removed
-
getNTerminalNitrogen
Returns the N-terminal nitrogen atom of amino acid- Returns:
- N-terminal nitrogen atom
-
getAlphaCarbon
Returns the alpha carbon atom if any (otherwise returns null)- Returns:
- alpha carbon atom
-
getBetaCarbon
Returns the beta carbon atom if any (otherwise returns null)- Returns:
- beta carbon atom
-
getGammaCarbon
Returns the gamma carbon atom if any (otherwise returns null)- Returns:
- gamma carbon atom
-
getDeltaCarbon
Returns the delta carbon atom if any (otherwise returns null)- Returns:
- delta carbon atom
-
getEpsilonCarbon
Returns the epsilon carbon atom if any (otherwise returns null)- Returns:
- epsilon carbon atom
-
getZetaCarbon
Returns the zeta carbon atom if any (otherwise returns null)- Returns:
- zeta carbon atom
-
getCTerminalCarbon
Returns the C-terminal carbon atom of amino acid- Returns:
- C-terminal carbon atom
-
getCarbonylOxygen
Returns the carbonyl oxygen atom of amino acid- Returns:
- carbonyl oxygen atom
-
getAtomIndices
Returns the index set of all atoms- Returns:
- index set of all atoms
-
getHydrogenAtomIndices
Returns the index set of hydrogen atoms- Returns:
- index set of hydrogen atoms
-
getHeavyAtomIndices
Returns the index set of heavy atoms- Returns:
- index set of heavy atoms
-
getBackBoneAtomIndices
Returns the index set of backbone atoms- Returns:
- index set of backbone atoms
-
getMainChainAtomIndices
Returns the index set of main chain atoms- Returns:
- index set of main chain atoms
-
getMainChainPlusCbAtomIndices
Returns the index set of main chain atoms and beta carbon atom- Returns:
- index set of main chain atoms and beta carbon atom
-
getMainChainPlusHAtomIndices
Returns the index set of main chain atoms and hydrogen atoms- Returns:
- index set of main chain atoms and hydrogen atoms
-
getSideChainAtomIndices
Returns the index set of side chain atoms- Returns:
- index set of side chain atoms
-
getSideChainMinusHAtomIndices
Returns the index set of side chain atoms except of hydrogen atoms- Returns:
- index set of side chain atoms except of hydrogens
-
setAtomCoordinates
Sets the coordinates of atom #i- Parameters:
coordinates
- new atomic coordinates
-
setAtomOfIndexCoordinates
Sets the coordinates of atom of given index- Parameters:
coordinates
- new atomic coordinates
-
setAllAtomCoordinates
Sets the coordinates of all atoms- Parameters:
pointlist
- list of new atomic coordinates
-
getAllAtomCoordinates
Returns the coordinates of all atoms- Returns:
- list of atomic coordinates
-
getAlphaCarbonCoordinates
Returns the position of alpha-carbon atom- Returns:
- position of alpha-carbon atom
-
distanceAlphaCarbons
Returns the Euclidean distance of alpha-carbon atoms of this amino acid an another- Parameters:
other
- other amino acid- Returns:
- Euclidean distance of alpha-carbon atoms
-
distanceClosest
Returns the Euclidean distance of the closest atoms of this amino acid and another- Parameters:
other
- other amino acid- Returns:
- Euclidean distance of closest atoms
-
distanceClosestHeavy
Returns the Euclidean distance of the closest heavy atoms of this amino acid and another- Parameters:
other
- other amino acid- Returns:
- Euclidean distance of closest heavy atoms
-
isAminoAcid
public boolean isAminoAcid()Returns true if it is an amino acid -
isWater
public boolean isWater()Returns true if it is a water molecule -
isOther
public boolean isOther()Returns true if it is not an amino acid neither a water molecule -
isAtomIn
Returns true if the given atom is in the residue- Parameters:
atom
- the atom to search for
-
clone
Returns an identical Residue object -
toString
Returns the String representation of residue -
toStringInfo
Returns summary information about the residue- Returns:
- summary information
-
equals
Returns true if the two residues are identical -
hashCode
public int hashCode()Returns hash code
-