Skip to content

Commit

Permalink
Added the maximumFusedRings species constraint
Browse files Browse the repository at this point in the history
  • Loading branch information
alongd committed Feb 24, 2024
1 parent c732708 commit 7968f19
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions rmgpy/constraints.py
Expand Up @@ -141,4 +141,9 @@ def fails_species_constraints(species):
if struct.get_singlet_carbene_count() > 0 and struct.get_radical_count() > max_carbene_radicals:
return True

max_fused_rings = species_constraints.get('maximumFusedRings', -1)
if max_fused_rings != -1 and struct.is_cyclic():
if struct.get_ring_count_in_largest_fused_ring_system() > max_fused_rings:
return True

return False
1 change: 1 addition & 0 deletions rmgpy/rmg/input.py
Expand Up @@ -1379,6 +1379,7 @@ def generated_species_constraints(**kwargs):
'maximumRadicalElectrons',
'maximumSingletCarbenes',
'maximumCarbeneRadicals',
'maximumFusedRings',
'allowSingletO2',
'speciesCuttingThreshold',
]
Expand Down

0 comments on commit 7968f19

Please sign in to comment.