Esempio n. 1
0
def test_isomorphism__r():
    mol = Molecule().from_adjacency_list("""
    1 C u0 p0 c0
    """, saturate_h=True)

    gp = Group().from_adjacency_list("""
    1 R u0 p0 c0
    """)

    assert_true(len(mol.find_subgraph_isomorphisms(gp)) > 0)
Esempio n. 2
0
def test_isomorphism_mol_group_not_identical():
    """
    Testing multiplicities in mol and group that don't match
    """
    mol = Molecule().from_adjacency_list("""
    1 C u0 p0 c0
    """, saturate_h=True)

    gp = Group().from_adjacency_list("""
    multiplicity [2]
    1 R u0 p0 c0
    """)
    assert_false(mol.is_subgraph_isomorphic(gp))
    assert_false(len(mol.find_subgraph_isomorphisms(gp)) > 0)