Example #1
0
        private void RemoveHydrogenConstraints(IndigoObject mol)
        {
            // all this typically < 0.1 msec
            List <int> HList = new List <int>();

            foreach (IndigoObject atom in mol.iterateAtoms())
            {
                atom.removeConstraints("hydrogens"); // critical !!
                if (atom.atomicNumber() == 1)
                {
                    HList.Add(atom.index());
                }
            }
            mol.removeAtoms(HList); // e.g. to make -n[H]- substructure of -n[C]-
        }