---------
        Balaban, Theor Chem Acc
        doi: 10.1007/BF00555695

        """
        matrix = GetAdjacencyMatrix(self.mol)
        M = sum(matrix.sum(axis=1) ** 2)
        N = self.mol.GetNumAtoms()
        Q1Index = 3 - 2 * N + M / 2
        return Q1Index

    def CalculateAR(self):
        """check the presence of an aromatic or heteroaromatic ring

        Returns
        -------
        AR : int, 0 or 1
            the presence of an aromatic or heteroaromatic ring (0 or 1)
        """
        smarts = "a"
        AR = bool(self._MolMatchSmarts(self.mol, smarts))
        AR = int(AR)
        return AR

    def CalculateNAR(self):
        """check the presence of an aliphatic or a heteroaliphatic ring

        Returns
        -------
        NAR : int, 0 or 1
            the presence of an aliphatic or a heteroaliphatic ring
        """
        smarts = "[A;R]"
        NAR = bool(self._MolMatchSmarts(self.mol, smarts))
        NAR = int(NAR)
        return NAR

    def CalculateCHIRAL(self):
        """check the presence of a chiral center (0 or 1)

        Returns
        -------
        CHIRAL : int, 0 or 1
            the presence of a chiral center (0 or 1)
        """
        CHIRAL = (Chem.CalcNumAtomStereoCenters(self.mol)) > 0
        CHIRAL = int(CHIRAL)
        return CHIRAL

    def CalculateSPIRO(self):
        """check the presence of a spiro center (0 or 1)

        Returns
        -------
        SPIRO : int, 0 or 1
            the presence of a spiro center (0 or 1)
        """
        SPIRO = CalcNumSpiroAtoms(self.mol) > 0
        SPIRO = int(SPIRO)
        return SPIRO

    def CalculateSP3(self):
        """calculate the portion of sp3-hybridized carbon atoms (from 0 to 1)

        Returns
        -------
        sp3 : float, from 0 to 1
            the portion of sp3-hybridized carbon atoms (from 0 to 1)
        """
        smarts = "[CX4]"
        sp3 = len(self._MolMatchSmarts(self.mol, smarts))
        sp3 = sp3/self.nC
        return sp3

    def CalculateCyc(self):
        """calculate the portion of cyclic carbons that 
        are sp3 hybridized (from 0 to 1)

        Returns
        -------
        Cyc : float, from 0 to 1
            the portion of cyclic carbons that are sp3 hybridized (from 0 to 1)
        """
        smarts = "[CX4;R]"
        Cyc = len(self._MolMatchSmarts(self.mol, smarts))
        Cyc = Cyc/self.nC
        return Cyc

    def CalculateAcyc(self):
        """calculate the portion of acyclic carbon atoms that are sp3 hybridized (from 0 to 1)

        Returns
        -------
        Acyc : float, from 0 to 1
            the portion of acyclic carbon atoms that are sp3 hybridized (from 0 to 1)
        """
        smarts = "[CX4;R0]"
        Acyc = len(self._MolMatchSmarts(self.mol, smarts))
        Acyc = Acyc/self.nC
        return Acyc
    
    def CalculateMCE18(self):
        
        AR = self.CalculateAR()
        NAR = self.CalculateNAR()
        CHIRAL = self.CalculateCHIRAL()
        SPIRO = self.CalculateSPIRO()
        sp3 = self.CalculateSP3()
        Cyc = self.CalculateCyc()
        Acyc = self.CalculateAcyc()
        Q1 = self.CalculateQ1Index()

        part1 = AR + NAR + CHIRAL + SPIRO
        part2 = sp3 + Cyc - Acyc
        part3= 1 + sp3
        part4 = part1 + (part2 / part3)
        mce = part4 * Q1
        
        return mce



if "__main__" == __name__:

    # smiles = "C1NCCN(C2=CC3N(CC)C=C(C(=O)O)C(=O)C=3C=C2F)C1"
    smiles = "C1=CC(C(CC)(C/C=C/C2=CC=CC=C2)N(C)CC2CC2)=CC=C1"
    mol = Chem.MolFromSmiles(smiles)
    # mol = Chem.AddHs(mol)

    demo = MCE18(mol)

    print("DONE")
GDC 2012 Day 2: Tactical Intervention
By Darren Henderson (DizzyPW), OnRPG Editor-in-Chief
GDC 2012 was filled with quite a few surprises. One of the most notable ones though came from the OG Planet nestled in the Korea booth towards the back of the main hall. 2012 seems like a popular year for releasing F2P online FPS games so I was a bit skeptical when I heard OG Planet was throwing their hand into the ring as well with Tactical Intervention. I have to say though after watching 20 minutes of gameplay, I think this game might be able to go the distance.
Maps and Modes
The majority of the maps take place in modern western urban environments. The main idea is the same as Counterstrike; the terrorists are up to no good and the counter terrorist group needs to put them in their place. A simple concept but when combined with the awesome looking game modes OG Planet has in store it really comes together well.
The first game mode I came across is a crowded mall filled with hostages running around everywhere that you are penalized for killing. Players will be able to hide inside convenience stores and storage closets, or within the shirt racks of major shopping centers to get the jump on their competition.
The next mode takes a step outside the box and actually has the counter terrorist group escorting a diplomat carrying an important briefcase full of information. The terrorists must eliminate this threat before the time limit is reached in order to succeed. This mode takes place on a crowded freeway and players will be forced to drive the diplomat to safety as terrorists and counter terrorists alike hijack cars and do all they can to prevent each other from reaching their goal. It gets really wild when you bring in the helicopter and start raining bullets from the sky as cars explode left and right.
The third game mode they had on display was still in the very earliest stages of design but looked like a hell of a lot of fun. The terrorists have a car bomb that they must drive under a moving airplane taking off from a runway while the counter terrorists attempt to stop them. Players will have to drive their vehicles maneuvering around fast moving aircraft while having a high speed shoot out with each other. It’s really something you have to see to believe.
The Environment and Realism
While the game modes might seem new and refreshing, the high production value of the game carries over well into the detail they put into designing the game’s environments. If you shoot into a line of shirts hanging on a wall, you’ll actually see the fabric get torn up by bullets. If you shoot the windows of a moving car they will explode glass everywhere. If you shoot out the tires, the car will lose control, and players will have to get out and change the tire before the car is operational again. Heck if you’re a crack shot and can deliver a series of shots to the gas tank, the entire vehicle will explode.
The environment isn’t just there to react to the player but also as a tool to help you through certain situations. For instance, one of the weapons shown during the demo was a fire flash grenade that can set a part of the map ablaze with intense high reaching flames for a few moments. This is ideal for cutting off an opponent’s escape or buying time for your team to regroup. But a crafty player with a sharp eye can grab a fire extinguisher off the wall and put out the flames early!
Players will also be able to use other environment props like riot police shields to tank heavy fire while providing cover for the rest of their team to infiltrate a room. And when you no longer need to provide cover you can throw the shield as a projectile at an enemy combatant to disorient them while you open fire. Another way to use the environment is as a weapon! Say your foes are hunkered down inside a room camping your team and it’s suicide to merely open the door and walk into their hold out? Simply place an explosive on the door and watch as the door is blown off its hing