Skip to content

Commit

Permalink
Tests: Molecule.get_ring_count_in_largest_fused_ring_system()
Browse files Browse the repository at this point in the history
  • Loading branch information
alongd committed Feb 24, 2024
1 parent 7f360a8 commit fabe9af
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/rmgpy/molecule/moleculeTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit fabe9af

Please sign in to comment.