public static OBMol obminimizeUFF(OBMol mol, double crit, int steps)
        {
            bool   sd        = false;
            bool   cut       = false;
            bool   newton    = false;
            bool   hydrogens = true;
            double rvdw      = 6.0;
            double rele      = 10.0;
            int    freq      = 10;
            //var watch = Stopwatch.StartNew();
            OBForceField ff = OBForceField.FindForceField("UFF");

            //watch.Stop();
            //watch.Start();
            ff.Setup(mol);
            ff.SetVDWCutOff(rvdw);
            ff.SetElectrostaticCutOff(rele);
            ff.SetUpdateFrequency(freq);
            ff.EnableCutOff(cut);
            ff.ConjugateGradientsInitialize(steps, crit);
            bool done = true;

            while (done)
            {
                done = ff.ConjugateGradientsTakeNSteps(1);
                //ff.GetCoordinates(mol);
            }

            ff.GetCoordinates(mol);
            //watch.Stop();//doesn't look like there is much I can do to optimize this, energy minimization just takes time
            return(mol);
        }