Dipoles
Date: 2019-10-22

org.jmol.shapespecial

## Class Dipoles

- java.lang.Object
- - org.jmol.shape.Shape
  - - org.jmol.shapespecial.Dipoles

-     public class Dipoles
      extends Shape

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private int` | `atomIndex1`
    `private int` | `atomIndex2`
    `private javajs.util.V3` | `calculatedDipole`
    `private short` | `colix`
    `private Dipole` | `currentDipole`
    `(package private) static short` | `DEFAULT_MAD`
    `(package private) static float` | `DEFAULT_OFFSETSIDE`
    `int` | `dipoleCount`
    `Dipole[]` | `dipoles`
    `private float` | `dipoleValue`
    `private static float` | `E_ANG_PER_DEBYE`
    `private javajs.util.P3` | `endCoord`
    `private boolean` | `iHaveTwoEnds`
    `private boolean` | `isBond`
    `private boolean` | `isUserValue`
    `private short` | `mad`
    `private javajs.util.P3` | `startCoord`
    `private Dipole` | `tempDipole`
    `private java.lang.String` | `wildID`

    - ### Fields inherited from class org.jmol.shape.Shape

      `bsColixSet, bsSizeSet, isBioShape, ms, myType, RADIUS_MAX, shapeID, translucentAllowed, translucentLevel, vf, vwr`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Dipoles()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `private Dipole` | `allocDipole(java.lang.String thisID, java.lang.String dipoleInfo)`
    `private void` | `clear(boolean clearBondDipolesOnly)`
    `private void` | `deleteDipole(Dipole dipole)`
    `private void` | `dumpDipoles(java.lang.String msg)`
    `private Dipole` | `findAtomDipole(Atom atom1, Atom atom2, boolean doAllocate)`
    `private Dipole` | `findBondDipole(Bond bond)`
    `private Dipole` | `findDipole(java.lang.String thisID)`
    `private Dipole` | `findDipoleFor(java.lang.String thisID, java.lang.String dipoleInfo)`
    `private void` | `getAllMolecularDipoles(javajs.util.BS bsAtoms)`
    `private void` | `getBondDipoles()`
    `private int` | `getDipoleIndex(int atomIndex1, int atomIndex2)`
    `private int` | `getDipoleIndexFor(java.lang.String dipoleInfo, java.lang.String thisID)`
    `int` | `getIndexFromName(java.lang.String thisID)`
    `private void` | `getMolecular(javajs.util.BS bsMolecule)`
    `java.lang.Object` | `getProperty(java.lang.String property, int index)`
    `boolean` | `getPropertyData(java.lang.String property, java.lang.Object[] data)`
    `java.lang.Object` | `getShapeDetail()`
    `java.lang.String` | `getShapeState()`
    `void` | `initShape()`
    `private boolean` | `isBondDipole(int i)`
    `private boolean` | `isSameAtoms(Dipole dipole, java.lang.String dipoleInfo)`
    `private void` | `setColixDipole(short colix, int bondTypeMask, javajs.util.BS bs)`
    `private void` | `setDipole()`
    `private void` | `setDipoleAtoms(Atom atom1, Atom atom2, float c1, float c2)`
    `private void` | `setModelIndex()`
    `void` | `setModelVisibilityFlags(javajs.util.BS bsModels)`
    `void` | `setProperty(java.lang.String propertyName, java.lang.Object value, javajs.util.BS bs)`
    `private void` | `setPropertyFor(int tok, Dipole dipole, int iValue, float fValue)`
    `private void` | `setPropertyTok(int tok, boolean bondOnly, int iValue, float fValue)`

    - ### Methods inherited from class org.jmol.shape.Shape

      `appendCmd, checkBoundsMinMax, checkObjectClicked, checkObjectDragged, checkObjectHovered, coordinateInRange, encodeColor, findNearestAtomIndex, getColix, getColixA, getColixB, getColixI, getColorCommand, getColorCommandUnk, getFontCommand, getPropShape, getSize, getSizeG, getTranslucentLabel, initializeShape, initModelSet, replaceGroup, setAtomClickability, setModelSet, setPropS, setShapeSizeRD, setSize, setSizeRD, wasClicked`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_MAD

          static final short DEFAULT_MAD

      See Also:
        Constant Field Values

    - #### DEFAULT_OFFSETSIDE

          static final float DEFAULT_OFFSETSIDE

      See Also:
        Constant Field Values

    - #### dipoleCount

          public int dipoleCount

    - #### dipoles

          public Dipole[] dipoles

    - #### currentDipole

          private Dipole currentDipole

    - #### tempDipole

          private Dipole tempDipole

    - #### startCoord

          private javajs.util.P3 startCoord

    - #### endCoord

          private javajs.util.P3 endCoord

    - #### dipoleValue

          private float dipoleValue

    - #### isUserValue

          private boolean isUserValue

    - #### isBond

          private boolean isBond

    - #### iHaveTwoEnds

          private boolean iHaveTwoEnds

    - #### atomIndex1

          private int atomIndex1

    - #### atomIndex2

          private int atomIndex2

    - #### colix

          private short colix

    - #### calculatedDipole

          private javajs.util.V3 calculatedDipole

    - #### wildID

          private java.lang.String wildID

    - #### mad

          private short mad

    - #### E_ANG_PER_DEBYE

          private static final float E_ANG_PER_DEBYE

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### Dipoles

          public Dipoles()

  - ### Method Detail

    - #### initShape

          public void initShape()

      Specified by:
        `initShape` in class `Shape`

    - #### setProperty

          public void setProperty(java.lang.String propertyName,
                                  java.lang.Object value,
                                  javajs.util.BS bs)

      Specified by:
        `setProperty` in class `Shape`

    - #### getMolecular

          private void getMolecular(javajs.util.BS bsMolecule)

    - #### getAllMolecularDipoles

          private void getAllMolecularDipoles(javajs.util.BS bsAtoms)

    - #### setPropertyTok

          private void setPropertyTok(int tok,
                                      boolean bondOnly,
                                      int iValue,
                                      float fValue)

    - #### setPropertyFor

          private void setPropertyFor(int tok,
                                      Dipole dipole,
                                      int iValue,
                                      float fValue)

    - #### getPropertyData

          public boolean getPropertyData(java.lang.String property,
                                         java.lang.Object[] data)

      Overrides:
        `getPropertyData` in class `Shape`
      Returns:
        true if serviced

    - #### getProperty

          public java.lang.Object getProperty(java.lang.String property,
                                              int index)

      Overrides:
        `getProperty` in class `Shape`
      Returns:
        true if serviced

    - #### getBondDipoles

          private void getBondDipoles()

    - #### isBondDipole

          private boolean isBondDipole(int i)

    - #### setColixDipole

          private void setColixDipole(short colix,
                                      int bondTypeMask,
                                      javajs.util.BS bs)

    - #### setDipole

          private void setDipole()

    - #### setDipoleAtoms

          private void setDipoleAtoms(Atom atom1,
                                      Atom atom2,
                                      float c1,
                                      float c2)

    - #### getDipoleIndexFor

          private int getDipoleIndexFor(java.lang.String dipoleInfo,
                                        java.lang.String thisID)

    - #### isSameAtoms

          private boolean isSameAtoms(Dipole dipole,
                                      java.lang.String dipoleInfo)

    - #### getDipoleIndex

          private int getDipoleIndex(int atomIndex1,
                                     int atomIndex2)

    - #### deleteDipole

          private void deleteDipole(Dipole dipole)

    - #### findDipole

          private Dipole findDipole(java.lang.String thisID)

    - #### findAtomDipole

          private Dipole findAtomDipole(Atom atom1,
                                        Atom atom2,
                                        boolean doAllocate)

    - #### findBondDipole

          private Dipole findBondDipole(Bond bond)

    - #### findDipoleFor

          private Dipole findDipoleFor(java.lang.String thisID,
                                       java.lang.String dipoleInfo)

    - #### allocDipole

          private Dipole allocDipole(java.lang.String thisID,
                                     java.lang.String dipoleInfo)

    - #### dumpDipoles

          private void dumpDipoles(java.lang.String msg)

    - #### clear

          private void clear(boolean clearBondDipolesOnly)

    - #### getIndexFromName

          public int getIndexFromName(java.lang.String thisID)

      Overrides:
        `getIndexFromName` in class `Shape`
      Returns:
        index

    - #### getShapeDetail

          public java.lang.Object getShapeDetail()

      Overrides:
        `getShapeDetail` in class `Shape`

    - #### setModelIndex

          private void setModelIndex()

    - #### setModelVisibilityFlags

          public void setModelVisibilityFlags(javajs.util.BS bsModels)

      Overrides:
        `setModelVisibilityFlags` in class `Shape`

    - #### getShapeState

          public java.lang.String getShapeState()

      Specified by:
        `getShapeState` in class `Shape`