Package pl.poznan.put.pdb.analysis
Interface PdbResidue
- All Superinterfaces:
ChainNumberICode
,Comparable<ChainNumberICode>
,Serializable
- All Known Implementing Classes:
DefaultPdbResidue
,ImmutableDefaultPdbResidue
A residue (nucleotide or amino acid).
-
Method Summary
Modifier and TypeMethodDescriptionatoms()
default String
default PdbAtomLine
Finds an atom of a given name.default boolean
Compares the set of actual atoms in this residue with the set of expected atoms derived from the detected type of residue.default boolean
default boolean
Checks whether this residue has atom of the given name.default boolean
isConnectedTo
(PdbResidue other) Checks if this residue is connected with another one (seeMoleculeType.areConnected(PdbResidue, PdbResidue)
).default boolean
default boolean
default PdbNamedResidueIdentifier
default org.apache.commons.math3.geometry.euclidean.threed.Plane
Calculates the plane equation of the nucleobase in this residue.default char
default ResidueInformationProvider
Detects the type of residue by its name and atom content.default int
default String
toCif()
default String
toPdb()
Methods inherited from interface pl.poznan.put.pdb.ChainNumberICode
compareTo
-
Method Details
-
identifier
PdbResidueIdentifier identifier()- Returns:
- The identifier of a residue.
-
standardResidueName
String standardResidueName()- Returns:
- The usual name of the residue. For example, a pseudouridine will be seen as uracil here.
-
modifiedResidueName
String modifiedResidueName()- Returns:
- The name of the residue as read from PDB or mmCIF file.
-
atoms
List<PdbAtomLine> atoms()- Returns:
- The list of atoms.
-
toPdb
- Returns:
- A text representation of this residue in PDB format.
-
toCif
- Returns:
- A text representation of this residue in mmCIF format.
- Throws:
IOException
-
isMissing
default boolean isMissing()- Returns:
- True if the list of atoms is empty.
-
residueInformationProvider
Detects the type of residue by its name and atom content.- Returns:
- An instance with details about what this reside represents.
-
oneLetterName
default char oneLetterName()- Returns:
- A one letter name which is lowercase for modified residues and uppercase otherwise.
-
isConnectedTo
Checks if this residue is connected with another one (seeMoleculeType.areConnected(PdbResidue, PdbResidue)
).- Parameters:
other
- The other residue.- Returns:
- True if this residue and the other one are connected.
-
chainIdentifier
- Specified by:
chainIdentifier
in interfaceChainNumberICode
- Returns:
- The identifier of the chain a residue belongs to.
-
residueNumber
default int residueNumber()- Specified by:
residueNumber
in interfaceChainNumberICode
- Returns:
- The number of a residue in the chain.
-
insertionCode
- Specified by:
insertionCode
in interfaceChainNumberICode
- Returns:
- Optional insertion code, used in some PDB and mmCIF files to represent "inserted" residues while maintaining the original numbering.
-
findAtom
Finds an atom of a given name.- Parameters:
atomName
- An atom name.- Returns:
- An instance of atom (with coordinates) of the given type.
-
nucleobasePlane
default org.apache.commons.math3.geometry.euclidean.threed.Plane nucleobasePlane()Calculates the plane equation of the nucleobase in this residue. This method works only for nucleotides and will throw anIllegalArgumentException
for amino acids. The plane for purines (A or G) is based on N9, C2 and C6 atoms. The plane for pyrimidines (C, U or T) is based on N1, N3 and C5 atoms.- Returns:
- The plane of the nucleobase.
-
namedResidueIdentifier
- Returns:
- The instance of named identifier.
-
atomNames
- Returns:
- The set of all atom names available in this residue.
-
hasAtom
Checks whether this residue has atom of the given name.- Parameters:
atomName
- The atom name.- Returns:
- True if this residue has an atom of the given name.
-
hasAnyHydrogen
default boolean hasAnyHydrogen()- Returns:
- True if there is any hydrogen atom available in this residue.
-
hasAllHeavyAtoms
default boolean hasAllHeavyAtoms()Compares the set of actual atoms in this residue with the set of expected atoms derived from the detected type of residue.- Returns:
- True if all expected heavy atoms (non-hydrogen) for this residue type are present in this residue.
-
isModified
default boolean isModified()- Returns:
- True if the standard and modified residue names differ or if there are some atoms in the residue, but they do not match the expected set of atoms.
-