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
@Immutable public abstract class PdbAtomLine extends Object implements Serializable, ChainNumberICode
Representation of ATOM and HETATM lines in both PDB and mmCIF files.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PdbAtomLine()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract StringalternateLocation()abstract StringatomName()abstract StringchainIdentifier()abstract Stringcharge()AtomNamedetectAtomName()doubledistanceTo(PdbAtomLine other)Calculates the euclidean distance to another atom.abstract StringelementSymbol()static PdbAtomLinefromBioJavaAtom(org.biojava.nbio.structure.Atom atom)Creates an instance of this class fromAtomobject.abstract StringinsertionCode()abstract doubleoccupancy()static PdbAtomLineparse(String line)Parses text as ATOM or HETATM line in strict mode (all 80 characters in the line are required).static PdbAtomLineparse(String line, boolean strictMode)Parses text as ATOM or HETATM line in a strict or non-strict mode.abstract StringresidueName()abstract intresidueNumber()abstract intserialNumber()abstract doubletemperatureFactor()org.biojava.nbio.structure.AtomtoBioJavaAtom()Creates an instance of BioJavaAtomwith fields having the same values as this object.StringtoCif()Creates an ATOM line in mmCIF format (according to format:CIF_LOOP).StringtoPdb()Creates an ATOM line in PDB format.StringtoString()org.apache.commons.math3.geometry.euclidean.threed.Vector3DtoVector3D()abstract doublex()abstract doubley()abstract doublez()-
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
-
-
-
-
Field Detail
-
CIF_LOOP
public static final String CIF_LOOP
A constant required by mmCIF format which also documents the order of fields thattoCif()follows.- See Also:
- Constant Field Values
-
-
Method Detail
-
fromBioJavaAtom
public static PdbAtomLine fromBioJavaAtom(org.biojava.nbio.structure.Atom atom)
Creates an instance of this class fromAtomobject.- Parameters:
atom- An instance of BioJava object.- Returns:
- An instance of this class with fields values equal to those in
atomobject.
-
parse
public static PdbAtomLine parse(String line)
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
public static PdbAtomLine parse(String line, boolean strictMode)
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
serialNumberattribute
-
atomName
@Parameter(order=2) public abstract String atomName()
- Returns:
- The value of the
atomNameattribute
-
alternateLocation
@Parameter(order=3) @Auxiliary public abstract String alternateLocation()
- Returns:
- The value of the
alternateLocationattribute
-
residueName
@Parameter(order=4) public abstract String residueName()
- Returns:
- The value of the
residueNameattribute
-
chainIdentifier
@Parameter(order=5) public abstract String chainIdentifier()
- Specified by:
chainIdentifierin interfaceChainNumberICode- Returns:
- The value of the
chainIdentifierattribute
-
residueNumber
@Parameter(order=6) public abstract int residueNumber()
- Specified by:
residueNumberin interfaceChainNumberICode- Returns:
- The value of the
residueNumberattribute
-
insertionCode
@Parameter(order=7) public abstract String insertionCode()
- Specified by:
insertionCodein interfaceChainNumberICode- Returns:
- The value of the
insertionCodeattribute
-
x
@Parameter(order=8) public abstract double x()
- Returns:
- The value of the
xattribute
-
y
@Parameter(order=9) public abstract double y()
- Returns:
- The value of the
yattribute
-
z
@Parameter(order=10) public abstract double z()
- Returns:
- The value of the
zattribute
-
occupancy
@Parameter(order=11) @Auxiliary public abstract double occupancy()
- Returns:
- The value of the
occupancyattribute
-
temperatureFactor
@Parameter(order=12) @Auxiliary public abstract double temperatureFactor()
- Returns:
- The value of the
temperatureFactorattribute
-
elementSymbol
@Parameter(order=13) @Auxiliary public abstract String elementSymbol()
- Returns:
- The value of the
elementSymbolattribute
-
charge
@Parameter(order=14) @Auxiliary public abstract String charge()
- Returns:
- The value of the
chargeattribute
-
detectAtomName
public final AtomName detectAtomName()
- Returns:
- An instance of
AtomNameenum that matches this object.
-
distanceTo
public final double distanceTo(PdbAtomLine other)
Calculates the euclidean distance to another atom.- Parameters:
other- Another instance of this class.- Returns:
- Euclidean distance in 3D between two atoms.
-
toBioJavaAtom
public final org.biojava.nbio.structure.Atom toBioJavaAtom()
Creates an instance of BioJavaAtomwith fields having the same values as this object.- Returns:
- An instance of
Atomwith the same values as this object.
-
toCif
public final String toCif()
Creates an ATOM line in mmCIF format (according to format:CIF_LOOP).- Returns:
- A string representation of the ATOM line in mmCIF format.
-
toPdb
public final String toPdb()
Creates an ATOM line in PDB format.- Returns:
- A string representation of the ATOM line in PDB format.
-
toVector3D
public final org.apache.commons.math3.geometry.euclidean.threed.Vector3D toVector3D()
- Returns:
- An instance of
Vector3Dwith (x, y, z) coordinates of this instance.
-
-