|
||||||||||
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
Field Summary | |
---|---|
static java.lang.String |
type
this is a "hetatm". |
Constructor Summary | |
---|---|
HetatomImpl()
|
Method Summary | |
---|---|
void |
addAtom(Atom atom)
add an atom to this group. |
void |
clearAtoms()
remove all atoms |
java.lang.Object |
clone()
returns and identical copy of this Group object . |
Atom |
getAtom(int position)
return an atom by its position in the internal List. |
Atom |
getAtom(java.lang.String name)
get an atom throws StructureException if atom not found. |
java.util.List<Atom> |
getAtoms()
get all atoms of this group . |
long |
getId()
the Hibernate database ID |
Chain |
getParent()
Returns the parent Chain of the Group |
java.lang.String |
getPDBCode()
Returns the PDBCode. |
java.lang.String |
getPDBName()
Returns the PDBName. |
java.util.Map<java.lang.String,java.lang.Object> |
getProperties()
return properties. |
java.lang.Object |
getProperty(java.lang.String key)
get a single property . |
java.lang.String |
getType()
Returns the type value. |
boolean |
has3D()
returns true or false, depending if this group has 3D coordinates or not. |
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(java.lang.String name)
test is an Atom with name is existing. |
java.util.Iterator<Atom> |
iterator()
return an AtomIterator. |
void |
setAtoms(java.util.List<Atom> atoms)
set the atoms of this group |
void |
setId(long id)
the Hibernate database ID |
void |
setParent(Chain parent)
Set the back-reference (to its parent Chain) |
void |
setPDBCode(java.lang.String pdb)
set the PDB code. |
void |
setPDBFlag(boolean flag)
flag if group has 3D data. |
void |
setPDBName(java.lang.String s)
set three character name of Group . |
void |
setProperties(java.util.Map<java.lang.String,java.lang.Object> props)
properties of this amino acid. |
void |
setProperty(java.lang.String key,
java.lang.Object value)
set a single property . |
int |
size()
getnumber of atoms. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String type
Constructor Detail |
---|
public HetatomImpl()
Method Detail |
---|
public boolean has3D()
has3D
in interface Group
public void setPDBFlag(boolean flag)
setPDBFlag
in interface Group
flag
- true to set flag that this Group has 3D coordinatespublic java.lang.String getPDBCode()
getPDBCode
in interface Group
setPDBCode(java.lang.String)
public void setPDBCode(java.lang.String pdb)
setPDBCode
in interface Group
pdb
- a String specifying the PDBCode valuegetPDBCode()
public void setPDBName(java.lang.String s) throws PDBParseException
setPDBName
in interface Group
s
- a String specifying the PDBName value
PDBParseException
- ...getPDBName()
public java.lang.String getPDBName()
getPDBName
in interface Group
setPDBName(java.lang.String)
public void addAtom(Atom atom)
addAtom
in interface Group
atom
- an Atom objectpublic void clearAtoms()
clearAtoms
in interface Group
public int size()
size
in interface Group
public java.util.List<Atom> getAtoms()
getAtoms
in interface Group
Group.setAtoms(List)
public void setAtoms(java.util.List<Atom> atoms)
setAtoms
in interface Group
atoms
- a list of atomsAtom
public Atom getAtom(java.lang.String name) throws StructureException
getAtom
in interface Group
name
- a String
StructureException
- ...public Atom getAtom(int position) throws StructureException
getAtom
in interface Group
position
- an int
StructureException
- ...public boolean hasAtom(java.lang.String name)
hasAtom
in interface Group
name
- a String ...
public java.lang.String getType()
getType
in interface Group
public java.lang.String toString()
toString
in class java.lang.Object
public 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
hasAminoAtoms
in interface Group
getType()
public void setProperties(java.util.Map<java.lang.String,java.lang.Object> props)
setProperties
in interface Group
props
- a Map object specifying the properties valuegetProperties()
public java.util.Map<java.lang.String,java.lang.Object> getProperties()
getProperties
in interface Group
setProperties(java.util.Map)
public void setProperty(java.lang.String key, java.lang.Object value)
setProperty
in interface Group
key
- a Stringvalue
- an ObjectgetProperties()
,
getProperty(java.lang.String)
public java.lang.Object getProperty(java.lang.String key)
getProperty
in interface Group
key
- a String
setProperty(java.lang.String, java.lang.Object)
,
setProperties(java.util.Map)
public java.util.Iterator<Atom> iterator()
iterator
in interface Group
public java.lang.Object clone()
clone
in interface Group
clone
in class java.lang.Object
public void setParent(Chain parent)
setParent
in interface Group
parent
- the parent ChainGroup.getParent()
public Chain getParent()
getParent
in interface Group
Group.setParent(Chain)
public long getId()
public void setId(long id)
id
- the hibernate id
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |