edu.sdsc.mbt
Class Bond

java.lang.Object
  extended byedu.sdsc.mbt.StructureComponent
      extended byedu.sdsc.mbt.Bond
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class Bond
extends StructureComponent
implements java.lang.Cloneable

Implements a StructureComponent container for bond information. This may be a covalent or a hydrogen bond.

Author:
John L. Moreland
See Also:
StructureComponent, Atom, Serialized Form

Field Summary
 float order
           
 short quality
           
 short render
           
static java.lang.String TYPE_COVALENT
          Type for a covalent bond (bonding interaction due to electron sharing).
static java.lang.String TYPE_HYDROGEN
          Type for a hydrogen bond (bonding interaction due to partial charges).
static java.lang.String TYPE_IONIC
          Type for an ionic bond (bonding interaction due to electrostatic attraction between cations and anions).
 boolean visible
           
 
Fields inherited from class edu.sdsc.mbt.StructureComponent
structure
 
Constructor Summary
Bond(Atom atom0, Atom atom1)
          Constructor variant used when there will likely be no atom list (eg: when only sequence data is loaded).
 
Method Summary
 java.lang.Object clone()
          Clone this object.
 void copy(StructureComponent structureComponent)
          Copy all of the field values from the parameter object into "this".
 boolean equals(java.lang.Object o)
          One Bond is equal to another Bond if they hashCode values are equal.
 Atom getAtom(int index)
          Get the specified Atom record that forms this Bond.
static java.lang.String getClassName()
          This method returns the fully qualified name of this class.
 double getDistance()
          Get the distance for the bond.
static double getDistance(Atom atom0, Atom atom1)
           
 Atom getReferenceAtom()
           
 java.lang.String getStructureComponentType()
          This method returns the fully qualified name of this class.
 boolean isVisible()
           
 void setOrder(float order)
          Set the bond order (the number of covalently shared electron pairs).
 void setOrderOnly(float order)
          This method sets order without editing atoms' hybridization states it is used in the loading of data with predefined bonding to avoid overwriting of hybridization data in subsequent passes over atoms that participate in bonds of different orders
 void setReferenceAtom(Atom atom)
           
 void setReferenceAtom(int index)
           
 
Methods inherited from class edu.sdsc.mbt.StructureComponent
getStructure, setStructure
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_COVALENT

public static final java.lang.String TYPE_COVALENT
Type for a covalent bond (bonding interaction due to electron sharing).

See Also:
Constant Field Values

TYPE_HYDROGEN

public static final java.lang.String TYPE_HYDROGEN
Type for a hydrogen bond (bonding interaction due to partial charges).

See Also:
Constant Field Values

TYPE_IONIC

public static final java.lang.String TYPE_IONIC
Type for an ionic bond (bonding interaction due to electrostatic attraction between cations and anions).

See Also:
Constant Field Values

order

public float order

render

public short render

quality

public short quality

visible

public boolean visible
Constructor Detail

Bond

public Bond(Atom atom0,
            Atom atom1)
Constructor variant used when there will likely be no atom list (eg: when only sequence data is loaded).

Method Detail

copy

public void copy(StructureComponent structureComponent)
Copy all of the field values from the parameter object into "this".

Specified by:
copy in class StructureComponent

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Clone this object.

Overrides:
clone in class StructureComponent
Throws:
java.lang.CloneNotSupportedException

equals

public boolean equals(java.lang.Object o)
One Bond is equal to another Bond if they hashCode values are equal. That is if they contain (in either order) the same two Atom objects.


getClassName

public static java.lang.String getClassName()
This method returns the fully qualified name of this class.

This name is used by the StructureComponentRegistry class to enable dynamic registration and discovery of new StructureComponent sub-classes/types. The name is also used to create a unique integer indentifier for each type in order to make run-time type comparisons fast.


getStructureComponentType

public java.lang.String getStructureComponentType()
This method returns the fully qualified name of this class.

Specified by:
getStructureComponentType in class StructureComponent

setOrder

public void setOrder(float order)
Set the bond order (the number of covalently shared electron pairs). Generally this is a value from 1.0 to 6.0 but may be 1.5 for aromatic (benzene ring bonds) or 0.0 for unspecified order (the default).

See Also:
#getOrder( )

setOrderOnly

public void setOrderOnly(float order)
This method sets order without editing atoms' hybridization states it is used in the loading of data with predefined bonding to avoid overwriting of hybridization data in subsequent passes over atoms that participate in bonds of different orders

Parameters:
order -

getDistance

public double getDistance()
Get the distance for the bond.


getDistance

public static final double getDistance(Atom atom0,
                                       Atom atom1)

getAtom

public Atom getAtom(int index)
Get the specified Atom record that forms this Bond.


setReferenceAtom

public void setReferenceAtom(int index)

setReferenceAtom

public void setReferenceAtom(Atom atom)

getReferenceAtom

public Atom getReferenceAtom()

isVisible

public boolean isVisible()
Specified by:
isVisible in class StructureComponent