Package org.biojava.nbio.structure
Class ResidueNumber
java.lang.Object
org.biojava.nbio.structure.ResidueNumber
- All Implemented Interfaces:
Serializable
,Comparable<ResidueNumber>
Everything that is needed to uniquely describe a residue position
- Author:
- Andreas Prlic
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(ResidueNumber other) Compare residue numbers by chain, sequence number, and insertion codeint
compareToPositional
(ResidueNumber other) Compare residue numbers by sequence number and insertion code, ignoring the chainboolean
boolean
equalsPositional
(Object obj) Check if the seqNum and insertion code are equivalent, ignoring the chainstatic ResidueNumber
fromString
(String pdb_code) Convert a string representation of a residue number to a residue number object.int
hashCode()
void
setChainName
(String chainName) void
setInsCode
(Character insCode) void
toPDB()
toString()
-
Constructor Details
-
ResidueNumber
public ResidueNumber() -
ResidueNumber
-
ResidueNumber
-
-
Method Details
-
getChainName
-
setChainName
-
getInsCode
-
setInsCode
-
getSeqNum
-
setSeqNum
-
equals
-
equalsPositional
Check if the seqNum and insertion code are equivalent, ignoring the chain- Parameters:
obj
-- Returns:
-
hashCode
-
toString
-
toPDB
- Returns:
- The chain, number, and insertion code as a string, eg "B 74A" or "A 1 "
-
fromString
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
Compare residue numbers by chain, sequence number, and insertion code- Specified by:
compareTo
in interfaceComparable<ResidueNumber>
-
compareToPositional
Compare residue numbers by sequence number and insertion code, ignoring the chain- Parameters:
other
-- Returns:
-
printFull
-