Class SmilesStereo


  • public class SmilesStereo
    extends java.lang.Object
    This class relates to stereochemical issues.
    • Method Detail

      • getChiralityClass

        private static int getChiralityClass​(java.lang.String xx)
      • getChiralClass

        public int getChiralClass​(SmilesAtom sAtom)
      • setChiralClass

        private int setChiralClass​(SmilesAtom sAtom)
      • normalizeClass

        private boolean normalizeClass​(SmilesAtom atom)
        re-order bonds to match standard @ and @@ types
        Parameters:
        atom -
        Returns:
        true if OK
      • 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)
      • sortBondsByStereo

        void sortBondsByStereo​(Node atom,
                               Node atomPrev,
                               javajs.util.T3 ref,
                               Edge[] 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 -
        atomPrev -
        ref -
        bonds -
        vTemp -
      • checkStereoChemistry

        boolean checkStereoChemistry​(SmilesSearch search,
                                     VTemp v)
      • getAlleneAtom

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

        static java.lang.String getStereoFlag​(Node atom0,
                                              Node[] atoms,
                                              int nAtoms,
                                              VTemp v)
        Parameters:
        atom0 -
        atoms -
        nAtoms -
        v -
        Returns:
        String
      • checkStereochemistryAll

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

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

        static int getHandedness​(Node a,
                                 Node b,
                                 Node c,
                                 Node 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​(Node atom1,
                                            Node atom2,
                                            Node atom3,
                                            Node atom4,
                                            VTemp v)
      • distanceToPlane

        static float distanceToPlane​(javajs.util.V3 norm,
                                     float w,
                                     javajs.util.P3 pt)