Replies: 1 comment 20 replies
-
Hi there, For "High-throughput discovery of organic cages and catenanes using computational screening fused with robotic synthesis" I'm not an author on that paper, so I'm afraid the support I can give you is limited, I suggest you get in touch with the corresponding authors of that work. I will also note that the paper likely used an older version of stk, so there is a decent chance that whatever script was used to produce the results of that work would not work with the lastest version of stk. However, I am happy to give you support as far as I can. In https://stk.readthedocs.io/en/latest/stk.ea.mutation.mutators.molecule.random_topology_graph.html, there is typo in the docs, Try the following code (EDIT: I've edited this so that the snippet actually works, the original snippet I posted had inappropriate aldehyde smiles) import stk
# Create a molecule which is to be mutated.
bb1 = stk.BuildingBlock('NCCN', [stk.PrimaryAminoFactory()])
bb2 = stk.BuildingBlock(
smiles='O=CCC(C=O)CC=O',
functional_groups=[stk.AldehydeFactory()],
)
cage = stk.MoleculeRecord(
topology_graph=stk.cage.FourPlusSix((bb1, bb2)),
)
# Create functions which replace the topology graph.
replacement_funcs = (
lambda graph:
stk.cage.TwoPlusThree(graph.get_building_blocks()),
lambda graph:
stk.cage.EightPlusTwelve(graph.get_building_blocks()),
lambda graph:
stk.cage.TwentyPlusThirty(graph.get_building_blocks()),
)
# Create the mutator.
random_topology = stk.RandomTopologyGraph(
replacement_funcs=replacement_funcs,
random_seed=21,
)
# Mutate a molecule.
mutation_record1 = random_topology.mutate(cage)
# Mutate the molecule a second time.
mutation_record2 = random_topology.mutate(cage) |
Beta Was this translation helpful? Give feedback.
-
I want to reproduce the results in Figure 7 and 11 from "An evolutionary algorithm for the discovery of porous organic cages" and Figure 5 from "High-throughput discovery of organic cages and catenanes using computational screening fused with robotic synthesis", but I am unable at all! and it is like I have been trying to reproduce it for 1 week.
For the preinitial step, I got no problem installing stk codes and its prerequisites like I can produce the polymer.mol, view it in my ChemDraw, and reproduce the figure like in Docs (copy paste the code from https://stk.readthedocs.io/en/latest/construction_overview.html, put the code in text editor, and run it in Terminal).
Then, I tried to do the same for the code in https://stk.readthedocs.io/en/latest/stk.ea.mutation.mutators.molecule.random_topology_graph.html and Voila! This is what I got:
File "yourmutation.py", line 14
replacement_funcs = (
^
SynthaxError: invalid syntax
So, where is the full real script for the cage enumeration? Your example script in Docs doesn’t give any insight to reproduce the results in those papers for broad audiences.
Beta Was this translation helpful? Give feedback.
All reactions