public void TestCalculate_RDFWeightFunction() { RDFCalculator calculator = new RDFCalculator(0.0, 5.0, 0.1, 0.0, Returns1); AtomContainer h2mol = new AtomContainer(); Atom h1 = new Atom("H") { Point3D = new Vector3(-0.5, 0.0, 0.0) }; Atom h2 = new Atom("H") { Point3D = new Vector3(0.5, 0.0, 0.0) }; h2mol.Atoms.Add(h1); h2mol.Atoms.Add(h2); double[] rdf1 = calculator.Calculate(h2mol, h1); double[] rdf2 = calculator.Calculate(h2mol, h2); // test whether the double array length is ok Assert.AreEqual(51, rdf1.Length); // test whether the RDFs are identical Assert.AreEqual(rdf1.Length, rdf2.Length); for (int i = 0; i < rdf1.Length; i++) { Assert.AreEqual(rdf1[i], rdf2[i], 0.00001); } }
public void TestRDFCalculator_double_double_double_double_RDFWeightFunction() { RDFCalculator calculator = new RDFCalculator(0.0, 5.0, 0.1, 0.0, Returns1); Assert.IsNotNull(calculator); }
public void TestRDFCalculator_double_double_double_double() { RDFCalculator calculator = new RDFCalculator(0.0, 5.0, 0.1, 0.0); Assert.IsNotNull(calculator); }