org.biojava.bio.structure
public interface Group
Chain
in PDB file) is represented as a list of Groups.
There are 3 types of Groups:
HetatomImpl
,
AminoAcidImpl
,
NucleotideImpl
Modifier and Type | Method and Description |
---|---|
void |
addAltLoc(Group g)
Add a group that is an alternate location for this group.
|
void |
addAtom(Atom atom)
add an atom to this group.
|
void |
clearAtoms()
Remove all atoms from this group.
|
java.lang.Object |
clone()
returns and identical copy of this Group object .
|
java.util.List<Group> |
getAltLocs()
Get the list of alternate locations.
|
Atom |
getAtom(int position)
Get at atom by position.
|
Atom |
getAtom(java.lang.String name)
Get an atom.
|
Atom |
getAtomByPDBname(java.lang.String pdbName)
Get an atom by the full PDB name e.g.
|
java.util.List<Atom> |
getAtoms()
Get list of atoms.
|
Chain |
getChain()
Returns the parent Chain of the Group.
|
java.lang.String |
getChainId()
Utility method for returning the chainId of the Group or null if no
Chain has been set.
|
ChemComp |
getChemComp()
Get the chemical component that closer describes this group.
|
Chain |
getParent()
Deprecated.
replaced by
getChain() |
java.lang.String |
getPDBCode()
Deprecated.
replaced by
getResidueNumber() |
java.lang.String |
getPDBName()
Get the PDB 3 character name for this group.
|
java.util.Map<java.lang.String,java.lang.Object> |
getProperties()
return properties.
|
java.lang.Object |
getProperty(java.lang.String key)
get a single property .
|
ResidueNumber |
getResidueNumber()
returns a dynamically created ResidueNumber for the group - this
contains the chainId, resNum and insCode of the group.
|
java.lang.String |
getType()
get Type of group, e.g.
|
boolean |
has3D()
returns true or false, depending if this group has 3D coordinates or not.
|
boolean |
hasAltLoc()
Test if this group has alternate locations.
|
boolean |
hasAminoAtoms()
calculate if a groups has all atoms required for an amino acid.
|
boolean |
hasAtom(java.lang.String name)
Teturns flag whether a particular atom is existing within this group .
|
java.util.Iterator<Atom> |
iterator()
get an Atom Iterator.
|
void |
setAtoms(java.util.List<Atom> atoms)
Set the atoms of this group.
|
void |
setChain(Chain chain)
Sets the back-reference to its parent Chain.
|
void |
setChemComp(ChemComp cc)
Set the Chemical Component that closer describes this group.
|
void |
setParent(Chain parent)
Deprecated.
|
void |
setPDBCode(java.lang.String pdbcode)
Deprecated.
replaced by
setResidueNumber(ResidueNumber) |
void |
setPDBFlag(boolean flag)
flag if group has 3D data .
|
void |
setPDBName(java.lang.String s)
Set the PDB 3 letter name for this group.
|
void |
setProperties(java.util.Map<java.lang.String,java.lang.Object> properties)
properties of this amino acid.
|
void |
setProperty(java.lang.String key,
java.lang.Object value)
set a single property .
|
void |
setResidueNumber(ResidueNumber residueNumber)
sets the ResidueNumber for this Group
|
void |
setResidueNumber(java.lang.String chainId,
java.lang.Integer residueNumber,
java.lang.Character iCode)
Utility method to temporarily set a chainID for a group, if a parent chain object does not exist yet.
|
int |
size()
getnumber of atoms.
|
@Deprecated java.lang.String getPDBCode()
getResidueNumber()
setPDBCode(java.lang.String)
@Deprecated void setPDBCode(java.lang.String pdbcode)
setResidueNumber(ResidueNumber)
pdbcode
- a String specifying the PDBCode valuegetPDBCode()
int size()
boolean has3D()
void setPDBFlag(boolean flag)
flag
- true to set flag that this Group has 3D coordinatesjava.lang.String getType()
void addAtom(Atom atom)
atom
- an Atom objectjava.util.List<Atom> getAtoms()
setAtoms(List)
void setAtoms(java.util.List<Atom> atoms)
atoms
- a list of atomsAtom
void clearAtoms()
Atom getAtom(java.lang.String name) throws StructureException
name
- a StringStructureException
- if atom not found.Atom getAtomByPDBname(java.lang.String pdbName) throws StructureException
pdbName
- a StringStructureException
- ...Atom getAtom(int position) throws StructureException
position
- an intStructureException
- if not atom at this positionboolean hasAtom(java.lang.String name)
name
- a String ...java.lang.String getPDBName()
setPDBName(java.lang.String)
void setPDBName(java.lang.String s) throws PDBParseException
s
- a String specifying the PDBName valuePDBParseException
- ...getPDBName()
boolean hasAminoAtoms()
amino atoms are : N, CA, C, O, CB GLY does not have CB (unless we would calculate some artificially
Example: 1DW9 chain A first group is a Selenomethionine, provided as HETATM, but here returns true.HETATM 1 N MSE A 1 11.720 20.973 1.584 0.00 0.00 N HETATM 2 CA MSE A 1 10.381 20.548 1.139 0.00 0.00 C HETATM 3 C MSE A 1 9.637 20.037 2.398 0.00 0.00 C HETATM 4 O MSE A 1 10.198 19.156 2.985 0.00 0.00 O HETATM 5 CB MSE A 1 10.407 19.441 0.088 0.00 0.00 C
getType()
void setProperties(java.util.Map<java.lang.String,java.lang.Object> properties)
properties
- a Map object specifying the properties valuegetProperties()
java.util.Map<java.lang.String,java.lang.Object> getProperties()
setProperties(java.util.Map)
void setProperty(java.lang.String key, java.lang.Object value)
key
- a Stringvalue
- an ObjectgetProperty(java.lang.String)
java.lang.Object getProperty(java.lang.String key)
key
- a StringsetProperty(java.lang.String, java.lang.Object)
java.util.Iterator<Atom> iterator()
java.lang.Object clone()
@Deprecated void setParent(Chain parent)
parent
- the parent ChainsetChain(Chain)
,
getChain()
@Deprecated Chain getParent()
getChain()
setChain(Chain)
void setChain(Chain chain)
chain
- the parent ChaingetChain()
Chain getChain()
setChain(Chain)
ResidueNumber getResidueNumber()
ResidueNumber
void setResidueNumber(ResidueNumber residueNumber)
residueNumber
- the PDB residueNumbervoid setResidueNumber(java.lang.String chainId, java.lang.Integer residueNumber, java.lang.Character iCode)
chainId
- residueNumber
- iCode
- java.lang.String getChainId()
void setChemComp(ChemComp cc)
cc
- the chemical componentChemComp getChemComp()
boolean hasAltLoc()
java.util.List<Group> getAltLocs()
void addAltLoc(Group g)