Ejemplo n.º 1
0
            public virtual void Compute(Universe.Bond bond, Vector[] coords, ref double energy, ref Vector[] forces, ref MatrixByArr[,] hessian, double[,] pwfrc = null, double[,] pwspr = null)
            {
                double Kb = bond.Kb;
                double b0 = bond.b0;

                Compute(coords, ref energy, ref forces, ref hessian, Kb, b0, pwfrc, pwspr);
            }
Ejemplo n.º 2
0
            public void Compute(Universe.Bond bond, Vector[] coords, ref double energy, ref Vector[] forces, ref MatrixByArr[,] hessian, double[,] pwfrc = null, double[,] pwspr = null)
            {
                double Kb = bond.Kb;

                Kb = sprcstRgdbdy;
                Kb = bond.Kb * scaleSpring;
                double b0 = bond.b0;

                MindyBond.Compute(coords, ref energy, ref forces, ref hessian, Kb, b0, pwfrc, pwspr);
            }
Ejemplo n.º 3
0
            public void BuildHess4PwIntrAct(Universe.AtomPack info, Vector[] coords, out Pair <int, int>[] pwidxs, out PwIntrActInfo[] pwhessinfos)
            {
                Universe.Bond bond = (Universe.Bond)info;
                double        Kb   = bond.Kb;
                double        b0   = bond.b0;

                HDebug.Assert(coords.Length == 2);
                Vector pos1 = coords[0];
                Vector pos2 = coords[1];
                Vector r12  = pos1 - pos2;
                double r    = r12.Dist;

                double kij = 2 * Kb;
                double fij = (2 * Kb) * (r - b0);

                pwidxs         = new Pair <int, int> [1];
                pwidxs[0]      = new Pair <int, int>(0, 1);
                pwhessinfos    = new PwIntrActInfo[1];
                pwhessinfos[0] = new PwIntrActInfo(kij, fij);
            }