Skip to content

Commit 89486d1

Browse files
committed
Added the maximumFusedRings species constraint
1 parent b835b10 commit 89486d1

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

rmgpy/constraints.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,4 +141,9 @@ def fails_species_constraints(species):
141141
if struct.get_singlet_carbene_count() > 0 and struct.get_radical_count() > max_carbene_radicals:
142142
return True
143143

144+
max_fused_rings = species_constraints.get('maximumFusedRings', -1)
145+
if max_fused_rings != -1 and struct.is_cyclic():
146+
if struct.get_ring_count_in_largest_fused_ring_system() > max_fused_rings:
147+
return True
148+
144149
return False

rmgpy/rmg/input.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1415,6 +1415,7 @@ def generated_species_constraints(**kwargs):
14151415
'maximumRadicalElectrons',
14161416
'maximumSingletCarbenes',
14171417
'maximumCarbeneRadicals',
1418+
'maximumFusedRings',
14181419
'allowSingletO2',
14191420
'speciesCuttingThreshold',
14201421
]

0 commit comments

Comments
 (0)