Class PdbAtomLine

    • Field Detail

      • CIF_LOOP

        public static final String CIF_LOOP
        A constant required by mmCIF format which also documents the order of fields that toCif() follows.
        See Also:
        Constant Field Values
    • Constructor Detail

      • PdbAtomLine

        public PdbAtomLine()
    • Method Detail

      • fromBioJavaAtom

        public static PdbAtomLine fromBioJavaAtom​(org.biojava.nbio.structure.Atom atom)
        Creates an instance of this class from Atom object.
        Parameters:
        atom - An instance of BioJava object.
        Returns:
        An instance of this class with fields values equal to those in atom object.
      • 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 serialNumber attribute
      • atomName

        @Parameter(order=2)
        public abstract String atomName()
        Returns:
        The value of the atomName attribute
      • alternateLocation

        @Parameter(order=3)
        @Auxiliary
        public abstract String alternateLocation()
        Returns:
        The value of the alternateLocation attribute
      • residueName

        @Parameter(order=4)
        public abstract String residueName()
        Returns:
        The value of the residueName attribute
      • chainIdentifier

        @Parameter(order=5)
        public abstract String chainIdentifier()
        Specified by:
        chainIdentifier in interface ChainNumberICode
        Returns:
        The value of the chainIdentifier attribute
      • residueNumber

        @Parameter(order=6)
        public abstract int residueNumber()
        Specified by:
        residueNumber in interface ChainNumberICode
        Returns:
        The value of the residueNumber attribute
      • insertionCode

        @Parameter(order=7)
        public abstract String insertionCode()
        Specified by:
        insertionCode in interface ChainNumberICode
        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

        @Parameter(order=13)
        @Auxiliary
        public abstract String elementSymbol()
        Returns:
        The value of the elementSymbol attribute
      • charge

        @Parameter(order=14)
        @Auxiliary
        public abstract String charge()
        Returns:
        The value of the charge attribute
      • detectAtomName

        public final AtomName detectAtomName()
        Returns:
        An instance of AtomName enum 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 BioJava Atom with fields having the same values as this object.
        Returns:
        An instance of Atom with 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 Vector3D with (x, y, z) coordinates of this instance.