Пример #1
0
 def testAdjacencyList(self):
     """
     Check the adjacency list read/write functions for a full molecule.
     """
     molecule1 = Molecule().fromAdjacencyList("""
     1 C 0       {2,D}
     2 C 0 {1,D} {3,S}
     3 C 0 {2,S} {4,D}
     4 C 0 {3,D} {5,S}
     5 C 1 {4,S} {6,S}
     6 C 0 {5,S}
     """)
     molecule2 = Molecule().fromSMILES('C=CC=C[CH]C')
     molecule1.toAdjacencyList()
     molecule2.toAdjacencyList()
     self.assertTrue(molecule1.isIsomorphic(molecule2))
     self.assertTrue(molecule2.isIsomorphic(molecule1))