Carboxylic-based Metal-organic cage #385
-
Hi! Best regards |
Beta Was this translation helpful? Give feedback.
Replies: 12 comments 8 replies
-
Hello! Welcome and thank you! If I understand correctly, you want to build an stk.metal_complex.Paddlewheel structure - below is an example code to do that. Let me know if that helps? The SmartsFunctionalGroupFactory is used to afford the specificity seen below - you want two functional groups (one per oxygen atom) in the caborxylic acid -- not one FG from the entire caborxylic acid. In the example below, I finally turn the constructed complex into a BB with bromo functional groups for further reaction, as I think you requested, for cage formation. import stk
cu_atom = stk.BuildingBlock(
smiles='[Cu+2]',
functional_groups=(
stk.SingleAtom(stk.Cu(0, charge=2))
for i in range(4)
),
position_matrix=([0, 0, 0], ),
)
bi_1 = stk.BuildingBlock(
smiles='O=C(O)c1ccc(Br)cc1',
functional_groups=[
stk.SmartsFunctionalGroupFactory(
smarts='[#6]~[#8]~[#1]',
bonders=(1, ),
deleters=(2, ),
),
stk.SmartsFunctionalGroupFactory(
smarts='[#6]~[#8X1]',
bonders=(1, ),
deleters=(),
),
]
)
mcomplex = stk.ConstructedMolecule(
stk.metal_complex.Paddlewheel(
metals=cu_atom,
ligands=bi_1,
reaction_factory=stk.DativeReactionFactory(
stk.GenericReactionFactory(
bond_orders={
frozenset({
stk.GenericFunctionalGroup,
stk.SingleAtom,
}): 9,
},
),
),
)
)
mcomplex.write('test.mol')
# Turn into BB for next reaction.
complex_bb = stk.BuildingBlock.init_from_molecule(mcomplex, (stk.BromoFactory(), )) |
Beta Was this translation helpful? Give feedback.
-
Yes, it helps a lot, I could built my cuboctahedral cage by sligthly modifying the complex to match with the spacer. I also run MC Hammer optimization, which give a pretty decent result. I found the cage structure to be closer to the crystalographic structure when replacing C(=O)(O)Br by C(O)(O)Br (even if i got of course an extra hydrogen on the C). I am a beginner with Python but I could understand the general concept of how it works thanks to your tutorials. cu_atom = stk.BuildingBlock(
smiles='[Cu+2]',
functional_groups=(
stk.SingleAtom(stk.Cu(0, charge=2))
for i in range(4)
),
position_matrix=([0, 0, 0], ),
)
bi_1 = stk.BuildingBlock(
smiles='C(=O)(O)Br',
functional_groups=[
stk.SmartsFunctionalGroupFactory(
smarts='[#6]~[#8]~[#1]',
bonders=(1, ),
deleters=(2, ),
),
stk.SmartsFunctionalGroupFactory(
smarts='[#6]~[#8X1]',
bonders=(1, ),
deleters=(),
),
]
)
mcomplex = stk.ConstructedMolecule(
stk.metal_complex.Paddlewheel(
metals=cu_atom,
ligands=bi_1,
reaction_factory=stk.DativeReactionFactory(
stk.GenericReactionFactory(
bond_orders={
frozenset({
stk.GenericFunctionalGroup,
stk.SingleAtom,
}): 9,
},
),
),
optimizer=stk.MCHammer(),
)
)
show_stk_mol(mcomplex)
# Turn into BB for next reaction.
complex_bb = stk.BuildingBlock.init_from_molecule(mcomplex, (stk.BromoFactory(), ))
# Define spacer building block.
bb3 = stk.BuildingBlock(
smiles=(
'C1=CC(=CC(=C1)Br)Br'
),
functional_groups=[stk.BromoFactory()],
)
# Build an M12L24 with a spacer.
cage1 = stk.ConstructedMolecule(
stk.cage.M12L24(
building_blocks=(
complex_bb,
bb3,
),
optimizer=stk.MCHammer(),
)
)
show_stk_mol(bb3)
show_stk_mol(cage1) |
Beta Was this translation helpful? Give feedback.
-
Hey Alex, Thank you! Glad it helped. MCHammer is meant to be a very crude optimisation, but I am glad it gets to the right point. Note that you should encompass the code in ``` to properly show your code blocks in comments. Are you happy for us to close this issue? @lukasturcani Additionally, on the main page is a link to a discord, where you can chat to us further as you use stk in your research - we can help you get it going for sure! |
Beta Was this translation helpful? Give feedback.
-
I forgot to mention, if the structure with the appropriate chemistry (C=O(O) instead of CO(O)) is less close to the crystal structure, I would suggest looking into further optimisation with gfn xtb (https://xtb-docs.readthedocs.io/en/latest/contents.html) which is quite good for these structures and is accessible with our package stko (https://github.com/JelfsMaterialsGroup/stko) once you have downloaded the xtb binary. |
Beta Was this translation helpful? Give feedback.
-
Yes you can close this issue. I was starting to read about stko and the different possibility for the optimization of the structure. Thanks again for your help! |
Beta Was this translation helpful? Give feedback.
-
Is not GULP more adapted as the cage contain a metal? |
Beta Was this translation helpful? Give feedback.
-
GULP and xTB can handle metals. I suggest xTB first because it is a better method for a similar cost. However, it may fail when atoms are initially in high energy states because it does not have the bonding information. Therefore, it may be best to use gulp first, then use xtb. It really depends on what the structure is to be used for, but the following sequence has worked for me in the past:
All of the above can be done in stko but is quite costly. You might want to just do steps 1, 2 and 5. |
Beta Was this translation helpful? Give feedback.
-
Also moving this into discussions. |
Beta Was this translation helpful? Give feedback.
-
Hi! Thanks for the advice. I try to run UFF/Gulp as the example given in github
But I got the following error message and don't know how to solve the problem
Any ideas on how to solve the problem? |
Beta Was this translation helpful? Give feedback.
-
Thanks again for your quick answer
|
Beta Was this translation helpful? Give feedback.
-
Sorry, but I am not sure how to do this |
Beta Was this translation helpful? Give feedback.
-
I downloaded the source code of the version 5.1. However, there is no executable folder in the master folder |
Beta Was this translation helpful? Give feedback.
Hello!
Welcome and thank you!
If I understand correctly, you want to build an stk.metal_complex.Paddlewheel structure - below is an example code to do that. Let me know if that helps?
The SmartsFunctionalGroupFactory is used to afford the specificity seen below - you want two functional groups (one per oxygen atom) in the caborxylic acid -- not one FG from the entire caborxylic acid.
In the example below, I finally turn the constructed complex into a BB with bromo functional groups for further reaction, as I think you requested, for cage formation.