public static HessInfo GetHessSsNMA (Universe univ , IList <Vector> coords , IEnumerable <Universe.Bond> bonds , IEnumerable <Universe.Angle> angles , IEnumerable <Universe.Improper> impropers , IEnumerable <Universe.Dihedral> dihedrals , IEnumerable <Universe.Nonbonded> nonbondeds , IEnumerable <Universe.Nonbonded14> nonbonded14s , double?maxAbsSpring = null , double?K_r = 340.00 , double?K_theta = 45.00 , double?K_ub = 10.00 , double?K_psi = 70.00 , double?K_chi = 1.00 , double?n = 1 , string k_vdW = "Unif" //, bool setNanForEmptyAtom // =true ) { bool vdW = true; // use vdW bool elec = false; // ignore electrostatic double D = double.PositiveInfinity; // dielectric constant for Tinker is "1" bool ignNegSpr = true; // ignore negative spring (do not add the spring into hessian matrix) //maxAbsSpring = Math.Pow(10, 9); HessMatrix hess = null; hess = STeM.GetHessBond(coords, bonds, K_r, hessian: hess); hess = STeM.GetHessAngle(coords, angles, true, K_theta, K_ub, hessian: hess); hess = STeM.GetHessImproper(coords, impropers, K_psi, hessian: hess, useArnaud96: true); hess = STeM.GetHessDihedral(coords, dihedrals, K_chi, n, hessian: hess, useAbsSpr: true, useArnaud96: true); hess = HessSpr.GetHessNonbond(coords, nonbondeds, D, k_vdW, hessian: hess, vdW: vdW, elec: elec, ignNegSpr: ignNegSpr, maxAbsSpring: maxAbsSpring); hess = HessSpr.GetHessNonbond(coords, nonbonded14s, D, k_vdW, hessian: hess, vdW: vdW, elec: elec, ignNegSpr: ignNegSpr, maxAbsSpring: maxAbsSpring); //if(setNanForEmptyAtom) Hess.UpdateHessNaN(hess, coords); return(new HessInfo { hess = hess, mass = univ.GetMasses(), atoms = univ.atoms.ToArray(), coords = coords.HCloneVectors().ToArray(), numZeroEigval = 6, }); }
public static HessInfo GetHessEAnm (Universe univ , IList <Vector> coords , IEnumerable <Tuple <int, int, double> > enumKij , bool b_bonds , bool b_angles , bool b_impropers , bool b_dihedrals ) { //bool vdW = true; // use vdW //bool elec = false; // ignore electrostatic //double D = double.PositiveInfinity; // dielectric constant for Tinker is "1" //bool ignNegSpr = true; // ignore negative spring (do not add the spring into hessian matrix) HessMatrix hess = null; hess = Hess.GetHessAnm(coords, enumKij); if (b_bonds) { hess = STeM.GetHessBond(coords, univ.bonds, 340.00, hessian: hess); } if (b_angles) { hess = STeM.GetHessAngle(coords, univ.angles, true, 45.00, 10.00, hessian: hess); } if (b_impropers) { hess = STeM.GetHessImproper(coords, univ.impropers, 70.00, hessian: hess, useArnaud96: true); } if (b_dihedrals) { hess = STeM.GetHessDihedral(coords, univ.dihedrals, 1.00, 1, hessian: hess, useAbsSpr: true, useArnaud96: true); } Hess.UpdateHessNaN(hess, coords); return(new HessInfo { hess = hess, mass = univ.GetMasses(), atoms = univ.atoms.ToArray(), coords = coords.HCloneVectors().ToArray(), numZeroEigval = 6, }); }
public static void UpdateHessNaN(HessMatrix hess, IList <Vector> coords) { int[] idxNaN = coords.HIndexOfNull(); Hess.UpdateHessNaN(hess, idxNaN); }