public void GetVertexCount() { string acpString = "C0C1C2C3 0:1(1),1:2(1),2:3(1)"; BondRefinable bondRefinable = Refinable(acpString); Assert.AreEqual(3, bondRefinable.GetVertexCount()); }
public void GetBondPartitionTest() { string acpString = "C0C1C2C3O4 0:1(2),0:4(1),1:2(1),2:3(2),3:4(1)"; IAtomContainer ac = AtomContainerPrinter.FromString(acpString, builder); BondRefinable refinable = new BondRefinable(ac); Partition bondPartition = refinable.GetInitialPartition(); Partition expected = Partition.FromString("0,3|1,4|2"); Assert.AreEqual(expected, bondPartition); }
public void GetConnectivity() { string acpString = "C0C1C2C3 0:1(1),0:3(1),1:2(1),2:3(1)"; BondRefinable bondRefinable = Refinable(acpString); Assert.AreEqual(1, bondRefinable.GetConnectivity(0, 1)); Assert.AreEqual(1, bondRefinable.GetConnectivity(0, 2)); Assert.AreEqual(1, bondRefinable.GetConnectivity(1, 3)); Assert.AreEqual(1, bondRefinable.GetConnectivity(2, 3)); }
public void NeighboursInBlock() { string acpString = "C0C1C2C3 0:1(1),0:3(1),1:2(1),2:3(1)"; BondRefinable bondRefinable = Refinable(acpString); ISet <int> block = new HashSet <int>(); block.Add(1); block.Add(3); Assert.AreEqual(new IntegerInvariant(1), bondRefinable.NeighboursInBlock(block, 0)); Assert.AreEqual(new IntegerInvariant(1), bondRefinable.NeighboursInBlock(block, 2)); }