Class CIPData

  • Direct Known Subclasses:
    CIPDataSmiles, CIPDataTracker

    public class CIPData
    extends Object
    A helper class to handle application-specific analysis and store information needed by CIPChirality and CIPDataSmiles. Subclassed as CIPDataSmiles to also allow Jmol's "...SMILES...".find("SMILES","chirality")
    • Field Detail

      • TRIGONALITY_MIN

        static final float TRIGONALITY_MIN
        measure of planarity in a trigonal system, in Angstroms
        See Also:
        Constant Field Values
      • testRule6Full

        public boolean testRule6Full
        A flag that, if set, returns rr for bicyclo[2.2.2]octane
      • vwr

        Viewer vwr
        Jmol's viewer class
      • atoms

        SimpleNode[] atoms
        all application atoms referenced by bit sets
      • bsAtoms

        javajs.util.BS bsAtoms
        bit set of all atoms to process
      • bsMolecule

        javajs.util.BS bsMolecule
        atoms in all molecules containing the atoms of interest
      • bsAromatic

        javajs.util.BS bsAromatic
        Jmol's definition of aromatic
      • bsXAromatic

        javajs.util.BS bsXAromatic
        excluded aromatics [r5d3n+0,r5d2o+0]
      • bsNegativeAromatic

        javajs.util.BS bsNegativeAromatic
        [a-]
      • bsAzacyclic

        javajs.util.BS bsAzacyclic
        all N atoms that are sp3-hybridized and at small ring fusions
      • bsAtropisomeric

        javajs.util.BS bsAtropisomeric
        bit set of all biphenyl-like connections "[!H](.t1:-20,20)a{a(.t2:-20,20)-a}a[!H]"
      • bsHelixM

        javajs.util.BS bsHelixM
        aromatic atoms at the end of a negative helical turn "A{a}(.t:-10,-40)a(.t:-10,-40)aaa"
      • bsHelixP

        javajs.util.BS bsHelixP
        aromatic atoms at the end of a positive helical turn "A{a}(.t:10,40)a(.t:10,40)aaa"
      • lstSmallRings

        javajs.util.BS[] lstSmallRings
        all 3- to 7-membered rings; used to exclude E/Z and N-SP3 descriptors
      • bsKekuleAmbiguous

        javajs.util.BS bsKekuleAmbiguous
        atoms that need specially-calculated element number in Rule 1a
      • bsEnes

        javajs.util.BS bsEnes
        all sp2-hybridized atoms that are not Kekule-ambiguous
      • vNorm

        protected javajs.util.V3 vNorm
      • vTemp

        protected javajs.util.V3 vTemp
    • Constructor Detail

      • CIPData

        public CIPData()
    • Method Detail

      • isTracker

        protected boolean isTracker()
        Subclass identifier
        Returns:
        true for CIPDataTracker
      • isSmiles

        boolean isSmiles()
        Subclass identifier
        Returns:
        true for CIPDataSmiles
      • set

        public CIPData set​(Viewer vwr,
                           javajs.util.BS bsAtoms)
        Actual constructor.
        Parameters:
        vwr - Jmol viewer
        bsAtoms - selected atoms
        Returns:
        this
      • init

        protected void init()
        initializer -- called also by CIPDataSmiles
      • getList

        protected javajs.util.BS[] getList​(String smarts)
                                    throws Exception
        Retrieve an array of bit sets that match a given SMARTS
        Parameters:
        smarts -
        Returns:
        array of matching bit sets
        Throws:
        Exception
      • match

        protected javajs.util.BS match​(String smarts)
                                throws Exception
        Return a bit set corresponding to a SMARTS
        Parameters:
        smarts -
        Returns:
        bit set matching this SMARTS
        Throws:
        Exception
      • getEneKekule

        void getEneKekule()
        Look for conjugated loops of any size that have atoms not already in aromatic rings
      • checkEne

        private int checkEne​(javajs.util.BS bsAllEnes,
                             javajs.util.BS bsPath,
                             int iLast,
                             int iAtom,
                             int order,
                             javajs.util.BS bsEneAtom1)
        Look for a path that contains this ene in a fully conjugated pattern
        Parameters:
        bsAllEnes - all ene carbons
        bsPath - current path to loop into
        iLast - the last atom
        iAtom - this atom
        order - expected next order, alternating 2,1,2,1,...
        bsEneAtom1 - alternating atoms; first of double bond
        Returns:
        the atom number of the loop or -1 if failed
      • getAzacyclic

        private void getAzacyclic()
        Identify bridgehead nitrogens, as these may need to be given chirality designations. See AY-236.203 P-93.5.4.1 Sets a bit set of bridgehead nitrogens
      • addAzacyclicN

        private void addAzacyclicN​(int i)
      • couldBeChiralAtom

        boolean couldBeChiralAtom​(SimpleNode a)
        Determine whether an atom is one we need to consider.
        Parameters:
        a -
        Returns:
        true for selected atoms and hybridizations
      • couldBeChiralAlkene

        int couldBeChiralAlkene​(SimpleNode a,
                                SimpleEdge edge)
        Allow double bonds only if trivalent and first-row atom. (IUPAC 2013.P-93.2.4) Currently: a) first row b) doubly bonded c) doubly bonded atom is also first row
        Parameters:
        a -
        edge - optional bond
        Returns:
        STEREO_M, STEREO_Z, or UNDETERMINED
      • getTrigonality

        float getTrigonality​(SimpleNode a,
                             javajs.util.V3 vNorm)
        Determine the trigonality of an atom in order to determine whether it might have a lone pair. The global vector vNorm is returned as well, pointing from the atom to the base plane of its first three substituents.
        Parameters:
        a -
        vNorm - a vector returned with the normal from the atom to the base plane
        Returns:
        distance from plane of first three covalently bonded nodes to this node
      • getBondOrder

        int getBondOrder​(SimpleEdge bond)
      • setCoord

        boolean setCoord​(SimpleNode atom1,
                         CIPChirality.CIPAtom[] atoms)
        set the coordinate -- SMILES only
        Parameters:
        atom1 -
        atoms -
        Returns:
        true if coordinate is able to be set
      • checkHandedness

        int checkHandedness​(CIPChirality.CIPAtom a)
        Determine the ordered CIP winding of this atom. For this, we just take the directed normal through the plane containing the top three substituent atoms and dot that with the vector from any one of them to the fourth ligand (or the root atom if trigonal pyramidal). If this is positive, we have R.
        Parameters:
        a -
        Returns:
        1 for "R", 2 for "S"
      • getRootTrackerResult

        String getRootTrackerResult​(CIPChirality.CIPAtom root)
        CIPDataTracker only
        Parameters:
        root -
        Returns:
        string expression of decision path
      • setRule6Full

        public void setRule6Full​(boolean rrrr)