From fabe9af5f47c6f73565628f997c1b5306282dadc Mon Sep 17 00:00:00 2001 From: Alon Grinberg Dana Date: Wed, 7 Feb 2024 12:54:50 +0200 Subject: [PATCH] Tests: Molecule.get_ring_count_in_largest_fused_ring_system() --- test/rmgpy/molecule/moleculeTest.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/rmgpy/molecule/moleculeTest.py b/test/rmgpy/molecule/moleculeTest.py index 33e75dec58d..e2801d7fc9f 100644 --- a/test/rmgpy/molecule/moleculeTest.py +++ b/test/rmgpy/molecule/moleculeTest.py @@ -2956,3 +2956,14 @@ def test_remove_van_der_waals_bonds(self): assert len(mol.get_all_edges()) == 2 mol.remove_van_der_waals_bonds() assert len(mol.get_all_edges()) == 1 + + def test_get_ring_count_in_largest_fused_ring_system(self): + """Test that we can count the rings in the largest fused ring system.""" + mol = Molecule(smiles="CCCC") + assert mol.get_ring_count_in_largest_fused_ring_system() == 0 + mol = Molecule(smiles="c1ccccc1") + assert mol.get_ring_count_in_largest_fused_ring_system() == 1 + mol = Molecule(smiles="c12ccccc1cccc2") + assert mol.get_ring_count_in_largest_fused_ring_system() == 2 + mol = Molecule(smiles="C[C]1C2C(=O)C3CC4C(=O)C=C2CC143") + assert mol.get_ring_count_in_largest_fused_ring_system() == 4