mod/butadien/butadienCycleExclusion.py aktualisiert

This commit is contained in:
2026-08-13 15:06:10 +02:00
parent 9d434d4023
commit 456ded8d2f
+7 -6
View File
@@ -110,16 +110,17 @@ dielsalder = Rule.fromGMLString(
]"""
)
#MCB? horton vs DePina, einfach Depth first ob nach vier cyclus
def cyclesizes(g):
nxGraph = GraphObj(g).nx_graph
#Chein restrictions: (No steric reason)
paths = sorted(list(nx.all_simple_paths(nxGraph)))
if max(paths > 12):
return True
#Cycle restrictions:
cycles = sorted(list(nx.chordless_cycles(nxGraph)))
cycle_lengths = [len(x) for x in cycles]
#Find all cycles and list their sizes
#Only for C
#Chordless, elemenatary
#Is there a inbuild way to ignore all H?
#
if cycles == []:
return False
#One Atom can't be in four different cycles