public int Minimize_ConjugateGradient(List <ForceField.IForceField> frcflds
                                              , string logpath           = ""
                                              , int iterInitial          = 0
                                              , double?k                 = null
                                              , int?max_iteration        = null
                                              , double max_atom_movement = 0.1
                                              , double threshold         = 0.001
                                              , int randomPurturb        = 0
                                              , bool[] atomsMovable      = null
                                              , InfoPack extra           = null
                                              )
        {
            IMinimizeLogger logger = new MinimizeLogger_PrintEnergyForceMag(logpath);

            return(Minimize_ConjugateGradient_v1(iterInitial, frcflds, k, max_atom_movement, max_iteration, threshold, randomPurturb, atomsMovable, logger, extra, null));
        }
Ejemplo n.º 2
0
        public int MinimizeHydrogens(List <ForceField.IForceField> frcflds
                                     , string logpath = ""
                                     , InfoPack extra = null
                                     )
        {
            bool[] atomsMovable = new bool[size];
            for (int i = 0; i < size; i++)
            {
                atomsMovable[i] = atoms[i].IsHydrogen();
            }

            double          k                 = 0.001;
            double          threshold         = 0.001;
            double          max_atom_movement = 0.1;
            IMinimizeLogger logger            = new MinimizeLogger_PrintEnergyForceMag(logpath); // null
            int             randomPurturb     = 0;                                               // no random purturbation

            return(Minimize_ConjugateGradient_v1(0, frcflds, k, max_atom_movement, null, threshold, randomPurturb, atomsMovable, logger, extra, null));
        }