The Octet Molecular Representation Framework v0.8.2

net.sf.octet.util
Class BuilderKit

java.lang.Object
  extended bynet.sf.octet.util.BuilderKit

public class BuilderKit
extends java.lang.Object

A collection of static utility methods for working with RepresentationBuilders.

Author:
Richard Apodaca

Method Summary
static AtomProxy addAtom(java.lang.String symbol, RepresentationBuilder builder)
          Returns an AtomProxy for an Atom represented by the specified one- or two- letter atomic symbol.
static void addRadical(AtomProxy atom, RepresentationBuilder builder)
          Adds a single radical center on atom using builder.
static void configureAlkene(AtomProxy left, AtomProxy topLeft, AtomProxy bottomLeft, AtomProxy right, AtomProxy topRight, AtomProxy bottomRight, RepresentationBuilder builder)
          Configures the specified AtomProxies in a planar arrangement about an axis defined by a left and right AtomProxy.
static void configureTetrahedron(AtomProxy center, AtomProxy back, AtomProxy first, AtomProxy second, AtomProxy third, RepresentationBuilder builder)
           Configures the specified AtomProxies in a tetrahedral arrangement about a central AtomProxy using Builder.
static void connectDouble(AtomProxy source, AtomProxy target, RepresentationBuilder builder)
          Connects source with target using a localized double bond.
static void connectMultiple(AtomProxy source, AtomProxy target, int bondOrder, RepresentationBuilder builder)
          Connects source with target using a localized multiple bond of order order.
static void connectSingle(AtomProxy source, AtomProxy target, RepresentationBuilder builder)
          Connects source with target using a localized single bond.
static void connectTriple(AtomProxy source, AtomProxy target, RepresentationBuilder builder)
          Connects source with target using a localized triple bond.
static void shareElectrons(AtomProxy atom, BondingSystemProxy system, int electronCount, RepresentationBuilder builder)
          Removes electronCount electrons from atom and places them in system.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

connectSingle

public static void connectSingle(AtomProxy source,
                                 AtomProxy target,
                                 RepresentationBuilder builder)
Connects source with target using a localized single bond. This operation creates a two-center, two-electron BondingSystem between source and target. One electron is obtained from source and the other obtained from target.

Parameters:
source - proxy to the source atom
target - proxy to the target atom
Throws:
NoSuchProxyExcpetion - if source or target are not found

connectDouble

public static void connectDouble(AtomProxy source,
                                 AtomProxy target,
                                 RepresentationBuilder builder)
Connects source with target using a localized double bond. This operation creates a two-center, four-electron BondingSystem between source and target. Two electrons are obtained from source and the other two are obtained from target.

Parameters:
source - proxy to the source atom
target - proxy to the target atom
Throws:
NoSuchProxyExcpetion - if source or target are not found

connectTriple

public static void connectTriple(AtomProxy source,
                                 AtomProxy target,
                                 RepresentationBuilder builder)
Connects source with target using a localized triple bond. This operation creates a two-center, six-electron BondingSystem between source and target. Three electrons are obtained from source and the other three are obtained from target.

Parameters:
source - proxy to the source atom
target - proxy to the target atom
Throws:
NoSuchProxyExcpetion - if source or target are not found

connectMultiple

public static void connectMultiple(AtomProxy source,
                                   AtomProxy target,
                                   int bondOrder,
                                   RepresentationBuilder builder)
Connects source with target using a localized multiple bond of order order. bondOrder electrons are obtained from source and target.

Parameters:
source - the source Atom
target - the target Atom
bondOrder - the bond order
builder - the RepresentationBuilder
Throws:
java.lang.IllegalArgumentException - if bondOrder is not 1, 2, or 3.

shareElectrons

public static void shareElectrons(AtomProxy atom,
                                  BondingSystemProxy system,
                                  int electronCount,
                                  RepresentationBuilder builder)
Removes electronCount electrons from atom and places them in system. Negative values of electronCount reverse the direction of electron transfer.

Parameters:
atom - the proxy for the atom from which electrons will be taken
system - the proxy for the BondingSystem that will accept electrons
electronCount - the number of electrons to transfer; positive values move electrons from atom to system - negative values move electrons from system to atom
Throws:
NoSuchProxyExcpetion - if atom or system are not found in builder

addRadical

public static void addRadical(AtomProxy atom,
                              RepresentationBuilder builder)
Adds a single radical center on atom using builder. The electron is placed in a new, singly-occupied Orbital.

Parameters:
atom - the proxy for the Atom at which to add the radical center
builder - the RepresentationBuilder

addAtom

public static AtomProxy addAtom(java.lang.String symbol,
                                RepresentationBuilder builder)
Returns an AtomProxy for an Atom represented by the specified one- or two- letter atomic symbol.

Parameters:
symbol - the atomic symbol of the atom
builder - the RepresentationBuilder
Returns:
a proxy for the created atom
Throws:
java.lang.IllegalArgumentException - if symbol is unrecognized

configureTetrahedron

public static void configureTetrahedron(AtomProxy center,
                                        AtomProxy back,
                                        AtomProxy first,
                                        AtomProxy second,
                                        AtomProxy third,
                                        RepresentationBuilder builder)

Configures the specified AtomProxies in a tetrahedral arrangement about a central AtomProxy using Builder. Nomenclature derives from the verticies of a tetrahedron with one vertex pointed away from a viewer. One vertex, represented by center is at the center of the tetrahedron. One vertex, repesented by back points away from the viewer. The remaining verticies are arranged in clockwise orientation about the center-back axis, with first represented by first, and so on.

center may not be null, but any of the other AtomProxies may be.

Parameters:
center - the central AtomProxy - may not be null
back - the AtomProxy pointing away from the viewer - may be null
first - the first AtomProxy when traced clockwise - may be null
second - the second AtomProxy when traced clockwise - may be null
third - the third AtomProxy when traced clockwise - may be null
builder - the RepresentationBuilder
Throws:
java.lang.NullPointerException - if center is null

configureAlkene

public static void configureAlkene(AtomProxy left,
                                   AtomProxy topLeft,
                                   AtomProxy bottomLeft,
                                   AtomProxy right,
                                   AtomProxy topRight,
                                   AtomProxy bottomRight,
                                   RepresentationBuilder builder)
Configures the specified AtomProxies in a planar arrangement about an axis defined by a left and right AtomProxy. Four quadrants, topLeft, bottomLeft, topRight, and bottomRight are defined by the neighbors of the left and right AtomProxy.

Parameters:
left - the left atom
topLeft - the top left atom, a neighbor of left
bottomLeft - the bottom left atom, a neighbor of left
right - the right atom, a neighbor of left
topRight - the top right atom, a neighbor of right
bottomRight - the bottom right atom, a neighbor of right
builder - the RepresentationBuilder
Throws:
java.lang.NullPointerException - of either left or right are null

The Octet Molecular Representation Framework v0.8.2