public interface Group extends Serializable
Chain
in PDB file) is represented as a list of Groups.
There are 3 types of Groups:
HetatomImpl
,
AminoAcidImpl
,
NucleotideImpl
Modifier and Type | Field and Description |
---|---|
static String |
SEC_STRUC
Group property key for secondary structure annotation
|
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.
|
Object |
clone()
returns and identical copy of this Group object .
|
Group |
getAltLocGroup(Character altLoc)
Gets the alternate location group to this group that has the alt-loc character code passed.
|
List<Group> |
getAltLocs()
Get the list of alternate locations.
|
Atom |
getAtom(int position)
Get at atom by position.
|
Atom |
getAtom(String name)
Get an atom given its PDB name.
|
List<Atom> |
getAtoms()
Get list of atoms.
|
Chain |
getChain()
Returns the parent Chain of the Group.
|
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.
|
String |
getPDBName()
Get the PDB 3-letter name for this group.
|
Map<String,Object> |
getProperties()
return properties.
|
Object |
getProperty(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.
|
GroupType |
getType()
|
boolean |
has3D()
Return 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 this group has all atoms required for an amino acid backbone.
|
boolean |
hasAtom(String name)
Tell whether a particular atom exists within this group.
|
boolean |
isAminoAcid()
Tests in the Chemical Component Dictionary, if this group is an amino acid
|
boolean |
isHetAtomInFile()
Tells whether the group is annotated as HETATM in the file.
|
boolean |
isNucleotide()
Tests in the Chemical Component Dictionary, if this group is a nucleotide
|
boolean |
isPolymeric()
tests in the Chemical Component Dictionary, if this group is a polymeric group
|
boolean |
isWater()
Determines if this group is water.
|
Iterator<Atom> |
iterator()
get an Atom Iterator.
|
void |
setAtoms(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 |
setHetAtomInFile(boolean isHetAtomInFile)
Sets the field isHetAtomInFile which is intented only for
helping in infering if a polymeric group is in a ligand chain
or in a polymeric chain.
|
void |
setPDBFlag(boolean flag)
Flag if group has 3D data .
|
void |
setPDBName(String s)
Set the PDB 3-letter name for this group.
|
void |
setProperties(Map<String,Object> properties)
Properties of this amino acid.
|
void |
setProperty(String key,
Object value)
set a single property .
|
void |
setResidueNumber(ResidueNumber residueNumber)
sets the ResidueNumber for this Group
|
void |
setResidueNumber(String chainId,
Integer residueNumber,
Character iCode)
Utility method to temporarily set a chainID for a group, if a parent chain object does not exist yet.
|
int |
size()
Get number of atoms.
|
String |
toSDF()
Function to get the Group as an MDL molblock
|
void |
trimToSize()
attempts to reduce the memory imprint of this group by trimming
all internal Collection objects to the required size.
|
static final String SEC_STRUC
int size()
boolean has3D()
void setPDBFlag(boolean flag)
flag
- true to set flag that this Group has 3D coordinatesList<Atom> getAtoms()
setAtoms(List)
void setAtoms(List<Atom> atoms)
atoms
- a list of atomsAtom}
void clearAtoms()
Atom getAtom(String name)
Atom.getElement()
name
- a trimmed String representing the atom's PDB name, e.g. "CA"Atom getAtom(int position)
position
- an intboolean hasAtom(String name)
name
- a trimmed String representing the atom's PDB name, e.g. "CA"String getPDBName()
setPDBName(java.lang.String)
void setPDBName(String s)
s
- a String specifying the PDBName valuegetPDBName()
boolean hasAminoAtoms()
getType()
amino atoms are : N, CA, C, O
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()
boolean isPolymeric()
boolean isAminoAcid()
boolean isNucleotide()
void setProperties(Map<String,Object> properties)
properties
- a Map object specifying the properties valuegetProperties()
Map<String,Object> getProperties()
setProperties(java.util.Map<java.lang.String, java.lang.Object>)
void setProperty(String key, Object value)
key
- a Stringvalue
- an ObjectgetProperty(java.lang.String)
Object getProperty(String key)
key
- a StringsetProperty(java.lang.String, java.lang.Object)
Object clone()
void setChain(Chain chain)
chain
- the parent ChaingetChain()
Chain getChain()
setChain(Chain)
ResidueNumber getResidueNumber()
ResidueNumber
void setResidueNumber(ResidueNumber residueNumber)
residueNumber
- the PDB residueNumbervoid setResidueNumber(String chainId, Integer residueNumber, Character iCode)
chainId
- residueNumber
- iCode
- String getChainId()
void setChemComp(ChemComp cc)
cc
- the chemical componentChemComp getChemComp()
boolean hasAltLoc()
List<Group> getAltLocs()
boolean isWater()
GroupType#WATERNAMES}
Group getAltLocGroup(Character altLoc)
altLoc
- the alternate location code of the group desiredvoid trimToSize()
String toSDF()
boolean isHetAtomInFile()
void setHetAtomInFile(boolean isHetAtomInFile)
isHetAtomInFile
- Copyright © 2000–2018 BioJava. All rights reserved.