/// <summary> /// Create a pharmacophore group. /// </summary> /// <param name="pharmacophoreAtom">A previously created pharmacophore group</param> public PharmacophoreAtom(PharmacophoreAtom pharmacophoreAtom) { Smarts = pharmacophoreAtom.Smarts; this.Symbol = pharmacophoreAtom.Symbol; Point3D = pharmacophoreAtom.Point3D; if (pharmacophoreAtom.GetMatchingAtoms() != null) { var indices = pharmacophoreAtom.GetMatchingAtoms(); matchingAtoms = new int[indices.Length]; Array.Copy(indices, 0, matchingAtoms, 0, indices.Length); } }
public void TestMatchingAtoms() { PharmacophoreAtom patom = new PharmacophoreAtom("[CX2]N", "Amine", Vector3.Zero); patom.SetMatchingAtoms(new int[] { 1, 4, 5 }); int[] indices = patom.GetMatchingAtoms(); Assert.AreEqual(1, indices[0]); Assert.AreEqual(4, indices[1]); Assert.AreEqual(5, indices[2]); }