|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.biojava.bio.structure.HetatomImpl
public class HetatomImpl
Generic Implementation of a Group interface. AminoAcidImpl and NucleotideImpl are closely related classes.
AminoAcidImpl,
NucleotideImpl,
Serialized Form| Field Summary | |
|---|---|
protected List<Atom> |
atoms
|
protected boolean |
pdb_flag
|
protected String |
pdb_name
|
protected ResidueNumber |
residueNumber
|
static String |
type
this is a "hetatm". |
| Constructor Summary | |
|---|---|
HetatomImpl()
|
|
| Method Summary | |
|---|---|
void |
addAltLoc(Group group)
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 |
Object |
clone()
returns and identical copy of this Group object . |
List<Group> |
getAltLocs()
Get the list of alternate locations. |
Atom |
getAtom(int position)
return an atom by its position in the internal List. |
Atom |
getAtom(String name)
get an atom throws StructureException if atom not found. |
Atom |
getAtomByPDBname(String name)
Get an atom by the full PDB name e.g. |
List<Atom> |
getAtoms()
get all atoms of this group . |
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. |
long |
getId()
the Hibernate database ID |
Chain |
getParent()
Returns the parent Chain of the Group |
String |
getPDBCode()
Deprecated. replaced by #getSeqNum |
String |
getPDBName()
Returns the PDBName. |
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. |
String |
getType()
Returns the type value. |
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 this allows to include chemically modified amino acids that are labeled hetatoms into some computations ... |
boolean |
hasAtom(String fullName)
test is an Atom with name is existing. |
Iterator<Atom> |
iterator()
return an AtomIterator. |
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 |
setId(long id)
the Hibernate database ID |
void |
setParent(Chain parent)
Set the back-reference (to its parent Chain) |
void |
setPDBCode(String pdb_code)
Deprecated. replaced by setResidueNumber(ResidueNumber) |
void |
setPDBFlag(boolean flag)
flag if group has 3D data. |
void |
setPDBName(String s)
set three character name of Group . |
void |
setProperties(Map<String,Object> props)
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 resNum,
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. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String type
protected boolean pdb_flag
protected String pdb_name
protected ResidueNumber residueNumber
protected List<Atom> atoms
| Constructor Detail |
|---|
public HetatomImpl()
| Method Detail |
|---|
public boolean has3D()
has3D in interface Grouppublic void setPDBFlag(boolean flag)
setPDBFlag in interface Groupflag - true to set flag that this Group has 3D coordinates@Deprecated public String getPDBCode()
getPDBCode in interface GroupsetPDBCode(java.lang.String)@Deprecated public void setPDBCode(String pdb_code)
setResidueNumber(ResidueNumber)
setPDBCode in interface Grouppdb_code - a String specifying the PDBCode valuegetPDBCode()
public void setPDBName(String s)
throws PDBParseException
setPDBName in interface Groups - a String specifying the PDBName value
PDBParseException - ...getPDBName()public String getPDBName()
getPDBName in interface GroupsetPDBName(java.lang.String)public void addAtom(Atom atom)
addAtom in interface Groupatom - an Atom objectpublic void clearAtoms()
clearAtoms in interface Grouppublic int size()
size in interface Grouppublic List<Atom> getAtoms()
getAtoms in interface GroupGroup.setAtoms(List)public void setAtoms(List<Atom> atoms)
setAtoms in interface Groupatoms - a list of atomsAtom
public Atom getAtom(String name)
throws StructureException
getAtom in interface Groupname - a String
StructureException - ...
public Atom getAtomByPDBname(String name)
throws StructureException
getAtomByPDBname in interface Groupname - a String
StructureException - ...
public Atom getAtom(int position)
throws StructureException
getAtom in interface Groupposition - an int
StructureException - ...public boolean hasAtom(String fullName)
hasAtom in interface GroupfullName - a String ...
public String getType()
getType in interface Grouppublic String toString()
toString in class Objectpublic boolean hasAminoAtoms()
amino atoms are : N, CA, C, O, CB GLY does not have CB (unless we would calculate some artificially
Example: 1DW9 parent 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
hasAminoAtoms in interface GroupgetType()public void setProperties(Map<String,Object> props)
setProperties in interface Groupprops - a Map object specifying the properties valuegetProperties()public Map<String,Object> getProperties()
getProperties in interface GroupsetProperties(java.util.Map)
public void setProperty(String key,
Object value)
setProperty in interface Groupkey - a Stringvalue - an ObjectgetProperties(),
getProperty(java.lang.String)public Object getProperty(String key)
getProperty in interface Groupkey - a String
setProperty(java.lang.String, java.lang.Object),
setProperties(java.util.Map) public Iterator<Atom> iterator()
iterator in interface Grouppublic Object clone()
clone in interface Groupclone in class Objectpublic void setParent(Chain parent)
setParent in interface Groupparent - the parent ChainGroup.setChain(Chain),
Group.getChain()public Chain getParent()
getParent in interface GroupGroup.setChain(Chain)public long getId()
public void setId(long id)
id - the hibernate idpublic ChemComp getChemComp()
Group
getChemComp in interface Grouppublic void setChemComp(ChemComp cc)
Group
setChemComp in interface Groupcc - the chemical componentpublic void setChain(Chain chain)
setChain in interface Groupchain - the parent ChainGroup.getChain()public Chain getChain()
getChain in interface GroupGroup.setChain(Chain)public String getChainId()
getChainId in interface Grouppublic ResidueNumber getResidueNumber()
getResidueNumber in interface GroupResidueNumberpublic void setResidueNumber(ResidueNumber residueNumber)
Group
setResidueNumber in interface GroupresidueNumber - the PDB residueNumber
public void setResidueNumber(String chainId,
Integer resNum,
Character iCode)
Group
setResidueNumber in interface Grouppublic boolean hasAltLoc()
Group
hasAltLoc in interface Grouppublic List<Group> getAltLocs()
Group
getAltLocs in interface Grouppublic void addAltLoc(Group group)
Group
addAltLoc in interface Group
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||