public void ObtainNonPerfectCardinalBonds() { IAtom focus = Atom("C", 0, -0.40d, 3.37d); IAtom north = Atom("C", 0, -0.43d, 4.18d); IAtom east = Atom("O", 1, 0.44d, 3.33d); IAtom south = Atom("C", 2, -0.42d, 2.65d); IAtom west = Atom("H", 0, -1.21d, 3.36d); IBond[] expected = new IBond[] { new Bond(focus, north), new Bond(focus, east), new Bond(focus, south), new Bond(focus, west) }; IBond[] actual = FischerRecognition.CardinalBonds(focus, new IBond[] { expected[1], expected[2], expected[3], expected[0] } ); Assert.IsTrue(Compares.AreDeepEqual(actual, expected)); }
public void ObtainCardinalBonds() { IAtom focus = Atom("C", 0, 0.80d, 0.42d); IAtom north = Atom("C", 0, 0.80d, 1.24d); IAtom east = Atom("O", 1, 1.63d, 0.42d); IAtom south = Atom("C", 2, 0.80d, -0.41d); IAtom west = Atom("H", 0, -0.02d, 0.42d); IBond[] expected = new IBond[] { new Bond(focus, north), new Bond(focus, east), new Bond(focus, south), new Bond(focus, west) }; IBond[] actual = FischerRecognition.CardinalBonds(focus, new IBond[] { expected[1], expected[2], expected[3], expected[0] } ); Assert.IsTrue(Compares.AreDeepEqual(actual, expected)); }