Package pl.poznan.put.pdb
Class PdbAtomLine
java.lang.Object
pl.poznan.put.pdb.PdbAtomLine
- All Implemented Interfaces:
Serializable
,Comparable<ChainNumberICode>
,ChainNumberICode
- Direct Known Subclasses:
ImmutablePdbAtomLine
Representation of ATOM and HETATM lines in both PDB and mmCIF files.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract String
atomName()
abstract String
abstract String
charge()
final AtomName
final double
distanceTo
(PdbAtomLine other) Calculates the euclidean distance to another atom.abstract String
abstract double
static PdbAtomLine
Parses text as ATOM or HETATM line in strict mode (all 80 characters in the line are required).static PdbAtomLine
Parses text as ATOM or HETATM line in a strict or non-strict mode.abstract String
abstract int
abstract int
abstract double
final String
toCif()
Creates an ATOM line in mmCIF format.final String
toPdb()
Creates an ATOM line in PDB format.final String
toString()
final org.apache.commons.math3.geometry.euclidean.threed.Vector3D
abstract double
x()
abstract double
y()
abstract double
z()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface pl.poznan.put.pdb.ChainNumberICode
compareTo
-
Constructor Details
-
PdbAtomLine
public PdbAtomLine()
-
-
Method Details
-
parse
Parses text as ATOM or HETATM line in strict mode (all 80 characters in the line are required).- Parameters:
line
- A text in PDB format (ATOM or HETATM).- Returns:
- An instance of this class with fields containing values parsed from the text.
-
parse
Parses text as ATOM or HETATM line in a strict or non-strict mode.- Parameters:
line
- A text in PDB format (ATOM or HETATM).strictMode
- If true, then all 80 characters are required, otherwise the "bare minimum" of 54 characters.- Returns:
- An instance of this class with fields containing values parsed from the text.
-
serialNumber
@Parameter(order=1) @Auxiliary public abstract int serialNumber()- Returns:
- The value of the
serialNumber
attribute
-
atomName
- Returns:
- The value of the
atomName
attribute
-
alternateLocation
- Returns:
- The value of the
alternateLocation
attribute
-
residueName
- Returns:
- The value of the
residueName
attribute
-
chainIdentifier
- Specified by:
chainIdentifier
in interfaceChainNumberICode
- Returns:
- The value of the
chainIdentifier
attribute
-
residueNumber
@Parameter(order=6) public abstract int residueNumber()- Specified by:
residueNumber
in interfaceChainNumberICode
- Returns:
- The value of the
residueNumber
attribute
-
insertionCode
- Specified by:
insertionCode
in interfaceChainNumberICode
- Returns:
- The value of the
insertionCode
attribute
-
x
@Parameter(order=8) public abstract double x()- Returns:
- The value of the
x
attribute
-
y
@Parameter(order=9) public abstract double y()- Returns:
- The value of the
y
attribute
-
z
@Parameter(order=10) public abstract double z()- Returns:
- The value of the
z
attribute
-
occupancy
@Parameter(order=11) @Auxiliary public abstract double occupancy()- Returns:
- The value of the
occupancy
attribute
-
temperatureFactor
@Parameter(order=12) @Auxiliary public abstract double temperatureFactor()- Returns:
- The value of the
temperatureFactor
attribute
-
elementSymbol
- Returns:
- The value of the
elementSymbol
attribute
-
charge
- Returns:
- The value of the
charge
attribute
-
toString
-
detectAtomName
- Returns:
- An instance of
AtomName
enum that matches this object.
-
distanceTo
Calculates the euclidean distance to another atom.- Parameters:
other
- Another instance of this class.- Returns:
- Euclidean distance in 3D between two atoms.
-
toPdb
Creates an ATOM line in PDB format.- Returns:
- A string representation of the ATOM line in PDB format.
-
toCif
Creates an ATOM line in mmCIF format.- Returns:
- A string representation of the ATOM line in mmCIF format.
- Throws:
IOException
-
toVector3D
public final org.apache.commons.math3.geometry.euclidean.threed.Vector3D toVector3D()- Returns:
- An instance of
Vector3D
with (x, y, z) coordinates of this instance.
-