|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.chemistry.gui.extended.molecule.Atom
public class Atom
Tripos base Atom class
| Field Summary | |
|---|---|
static java.util.Hashtable |
atomColor
Atom color map |
protected int |
charge
Atomic charge |
protected java.awt.Color |
color
Current atom color |
static java.awt.Color |
colorDefault
Default color |
protected boolean |
display
Flag indicating if atom label should be displayed |
protected boolean |
highlight
Flag indicating if atom is highlighted |
protected int |
id
Atom id |
protected java.lang.String |
name
Elemental name |
PropAttributes |
prop
Property list at the end of the atom string |
protected boolean |
select
Flag indicating if atom is selcted |
protected float |
tx
Transformed atom coordinates |
protected float |
ty
Transformed atom coordinates |
protected java.lang.String |
type
SYBYL force field atom type |
protected float |
tz
Transformed atom coordinates |
protected float |
x
Atom coordinates |
protected float |
y
Atom coordinates |
protected float |
z
Atom coordinates |
| Constructor Summary | |
|---|---|
Atom()
Default constructor |
|
Atom(Atom a)
Copy constructor |
|
Atom(float x,
float y,
float z)
Real coordinates constructor |
|
Atom(float x,
float y,
float z,
float tx,
float ty,
float tz)
Real and transformed coordinates constructor |
|
Atom(int id,
java.lang.String name,
float x,
float y,
float z,
float tx,
float ty,
float tz,
int charge)
constructor, no prop |
|
Atom(int id,
java.lang.String name,
float x,
float y,
float z,
float tx,
float ty,
float tz,
int charge,
java.util.Properties prop)
Full constructor |
|
| Method Summary | |
|---|---|
boolean |
equals(Atom a)
Compares this atom with another |
java.util.Properties |
getAttributes()
Return the property containing attributes |
int |
getCharge()
Returns the atomic charge |
java.awt.Color |
getColor()
Returns the color with which the atom is to be drawn when displayed |
java.awt.Color |
getColorFromType()
Returns color according to the atom type |
int |
getId()
Returns id of the atom |
java.lang.String |
getName()
Returns the elemental name |
PropAttributes |
getPropAttributes()
Get the encapsluation of the properties object which holds the attributes |
float |
getTx()
Returns the transformed x coordinate of the atom |
float |
getTy()
Returns the transformed y coordinate of the atom |
java.lang.String |
getType()
Returns SYBYL force field atom type |
float |
getTz()
Returns the transformed z coordinate of the atom |
float |
getX()
Returns the x coordinate of the atom |
float |
getY()
Returns the y coordinate of the atom |
float |
getZ()
Returns the z coordinate of the atom |
boolean |
isCarbon()
Return true if the atom is a carbon atom |
boolean |
isHighlighted()
Returns true if the atom is highlighted by user |
boolean |
isHydrogen()
Return true if the atom is a hydrogen atom |
boolean |
isSelected()
Returns true if the atom is selected by user |
boolean |
needDisplay()
Return true if the atom need to be display |
void |
setAttributes(java.util.Properties p)
Set the attributes for the atom |
void |
setCharge(int c)
Set the atomic charge |
void |
setColor(java.awt.Color color)
Set the color with which the atom is drawn |
void |
setDisplay(boolean displayOrNot)
Set the state to indicate whether the atom is to be formally displayed |
void |
setHighlight(boolean highlightOrNot)
Set the state to indicate whether the atom is hightlighted |
void |
setId(int id)
Set the atom id |
void |
setName(java.lang.String s)
Set the name |
void |
setPropAttributes(PropAttributes p)
Set the attributes for the atom |
void |
setSelect(boolean selectOrNot)
Set the state to indicate whether the atom is selected |
void |
setTx(float tx)
Set the transformed x coordinate of the atom |
void |
setTy(float ty)
Set the transformed y coordinate of the atom |
void |
setType(java.lang.String s)
Set the SYBYL force field type |
void |
setTz(float tz)
Set the transformed z coordinate of the atom |
void |
setX(float x)
Set the x coordinate of the atom |
void |
setY(float y)
Set the y coordinate of the atom |
void |
setZ(float z)
Set the z coordinate of the atom |
java.lang.String |
toString()
Returns String representation of Atom |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static java.util.Hashtable atomColor
public static final java.awt.Color colorDefault
protected int id
protected java.lang.String name
protected java.lang.String type
protected float x
protected float y
protected float z
protected float tx
protected float ty
protected float tz
protected int charge
protected boolean select
protected boolean highlight
protected boolean display
public PropAttributes prop
protected java.awt.Color color
| Constructor Detail |
|---|
public Atom(int id,
java.lang.String name,
float x,
float y,
float z,
float tx,
float ty,
float tz,
int charge,
java.util.Properties prop)
id - atom idname - elemental name of atomx - x coordinate of atomy - y coordinate of atomz - z coordinate of atomtx - tx transformed coordinate of atomty - ty transformed coordinate of atomtz - tz transformed coordinate of atomcharge - atom chargeprop - atom attributes strings
public Atom(int id,
java.lang.String name,
float x,
float y,
float z,
float tx,
float ty,
float tz,
int charge)
id - atom idname - elemental name of atomx - x coordinate of atomy - y coordinate of atomz - z coordinate of atomtx - tx transformed coordinate of atomty - ty transformed coordinate of atomtz - tz transformed coordinate of atomcharge - atom chargepublic Atom()
public Atom(float x,
float y,
float z)
x - x coordinate of atomy - y coordinate of atomz - z coordinate of atom
public Atom(float x,
float y,
float z,
float tx,
float ty,
float tz)
x - x coordinate of atomy - y coordinate of atomz - z coordinate of atomtx - tx transformed coordinate of atomty - ty transformed coordinate of atomtz - tz transformed coordinate of atompublic Atom(Atom a)
a - atom to be copied| Method Detail |
|---|
public void setName(java.lang.String s)
s - elemental name of atomgetName()public void setType(java.lang.String s)
getType()public void setCharge(int c)
c - chargegetCharge()public java.lang.String getName()
setName(java.lang.String)public java.lang.String getType()
setType(java.lang.String)public int getCharge()
setCharge(int)public boolean equals(Atom a)
a - atom to compare with
public java.lang.String toString()
toString in class java.lang.Objectpublic java.util.Properties getAttributes()
getAttributes in interface PropAttributesInterpublic PropAttributes getPropAttributes()
getPropAttributes in interface PropAttributesInterpublic void setAttributes(java.util.Properties p)
setAttributes in interface PropAttributesInterp - Property for the atompublic void setPropAttributes(PropAttributes p)
setPropAttributes in interface PropAttributesInterp - Property for the atompublic int getId()
public float getX()
public float getY()
public float getZ()
public float getTx()
public float getTy()
public float getTz()
public java.awt.Color getColor()
public java.awt.Color getColorFromType()
public boolean isSelected()
public boolean isHighlighted()
public boolean needDisplay()
public boolean isCarbon()
public boolean isHydrogen()
public void setId(int id)
id - idgetId()public void setX(float x)
x - X-coordinate of the atomgetX()public void setY(float y)
y - Y-coordinate of the atomgetY()public void setZ(float z)
z - Z-coordinate of the atomgetZ()public void setTx(float tx)
tx - transformed X-coordinate of the atomgetTx()public void setTy(float ty)
ty - transformed Y-coordinate of the atomgetTy()public void setTz(float tz)
tz - transformed Z-coordinate of the atomgetTz()public void setSelect(boolean selectOrNot)
selectOrNot - select state of the atomisSelected()public void setHighlight(boolean highlightOrNot)
highlightOrNot - highlight state of the atomisHighlighted()public void setDisplay(boolean displayOrNot)
displayOrNot - highlight state of the atomneedDisplay()public void setColor(java.awt.Color color)
color - color for the atomgetColor()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||