public class AtomImpl extends Object implements Atom
Modifier and Type | Field and Description |
---|---|
static int |
BONDS_INITIAL_CAPACITY
The inital capacity of the bonds list.
|
Constructor and Description |
---|
AtomImpl() |
Modifier and Type | Method and Description |
---|---|
void |
addBond(Bond bond)
Add a bond
|
Object |
clone()
returns and identical copy of this object .
|
Character |
getAltLoc()
Get alternate Location.
|
List<Bond> |
getBonds()
Get all
Bond s this atom is part of. |
short |
getCharge()
Get the charge of this atom
|
double[] |
getCoords()
Get the coordinates.
|
javax.vecmath.Point3d |
getCoordsAsPoint3d()
Get the coordinates.
|
Element |
getElement()
Get element of the atom, e.g.
|
Group |
getGroup()
Return the parent Group of the Atom.
|
String |
getName()
Get atom name, e.g.
|
float |
getOccupancy()
Get occupancy.
|
int |
getPDBserial()
Get PDB atom number.
|
float |
getTempFactor()
Get temp factor.
|
double |
getX()
Get coordinate X.
|
double |
getY()
Get coordinate Y.
|
double |
getZ()
Get coordinate Z.
|
boolean |
hasBond(Atom other)
Test if another atom has a bond to this atom
|
void |
setAltLoc(Character c)
Set alternate Location.
|
void |
setBonds(List<Bond> bonds)
Sets the bonds
|
void |
setCharge(short inputCharge)
Set the charge of this atom
|
void |
setCoords(double[] c)
Set the coordinates.
|
void |
setElement(Element e)
Set element of the atom name, e.g.
|
void |
setGroup(Group parent)
Set the back-reference to its parent Group.
|
void |
setName(String s)
Set atom name, e.g.
|
void |
setOccupancy(float occu)
Set occupancy.
|
void |
setPDBserial(int i)
Set PDB atom number.
|
void |
setTempFactor(float temp)
Set temp factor .
|
void |
setX(double x)
Set the X coordinate.
|
void |
setY(double y)
Set the Y coordinate.
|
void |
setZ(double z)
Set the Z coordinate.
|
String |
toPDB()
Returns a PDB file like representation of this record.
|
void |
toPDB(StringBuffer buf)
Appends a PDB file like representation of this record to the provided StringBuffer.
|
String |
toString() |
public static final int BONDS_INITIAL_CAPACITY
public AtomImpl()
public void setName(String s)
setName
in interface Atom
s
- a trimmed String specifying the name valueAtom.getName()
public String getName()
Atom.getElement()
getName
in interface Atom
Atom.setName(java.lang.String)
public void setPDBserial(int i)
setPDBserial
in interface Atom
i
- an int specifying the PDBserial valueAtom.getPDBserial()
public int getPDBserial()
getPDBserial
in interface Atom
Atom.setPDBserial(int)
public void setCoords(double[] c)
setCoords
in interface Atom
c
- an array of doubles specifying the coords valueAtom.getCoords()
public double[] getCoords()
getCoords
in interface Atom
Atom.setCoords(double[])
,
Atom.getCoordsAsPoint3d()
public javax.vecmath.Point3d getCoordsAsPoint3d()
Internally the coordinates are represented as Point3d so this
is recommended over Atom.getCoords()
getCoordsAsPoint3d
in interface Atom
Atom.getCoords()
public void setX(double x)
Atom
setX
in interface Atom
x
- a doubleAtom.getX()
public void setY(double y)
Atom
setY
in interface Atom
y
- a doubleAtom.getY()
public void setZ(double z)
Atom
setZ
in interface Atom
z
- a doubleAtom.getZ()
public double getX()
getX
in interface Atom
Atom.setX(double)
public double getY()
getY
in interface Atom
Atom.setY(double)
public double getZ()
getZ
in interface Atom
Atom.setZ(double)
public void setAltLoc(Character c)
setAltLoc
in interface Atom
c
- a Character object specifying the alt loc valuegetAltLoc()
public Character getAltLoc()
getAltLoc
in interface Atom
setAltLoc(java.lang.Character)
public void setOccupancy(float occu)
Atom
setOccupancy
in interface Atom
occu
- a float specifying the occupancy valueAtom.getOccupancy()
public float getOccupancy()
Atom
getOccupancy
in interface Atom
Atom.setOccupancy(float)
public void setTempFactor(float temp)
Atom
setTempFactor
in interface Atom
temp
- a float specifying the temp factor valueAtom.getTempFactor()
public float getTempFactor()
Atom
getTempFactor
in interface Atom
Atom.setTempFactor(float)
public void setGroup(Group parent)
setGroup
in interface Atom
parent
- the parent GroupAtom.getGroup()
public Group getGroup()
getGroup
in interface Atom
Atom.setGroup(Group)
public Element getElement()
Element.Ca
getElement
in interface Atom
Atom.setElement(org.biojava.nbio.structure.Element)
public void setElement(Element e)
Element.Fe
setElement
in interface Atom
e
- an Element enumerationAtom.getElement()
public String toPDB()
PDBRecord
public void toPDB(StringBuffer buf)
PDBRecord
public void addBond(Bond bond)
Atom
addBond
in interface Atom
bond
- to be addedAtom.getBonds()
public short getCharge()
Atom
Copyright © 2000–2019 BioJava. All rights reserved.