Class SmilesStereo

java.lang.Object
org.jmol.smiles.SmilesStereo

public class SmilesStereo extends Object
This class relates to stereochemical issues
  • Field Details

    • chiralClass

      private int chiralClass
    • chiralOrder

      int chiralOrder
    • atomCount

      int atomCount
    • details

      private String details
    • jmolAtoms

      private Node[] jmolAtoms
    • DEFAULT

      public static final int DEFAULT
      See Also:
    • POLYHEDRAL

      public static final int POLYHEDRAL
      See Also:
    • ALLENE

      public static final int ALLENE
      See Also:
    • TRIGONAL_PYRAMIDAL

      public static final int TRIGONAL_PYRAMIDAL
      See Also:
    • TETRAHEDRAL

      public static final int TETRAHEDRAL
      See Also:
    • TRIGONAL_BIPYRAMIDAL

      public static final int TRIGONAL_BIPYRAMIDAL
      See Also:
    • OCTAHEDRAL

      public static final int OCTAHEDRAL
      See Also:
    • SQUARE_PLANAR

      public static final int SQUARE_PLANAR
      See Also:
    • T_SHAPED

      public static final int T_SHAPED
      See Also:
    • SEESAW

      public static final int SEESAW
      See Also:
    • PERM_TB

      private static final int[] PERM_TB
    • PERM_OCT

      private static final int[] PERM_OCT
    • PERM_SS

      private static final int[] PERM_SS
    • v

    • polyhedralOrders

      private int[][] polyhedralOrders
    • isNot

      private boolean isNot
    • sorter

      private PolyhedronStereoSorter sorter
  • Constructor Details

  • Method Details

    • getChiralityClass

      private static int getChiralityClass(String xx)
    • newStereo

      public static SmilesStereo newStereo(SmilesSearch search) throws InvalidSmilesException
      Throws:
      InvalidSmilesException
    • getChiralClass

      public int getChiralClass(SmilesAtom sAtom)
    • setChiralClass

      private int setChiralClass(SmilesAtom sAtom)
    • fixStereo

      void fixStereo(SmilesAtom sAtom) throws InvalidSmilesException
      Check number of connections and permute them to match a canonical version
      Parameters:
      sAtom -
      Throws:
      InvalidSmilesException
    • normalizeClass

      private boolean normalizeClass(SmilesAtom atom)
      re-order bonds to match standard @ and @@ types
      Parameters:
      atom -
      Returns:
      true if OK
    • setTopoCoordinates

      public boolean setTopoCoordinates(SmilesAtom sAtom0, SmilesAtom pAtom, SmilesAtom sAtom2, Node[] cAtoms, boolean isNot)
      Parameters:
      sAtom0 - the first target atom
      pAtom - the pattern atom connected to the target atoms
      sAtom2 - allene atom
      cAtoms - the target atoms
      isNot -
      Returns:
      true if successful
    • getMappedTopoAtoms

      private int[] getMappedTopoAtoms(SmilesAtom atom, SmilesAtom a2, Node[] cAtoms, int[] map)
    • getTopoMapPt

      private static boolean getTopoMapPt(int[] map, int i, SmilesAtom atom, SmilesAtom cAtom, SmilesBond[] bonds, int n000)
      Parameters:
      map -
      i -
      atom -
      cAtom -
      bonds -
      n000 -
      Returns:
      true if found
    • getJmolAtom

      private Node getJmolAtom(int i)
    • sortPolyBondsByStereo

      void sortPolyBondsByStereo(SimpleNode atom, SimpleNode ref, javajs.util.T3 center, SimpleEdge[] bonds, javajs.util.V3 vTemp)
      Sort bond array as ccw rotation around the axis connecting the atom and the reference point (polyhedron center) as seen from outside the polyhedron looking in. Since we are allowing no branching, all atoms will appear as separate components with only numbers after them. These numbers will be processed and listed in this order.
      Parameters:
      atom -
      ref -
      center -
      bonds -
      vTemp -
    • checkStereoChemistry

      boolean checkStereoChemistry(SmilesSearch search, VTemp v)
    • checkStereoForAtom

      public int checkStereoForAtom(SmilesAtom pAtom, boolean isNot, boolean haveTopo)
    • checkPolyHedralWinding

      private boolean checkPolyHedralWinding(Node a0, Node[] a)
    • getAlleneAtoms

      public Node[] getAlleneAtoms(boolean haveTopo, SmilesAtom sAtom0, SmilesAtom pAtom, SmilesAtom pAtom1)
      Parameters:
      haveTopo -
      sAtom0 -
      pAtom -
      pAtom1 -
      Returns:
      allene atoms
    • addAlleneLonePair

      private void addAlleneLonePair(SmilesAtom pAtom, Node[] jn, int k)
      for allenes, we must check for missing atoms
      Parameters:
      pAtom -
      jn -
      k -
    • getStereoFlag

      static String getStereoFlag(SimpleNode atom0, SimpleNode[] atoms, int nAtoms, VTemp v, boolean is2D)
      Parameters:
      atom0 -
      atoms -
      nAtoms -
      v -
      is2D -
      Returns:
      String
    • checkStereochemistryAll

      private static boolean checkStereochemistryAll(boolean isNot, SimpleNode atom0, int chiralClass, int order, SimpleNode atom1, SimpleNode atom2, SimpleNode atom3, SimpleNode atom4, SimpleNode atom5, SimpleNode atom6, VTemp v)
    • isDiaxial

      static boolean isDiaxial(SimpleNode atomA, SimpleNode atomB, SimpleNode atom1, SimpleNode atom2, VTemp v, float f)
    • getHandedness

      static int getHandedness(SimpleNode a, SimpleNode b, SimpleNode c, SimpleNode pt, VTemp v)
      determine the winding of the circuit a--b--c relative to point pt
      Parameters:
      a -
      b -
      c -
      pt -
      v -
      Returns:
      1 for "@", 2 for "@@"
    • getPlaneNormals

      private static void getPlaneNormals(javajs.util.P3 atom1, javajs.util.P3 atom2, javajs.util.P3 atom3, javajs.util.P3 atom4, VTemp v)
    • checkChirality

      static int checkChirality(SmilesSearch search, String pattern, int index, SmilesAtom newAtom) throws InvalidSmilesException
      Throws:
      InvalidSmilesException
    • getPolyhedralOrders

      private void getPolyhedralOrders() throws InvalidSmilesException
      experimental Jmol polySMILES
      Throws:
      InvalidSmilesException
    • getAtropicStereoFlag

      public static int getAtropicStereoFlag(Node[] nodes)