public void TestGetAtomicSoftness() { InductivePartialCharges ipc = new InductivePartialCharges(); double softness = ipc.GetAtomicSoftnessCore(mol, 0); Assert.Fail("Not validated - need known values"); }
public void TestGetPaulingElectronegativities() { InductivePartialCharges ipc = new InductivePartialCharges(); double[] eneg = ipc.GetPaulingElectronegativities(mol, true); long[] expected = { }; Assert.AreEqual(2.20, eneg[0], 0.01, "Error in C electronegativity"); Assert.AreEqual(3.28, eneg[1], 0.01, "Error in Cl electronegativity"); Assert.AreEqual(3.13, eneg[2], 0.01, "Error in Br electronegativity"); Assert.AreEqual(2.10, eneg[3], 0.01, "Error in H electronegativity"); Assert.AreEqual(3.20, eneg[4], 0.01, "Error in O electronegativity"); }
public void TestCalculateCharges_IAtomContainer() { double[] testResult = { 0.197, -0.492, 0.051, 0.099, 0.099 }; Vector3 c_coord = new Vector3(1.392, 0.0, 0.0); Vector3 f_coord = new Vector3(0.0, 0.0, 0.0); Vector3 h1_coord = new Vector3(1.7439615035767404, 1.0558845107302222, 0.0); Vector3 h2_coord = new Vector3(1.7439615035767404, -0.5279422553651107, 0.914422809754875); Vector3 h3_coord = new Vector3(1.7439615035767402, -0.5279422553651113, -0.9144228097548747); var mol = builder.NewAtomContainer(); // molecule is CF var c = builder.NewAtom("C"); mol.Atoms.Add(c); c.Point3D = c_coord; var f = builder.NewAtom("F"); mol.Atoms.Add(f); f.Point3D = f_coord; var h1 = builder.NewAtom("H"); mol.Atoms.Add(h1); h1.Point3D = h1_coord; var h2 = builder.NewAtom("H"); mol.Atoms.Add(h2); h2.Point3D = h2_coord; var h3 = builder.NewAtom("H"); mol.Atoms.Add(h3); h3.Point3D = h3_coord; mol.AddBond(mol.Atoms[0], mol.Atoms[1], BondOrder.Single); // 1 mol.AddBond(mol.Atoms[0], mol.Atoms[2], BondOrder.Single); // 1 mol.AddBond(mol.Atoms[0], mol.Atoms[3], BondOrder.Single); // 1 mol.AddBond(mol.Atoms[0], mol.Atoms[4], BondOrder.Single); // 1 InductivePartialCharges ipc = new InductivePartialCharges(); ipc.AssignInductivePartialCharges(mol); for (int i = 0; i < mol.Atoms.Count; i++) { Assert.AreEqual(testResult[i], (mol.Atoms[i].GetProperty <double>("InductivePartialCharge")), 0.1); //Debug.WriteLine("CHARGE AT " + ac.GetAtomAt(i).Symbol + " " + ac.GetAtomAt(i).GetProperty("MMFF94charge")); } }