Package org.biojava.nbio.structure
Class AtomImpl
java.lang.Object
org.biojava.nbio.structure.AtomImpl
- All Implemented Interfaces:
 Serializable,Cloneable,Atom,PDBRecord
Implementation of an Atom of a PDB file.
 currently the coordinates of an atom are represented by a double[3] array.
- Since:
 - 1.4
 - Version:
 - %I% %G%
 - Author:
 - Andreas Prlic
 - See Also:
 
- 
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe inital capacity of the bonds list. - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a bondclone()returns and identical copy of this object .Get alternate Location.getBonds()Get allBonds this atom is part of.shortGet the charge of this atomdouble[]Get the coordinates.Get element of the atom, e.g.getGroup()Return the parent Group of the Atom.getName()Get atom name, e.g.floatGet occupancy.intGet PDB atom number.floatGet temp factor.doublegetX()Get coordinate X.doublegetY()Get coordinate Y.doublegetZ()Get coordinate Z.booleanTest if another atom has a bond to this atomvoidSet alternate Location.voidSets the bondsvoidsetCharge(short inputCharge) Set the charge of this atomvoidsetCoords(double[] c) Set the coordinates.voidSet element of the atom name, e.g.voidSet the back-reference to its parent Group.voidSet atom name, e.g.voidsetOccupancy(float occu) Set occupancy.voidsetPDBserial(int i) Set PDB atom number.voidsetTempFactor(float temp) Set temp factor .voidsetX(double x) Set the X coordinate.voidsetY(double y) Set the Y coordinate.voidsetZ(double z) Set the Z coordinate.toPDB()Returns a PDB file like representation of this record.voidtoPDB(StringBuffer buf) Appends a PDB file like representation of this record to the provided StringBuffer.toString() 
- 
Field Details
- 
BONDS_INITIAL_CAPACITY
public static final int BONDS_INITIAL_CAPACITYThe inital capacity of the bonds list. Most atoms have a maximum of 3 heavy atom neighbors.- See Also:
 
 
 - 
 - 
Constructor Details
- 
AtomImpl
public AtomImpl() 
 - 
 - 
Method Details
- 
setName
Set atom name, e.g. "CA". - 
getName
Get atom name, e.g. "CA". Beware that some PDB atom names are ambiguous (e.g. CA, which means C-alpha or Calcium), the ambiguity can simply be resolved by also checking the element withAtom.getElement() - 
setPDBserial
public void setPDBserial(int i) Set PDB atom number.- Specified by:
 setPDBserialin interfaceAtom- Parameters:
 i- an int specifying the PDBserial value- See Also:
 
 - 
getPDBserial
public int getPDBserial()Get PDB atom number.- Specified by:
 getPDBserialin interfaceAtom- Returns:
 - an int representing the PDBserial value
 - See Also:
 
 - 
setCoords
public void setCoords(double[] c) Set the coordinates. - 
getCoords
public double[] getCoords()Get the coordinates. - 
setX
public void setX(double x) Description copied from interface:AtomSet the X coordinate. - 
setY
public void setY(double y) Description copied from interface:AtomSet the Y coordinate. - 
setZ
public void setZ(double z) Description copied from interface:AtomSet the Z coordinate. - 
getX
public double getX()Get coordinate X. - 
getY
public double getY()Get coordinate Y. - 
getZ
public double getZ()Get coordinate Z. - 
setAltLoc
Set alternate Location. - 
getAltLoc
Get alternate Location. - 
toString
 - 
setOccupancy
public void setOccupancy(float occu) Description copied from interface:AtomSet occupancy.- Specified by:
 setOccupancyin interfaceAtom- Parameters:
 occu- a float specifying the occupancy value- See Also:
 
 - 
getOccupancy
public float getOccupancy()Description copied from interface:AtomGet occupancy.- Specified by:
 getOccupancyin interfaceAtom- Returns:
 - a float representing the occupancy value
 - See Also:
 
 - 
setTempFactor
public void setTempFactor(float temp) Description copied from interface:AtomSet temp factor .- Specified by:
 setTempFactorin interfaceAtom- Parameters:
 temp- a float specifying the temp factor value- See Also:
 
 - 
getTempFactor
public float getTempFactor()Description copied from interface:AtomGet temp factor.- Specified by:
 getTempFactorin interfaceAtom- Returns:
 - a float representing the temp factor value
 - See Also:
 
 - 
clone
returns and identical copy of this object . - 
setGroup
Set the back-reference to its parent Group. - 
getGroup
Return the parent Group of the Atom. returns null if the referenced object is not Group - 
getElement
Get element of the atom, e.g.Element.Ca- Specified by:
 getElementin interfaceAtom- Returns:
 - an Element enumeration
 - See Also:
 
 - 
setElement
Set element of the atom name, e.g.Element.Fe- Specified by:
 setElementin interfaceAtom- Parameters:
 e- an Element enumeration- See Also:
 
 - 
toPDB
Description copied from interface:PDBRecordReturns a PDB file like representation of this record. - 
toPDB
Description copied from interface:PDBRecordAppends a PDB file like representation of this record to the provided StringBuffer. - 
getBonds
Get allBonds this atom is part of. - 
hasBond
Test if another atom has a bond to this atom - 
setBonds
Sets the bonds - 
addBond
Description copied from interface:AtomAdd a bond - 
getCharge
public short getCharge()Description copied from interface:AtomGet the charge of this atom - 
setCharge
public void setCharge(short inputCharge) Description copied from interface:AtomSet the charge of this atom 
 -