astex
Class Bond

java.lang.Object
  extended by astex.generic.Generic
      extended by astex.Bond
All Implemented Interfaces:
GenericInterface

public class Bond
extends Generic


Field Summary
static int AmideBond
          Constant that defines an aromatic bond.
static int AnyBond
          Constant that defines any bond.
static int AromaticBond
          Constant that defines an aromatic bond.
 int attributes
          The integer that stores the attributes.
static java.lang.String BondOrder
           
static double bondScale
           
static int DoubleBond
          Constant that defines a single bond.
static int DoubleOrAromaticBond
          Constant that defines a double or aromatic bond.
static int ExplicitBond
          Did the bond come from a CONECT record.
static int ringBond
          Is the bond in a ring of any description.
static int SingleBond
          Constant that defines a single bond.
static int SingleOrAromaticBond
          Constant that defines a single or aromatic bond.
static int SingleOrDoubleBond
          Constant that defines a single or double bond.
static int TripleBond
          Constant that defines a single bond.
static int wideBond
          Is the bond to be drawn wide.
 
Fields inherited from class astex.generic.Generic
ClassName
 
Fields inherited from interface astex.generic.GenericInterface
Name
 
Method Summary
static Bond create()
          A method that will create a new Bond.
 void delete()
          Delete this bond.
 java.lang.Object get(java.lang.Object key, java.lang.Object def)
          Get Object representing key.
 Atom getAtom(int index)
          Get the specified atom.
 int getBondColor()
          Get the value of bondColor.
 double getBondLength()
          Get the actual bond length.
 int getBondOrder()
          Get the bond order.
 java.lang.String getBondSymbol()
          Return a smiles style symbol for the bond.
 int getBondWidth()
          Get the value of bondWidth.
 java.lang.Object getClassname()
          Get our class description.
 double getCylinderWidth()
          Get the value of cylinderWidth.
 Atom getFirstAtom()
          Return the first atom in a bond.
 double getIdealBondLength()
          Get the ideal bond length.
 Atom getOtherAtom(Atom knownAtom)
          Given one atom in a bond return the other atom from the bond.
 java.util.Enumeration getProperties()
          Return an enumeration of our properties.
 Atom getSecondAtom()
          Return the second atom in a bond.
 double getStickWidth()
          Get the value of stickWidth.
 Point3d getUnitVector()
          Get unit vector.
 boolean isExplicitBond()
          Is bond an explicit bond.
 boolean isNonRotatable()
          Is this bond non rotatable.
 boolean isQueryBond()
          Is the bond a query bond.
 boolean isRingBond()
          Is the bond in a ring.
 boolean isTerminalBond()
          Is this a terminal bond.
 boolean isWideBond()
          Is the bond wide.
 java.lang.Object set(java.lang.Object key, java.lang.Object property)
          Set an object value.
 void setBondColor(int v)
          Set the value of bondColor.
 void setBondOrder(int order)
          Set the bond order.
 void setBondWidth(int v)
          Set the value of bondWidth.
 void setCylinderWidth(double v)
          Set the value of cylinderWidth.
 void setExplicitBond(boolean e)
          Set whehter this bond was an explicit bond.
 void setFirstAtom(Atom newFirstAtom)
          Set the first atom in the bond.
 void setIdealBondLength(double d)
          Set the ideal bond length.
 void setRingBond(boolean ring)
          Set the bond ring status.
 void setSecondAtom(Atom newSecondAtom)
          Set the second atom in the bond.
 void setStickWidth(double v)
          Set the value of stickWidth.
 void setWideBond(boolean wide)
          Set the bond to be wide or not.
 java.lang.String toString()
          String representation of the bond.
 
Methods inherited from class astex.generic.Generic
addChild, addListener, addParent, getBoolean, getChildren, getDouble, getInteger, getParents, getString, main, removeChild, removeListener, removeParent, setBoolean, setClassname, setDouble, setInteger, setString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BondOrder

public static final java.lang.String BondOrder
See Also:
Constant Field Values

SingleBond

public static final int SingleBond
Constant that defines a single bond.

See Also:
Constant Field Values

DoubleBond

public static final int DoubleBond
Constant that defines a single bond.

See Also:
Constant Field Values

TripleBond

public static final int TripleBond
Constant that defines a single bond.

See Also:
Constant Field Values

AromaticBond

public static final int AromaticBond
Constant that defines an aromatic bond.

See Also:
Constant Field Values

AmideBond

public static final int AmideBond
Constant that defines an aromatic bond.

See Also:
Constant Field Values

SingleOrDoubleBond

public static final int SingleOrDoubleBond
Constant that defines a single or double bond.

See Also:
Constant Field Values

SingleOrAromaticBond

public static final int SingleOrAromaticBond
Constant that defines a single or aromatic bond.

See Also:
Constant Field Values

DoubleOrAromaticBond

public static final int DoubleOrAromaticBond
Constant that defines a double or aromatic bond.

See Also:
Constant Field Values

AnyBond

public static final int AnyBond
Constant that defines any bond.

See Also:
Constant Field Values

bondScale

public static final double bondScale
See Also:
Constant Field Values

attributes

public int attributes
The integer that stores the attributes.


wideBond

public static int wideBond
Is the bond to be drawn wide.


ringBond

public static int ringBond
Is the bond in a ring of any description.


ExplicitBond

public static int ExplicitBond
Did the bond come from a CONECT record.

Method Detail

getClassname

public java.lang.Object getClassname()
Description copied from interface: GenericInterface
Get our class description.

Specified by:
getClassname in interface GenericInterface
Overrides:
getClassname in class Generic

set

public java.lang.Object set(java.lang.Object key,
                            java.lang.Object property)
Description copied from interface: GenericInterface
Set an object value.

Specified by:
set in interface GenericInterface
Overrides:
set in class Generic

get

public java.lang.Object get(java.lang.Object key,
                            java.lang.Object def)
Description copied from interface: GenericInterface
Get Object representing key.

Specified by:
get in interface GenericInterface
Overrides:
get in class Generic

getProperties

public java.util.Enumeration getProperties()
Description copied from interface: GenericInterface
Return an enumeration of our properties.

Specified by:
getProperties in interface GenericInterface
Overrides:
getProperties in class Generic

isExplicitBond

public boolean isExplicitBond()
Is bond an explicit bond.


setExplicitBond

public void setExplicitBond(boolean e)
Set whehter this bond was an explicit bond.


getBondWidth

public int getBondWidth()
Get the value of bondWidth.

Returns:
value of bondWidth.

setBondWidth

public void setBondWidth(int v)
Set the value of bondWidth.

Parameters:
v - Value to assign to bondWidth.

getStickWidth

public double getStickWidth()
Get the value of stickWidth.

Returns:
value of stickWidth.

setStickWidth

public void setStickWidth(double v)
Set the value of stickWidth.

Parameters:
v - Value to assign to stickWidth.

getCylinderWidth

public double getCylinderWidth()
Get the value of cylinderWidth.

Returns:
value of cylinderWidth.

setCylinderWidth

public void setCylinderWidth(double v)
Set the value of cylinderWidth.

Parameters:
v - Value to assign to cylinderWidth.

getBondColor

public int getBondColor()
Get the value of bondColor.

Returns:
value of bondColor.

setBondColor

public void setBondColor(int v)
Set the value of bondColor.

Parameters:
v - Value to assign to bondColor.

setWideBond

public void setWideBond(boolean wide)
Set the bond to be wide or not.


setRingBond

public void setRingBond(boolean ring)
Set the bond ring status.


isWideBond

public boolean isWideBond()
Is the bond wide.


isRingBond

public boolean isRingBond()
Is the bond in a ring.


setBondOrder

public void setBondOrder(int order)
Set the bond order.


getBondOrder

public int getBondOrder()
Get the bond order.


isQueryBond

public boolean isQueryBond()
Is the bond a query bond.


create

public static Bond create()
A method that will create a new Bond. This may in the future reuse bonds from a list of those that are no longer in use.


setFirstAtom

public void setFirstAtom(Atom newFirstAtom)
Set the first atom in the bond.


setSecondAtom

public void setSecondAtom(Atom newSecondAtom)
Set the second atom in the bond.


getFirstAtom

public Atom getFirstAtom()
Return the first atom in a bond.


getSecondAtom

public Atom getSecondAtom()
Return the second atom in a bond.


getAtom

public Atom getAtom(int index)
Get the specified atom.


getOtherAtom

public Atom getOtherAtom(Atom knownAtom)
Given one atom in a bond return the other atom from the bond. If the atom isn't in the bond return null.


getBondSymbol

public java.lang.String getBondSymbol()
Return a smiles style symbol for the bond.


isTerminalBond

public boolean isTerminalBond()
Is this a terminal bond.


isNonRotatable

public boolean isNonRotatable()
Is this bond non rotatable.


setIdealBondLength

public void setIdealBondLength(double d)
Set the ideal bond length.


getIdealBondLength

public double getIdealBondLength()
Get the ideal bond length.


getBondLength

public double getBondLength()
Get the actual bond length.


toString

public java.lang.String toString()
String representation of the bond.

Overrides:
toString in class java.lang.Object

getUnitVector

public Point3d getUnitVector()
Get unit vector.


delete

public void delete()
Delete this bond.