public virtual void Compute(Universe.Angle angle, Vector[] coords, ref double energy, ref Vector[] forces, ref MatrixByArr[,] hessian, double[,] pwfrc = null, double[,] pwspr = null) { double Ktheta = angle.Ktheta; double Theta0 = angle.Theta0; double Kub = angle.Kub; double S0 = angle.S0; Compute(coords, ref energy, ref forces, ref hessian, Ktheta, Theta0, Kub, S0, pwfrc, pwspr); }
public void Compute(Universe.Angle angle, Vector[] coords, ref double energy, ref Vector[] forces, ref MatrixByArr[,] hessian, double[,] pwfrc = null, double[,] pwspr = null) { double Ktheta = angle.Ktheta; Ktheta = sprcstRgdbdy; Ktheta = angle.Ktheta * scaleSpring; double Theta0 = angle.Theta0; double Kub = angle.Kub; double S0 = angle.S0; MindyAngle.Compute(coords, ref energy, ref forces, ref hessian, Ktheta, Theta0, Kub, S0, pwfrc, pwspr); }
public void BuildHess4PwIntrAct(Universe.AtomPack info, Vector[] coords, out Pair <int, int>[] pwidxs, out PwIntrActInfo[] pwhessinfos) { Universe.Angle angle = (Universe.Angle)info; double Ktheta = angle.Ktheta; double Theta0 = angle.Theta0; double Kub = angle.Kub; double S0 = angle.S0; Vector pos1 = coords[0]; // const Vector *pos1 = coords + angle->atom1; Vector pos2 = coords[1]; // const Vector *pos2 = coords + angle->atom2; Vector pos3 = coords[2]; // const Vector *pos3 = coords + angle->atom3; double a = (pos2 - pos1).Dist; double b = (pos3 - pos2).Dist; double c = (pos3 - pos1).Dist; ValueTuple <double, double> fij_kij = GetFijKij(a, b, c, Ktheta, Theta0); double fij = fij_kij.Item1; double kij = fij_kij.Item2; HDebug.Assert(coords.Length == 3); pwidxs = new Pair <int, int> [1]; pwidxs[0] = new Pair <int, int>(0, 2); pwhessinfos = new PwIntrActInfo[1]; pwhessinfos[0] = new PwIntrActInfo(kij, fij); }