SmilesBond
Date: 2019-10-22

org.jmol.smiles

## Class SmilesBond

- java.lang.Object
- - org.jmol.util.Edge
  - - org.jmol.smiles.SmilesBond

- All Implemented Interfaces:
    SimpleEdge

      public class SmilesBond
      extends Edge

  Bond in a SmilesMolecule

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private static java.lang.String` | `ALL_BONDS`
    `(package private) SmilesAtom` | `atom1`
    `(package private) SmilesAtom` | `atom2`
    `(package private) int[]` | `atropType`
    `(package private) SmilesBond[]` | `bondsOr`
    `boolean` | `isChain`
    `(package private) boolean` | `isConnection`
    `(package private) boolean` | `isNot`
    `(package private) Edge` | `matchingBond`
    `(package private) int` | `nBondsOr`
    `(package private) int` | `nPrimitives`
    `private SmilesBond[]` | `primitives`
    `private static java.lang.String` | `SMILES_BONDS`
    `static int` | `TYPE_ANY`
    `static int` | `TYPE_AROMATIC`
    `static int` | `TYPE_BIO_CROSSLINK`
    `static int` | `TYPE_BIO_SEQUENCE`
    `static int` | `TYPE_NONE`
    `static int` | `TYPE_RING`
    `static int` | `TYPE_UNKNOWN`

    - ### Fields inherited from class org.jmol.util.Edge

      `BOND_AROMATIC, BOND_AROMATIC_DOUBLE, BOND_AROMATIC_MASK, BOND_AROMATIC_SINGLE, BOND_COVALENT_DOUBLE, BOND_COVALENT_MASK, BOND_COVALENT_QUADRUPLE, BOND_COVALENT_QUINTUPLE, BOND_COVALENT_sextuple, BOND_COVALENT_SINGLE, BOND_COVALENT_TRIPLE, BOND_H_CALC, BOND_H_CALC_MASK, BOND_H_MINUS_3, BOND_H_MINUS_4, BOND_H_NUCLEOTIDE, BOND_H_PLUS_2, BOND_H_PLUS_3, BOND_H_PLUS_4, BOND_H_PLUS_5, BOND_H_REGULAR, BOND_HBOND_SHIFT, BOND_HYDROGEN_MASK, BOND_NEW, BOND_ORDER_ANY, BOND_ORDER_NULL, BOND_ORDER_UNSPECIFIED, BOND_PARTIAL_MASK, BOND_PARTIAL01, BOND_PARTIAL12, BOND_PARTIAL23, BOND_PARTIAL32, BOND_PYMOL_MULT, BOND_PYMOL_NOMULT, BOND_RENDER_SINGLE, BOND_STEREO_FAR, BOND_STEREO_MASK, BOND_STEREO_NEAR, BOND_STRUT, BOND_SULFUR_MASK, index, order, TYPE_ATROPISOMER, TYPE_ATROPISOMER_REV`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SmilesBond(SmilesAtom atom1, SmilesAtom atom2, int bondType, boolean isNot)` SmilesBond constructor

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `(package private) SmilesBond` | `addBondOr()`
    `(package private) SmilesBond` | `addPrimitive()`
    `SmilesAtom` | `getAtom1()`
    `int` | `getAtomIndex1()`
    `int` | `getAtomIndex2()`
    `(package private) static java.lang.String` | `getBondOrderString(int order)`
    `(package private) int` | `getBondType()`
    `(package private) static int` | `getBondTypeFromCode(char code)`
    `int` | `getCovalentOrder()`
    `Edge` | `getMatchingBond()`
    `(package private) SmilesAtom` | `getOtherAtom(SmilesAtom a)`
    `SimpleNode` | `getOtherNode(SimpleNode atom)`
    `int` | `getRealCovalentOrder()`
    `(package private) int` | `getValence()`
    `(package private) static int` | `isBondType(char ch, boolean isSearch, boolean isBioSequence)`
    `boolean` | `isCovalent()`
    `(package private) boolean` | `isFromPreviousTo(SmilesAtom atom)` Check to see if this is the bond to the previous atom
    `boolean` | `isHydrogen()`
    `(package private) void` | `set(SmilesBond bond)`
    `(package private) void` | `set2(int bondType, boolean isNot)`
    `(package private) void` | `set2a(SmilesAtom a1, SmilesAtom a2)`
    `(package private) void` | `setAtom2(SmilesAtom atom, SmilesSearch molecule)` from parse ring
    `(package private) void` | `setAtropType(int nn)`
    `SmilesBond` | `setPrimitive(int i)`
    `(package private) void` | `switchAtoms()` Ensure that atom ordering is proper.
    `java.lang.String` | `toString()`

    - ### Methods inherited from class org.jmol.util.Edge

      `getArgbHbondType, getAtropismNode, getAtropismOrder, getAtropismOrder12, getBondOrderFromFloat, getBondOrderFromString, getBondOrderNameFromOrder, getBondOrderNumberFromOrder, getCIPChirality, getCmlBondOrder, getCovalentBondOrder, getPartialBondDotted, getPartialBondOrder, isAtropism, isOrderH, setCIPChirality`

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

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

- - ### Field Detail

    - #### TYPE_UNKNOWN

          public static final int TYPE_UNKNOWN

      See Also:
        Constant Field Values

    - #### TYPE_NONE

          public static final int TYPE_NONE

      See Also:
        Constant Field Values

    - #### TYPE_AROMATIC

          public static final int TYPE_AROMATIC

      See Also:
        Constant Field Values

    - #### TYPE_RING

          public static final int TYPE_RING

      See Also:
        Constant Field Values

    - #### TYPE_ANY

          public static final int TYPE_ANY

      See Also:
        Constant Field Values

    - #### TYPE_BIO_SEQUENCE

          public static final int TYPE_BIO_SEQUENCE

      See Also:
        Constant Field Values

    - #### TYPE_BIO_CROSSLINK

          public static final int TYPE_BIO_CROSSLINK

      See Also:
        Constant Field Values

    - #### ALL_BONDS

          private static final java.lang.String ALL_BONDS

      See Also:
        Constant Field Values

    - #### SMILES_BONDS

          private static final java.lang.String SMILES_BONDS

      See Also:
        Constant Field Values

    - #### atom1

          SmilesAtom atom1

    - #### atom2

          SmilesAtom atom2

    - #### isNot

          boolean isNot

    - #### matchingBond

          Edge matchingBond

    - #### primitives

          private SmilesBond[] primitives

    - #### nPrimitives

          int nPrimitives

    - #### bondsOr

          SmilesBond[] bondsOr

    - #### nBondsOr

          int nBondsOr

    - #### isConnection

          boolean isConnection

    - #### atropType

          int[] atropType

    - #### isChain

          public boolean isChain

  - ### Constructor Detail

    - #### SmilesBond

          SmilesBond(SmilesAtom atom1,
                     SmilesAtom atom2,
                     int bondType,
                     boolean isNot)

      SmilesBond constructor
      Parameters:
        `atom1` - First atom
        `atom2` - Second atom
        `bondType` - Bond type
        `isNot` -

  - ### Method Detail

    - #### getBondOrderString

          static java.lang.String getBondOrderString(int order)

    - #### getBondTypeFromCode

          static int getBondTypeFromCode(char code)

      Parameters:
        `code` - Bond code
      Returns:
        Bond type

    - #### getAtom1

          public SmilesAtom getAtom1()

    - #### set

          void set(SmilesBond bond)

    - #### setAtropType

          void setAtropType(int nn)

    - #### setPrimitive

          public SmilesBond setPrimitive(int i)

    - #### addBondOr

          SmilesBond addBondOr()

    - #### addPrimitive

          SmilesBond addPrimitive()

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### set2

          void set2(int bondType,
                    boolean isNot)

    - #### set2a

          void set2a(SmilesAtom a1,
                     SmilesAtom a2)

    - #### setAtom2

          void setAtom2(SmilesAtom atom,
                        SmilesSearch molecule)

      from parse ring
      Parameters:
        `atom` -
        `molecule` -

    - #### isFromPreviousTo

          boolean isFromPreviousTo(SmilesAtom atom)

      Check to see if this is the bond to the previous atom
      Parameters:
        `atom` -
      Returns:
        TRUE if other atom is previous atom

    - #### isBondType

          static int isBondType(char ch,
                                boolean isSearch,
                                boolean isBioSequence)
                         throws InvalidSmilesException

      Throws:
        `InvalidSmilesException`

    - #### getBondType

          int getBondType()

    - #### getValence

          int getValence()

    - #### getOtherAtom

          SmilesAtom getOtherAtom(SmilesAtom a)

    - #### getAtomIndex1

          public int getAtomIndex1()

      Specified by:
        `getAtomIndex1` in class `Edge`

    - #### getAtomIndex2

          public int getAtomIndex2()

      Specified by:
        `getAtomIndex2` in class `Edge`

    - #### getCovalentOrder

          public int getCovalentOrder()

      Specified by:
        `getCovalentOrder` in interface `SimpleEdge`
      Specified by:
        `getCovalentOrder` in class `Edge`
      Returns:
        the bond order 1-4 if it is covalent, or 0 if not.

    - #### getOtherNode

          public SimpleNode getOtherNode(SimpleNode atom)

    - #### isCovalent

          public boolean isCovalent()

      Specified by:
        `isCovalent` in interface `SimpleEdge`
      Specified by:
        `isCovalent` in class `Edge`

    - #### isHydrogen

          public boolean isHydrogen()

      Specified by:
        `isHydrogen` in class `Edge`

    - #### switchAtoms

          void switchAtoms()

      Ensure that atom ordering is proper. possibly not fully tested

    - #### getRealCovalentOrder

          public int getRealCovalentOrder()

    - #### getMatchingBond

          public Edge getMatchingBond()