Class ResidueNumber

java.lang.Object
org.biojava.nbio.structure.ResidueNumber
All Implemented Interfaces:
Serializable, Comparable<ResidueNumber>

public class ResidueNumber extends Object implements Serializable, Comparable<ResidueNumber>
Everything that is needed to uniquely describe a residue position
Author:
Andreas Prlic
See Also:
  • Constructor Details

    • ResidueNumber

      public ResidueNumber()
    • ResidueNumber

      public ResidueNumber(ResidueNumber o)
    • ResidueNumber

      public ResidueNumber(String chainId, Integer residueNumber, Character insCode)
  • Method Details

    • getChainId

      public String getChainId()
    • setChainId

      public void setChainId(String chainId)
    • getInsCode

      public Character getInsCode()
    • setInsCode

      public void setInsCode(Character insCode)
    • getSeqNum

      public Integer getSeqNum()
    • setSeqNum

      public void setSeqNum(Integer seqNum)
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Returns:
      The residue number and insertion code as a string, eg "74A"
      See Also:
    • toPDB

      public String toPDB()
      Returns:
      The chain, number, and insertion code as a string, eg "B 74A" or "A 1 "
    • fromString

      public static ResidueNumber fromString(String pdb_code)
      Convert a string representation of a residue number to a residue number object. The string representation can be a integer followed by a character.
      Parameters:
      pdb_code -
      Returns:
      a ResidueNumber object, or null if the input was null
    • compareTo

      public int compareTo(ResidueNumber other)
      Specified by:
      compareTo in interface Comparable<ResidueNumber>
    • printFull

      public String printFull()