-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get lattice parameters of MOF #483
Comments
Hello and welcome! So, it is possible to do what you want to do, see However, the code you sent is constructing an M2L4 metal-organic cage, not a MOF. Cages are not periodic structures and, therefore, what you are trying to do here is not appropriate. You need to construct a molecule using a periodic topology graph, not all topology graphs are periodic. If you can clarify what you would like to construct, we can help you further. |
Thanks I'll read that. I would like to build a Metal Organic Framework and get the lattice info as well as the .xyz structure so I can create a pymatgen structure object out of it. I don't have a specific topology in mind; I would like to be able to do this for any of the common MOF topologies. |
I've had a closer look but I don't know how to build a MOF sorry. The metal organic cage topologies are non periodic, but the COF topologies don't have metals and look to all be 2D. Should I build a custom MOF topology? The documentation on adding topologies doesn't mention periodicity but I guess I can combine the code for a metal organic cage with the periodicity of a COF? Thanks |
So, stk does not have any limitations in terms of what building block you place on a topology graph, in terms of chemistry. You can place a metal atom in a COF topology, the same way you do for a MOC topology. See here for an example of my placing cages in a COF topology to make a polymer of MOCs: https://github.com/andrewtarzia/stk-examples/blob/main/polymerised_mocs/ligand_connected.py But, your other point is correct - stk does not currently have 3D MOFs. We have not really given it a full go yet to implement the appropriate rotations/alignments required for MOF generation - but the issue is discussed #204 #421 - Therefore, depending on what topology you intend on building, you will need to implement a custom topology graph, which we are happy to help with if you come across issues. |
Thanks, I'll have a go. |
I would like to generate a MOF and then write this to a cif file. so I can pass it into mofdescribe (the features I want to calculate require the unit cell info). To do this I need info on the periodicity but I don't know how to get this. I generate a MOF using your example code:
Produce a Pd+2 atom with 4 functional groups.
palladium_atom = stk.BuildingBlock(
smiles='[Pd+2]',
functional_groups=(
stk.SingleAtom(stk.Pd(0, charge=2))
for i in range(4)
),
position_matrix=[[0., 0., 0.]],
)
Build a building block with two functional groups using
the SmartsFunctionalGroupFactory.
bb1 = stk.BuildingBlock(
smiles=(
'C1=NC=CC(C2=CC=CC(C3=C'
'C=NC=C3)=C2)=C1'
),
functional_groups=[
stk.SmartsFunctionalGroupFactory(
smarts='[#6]
[#7X2][#6]',bonders=(1, ),
deleters=(),
),
],
)
cage1 = stk.ConstructedMolecule(
stk.cage.M2L4Lantern(
building_blocks=(palladium_atom, bb1),
# Ensure that bonds between the
# GenericFunctionalGroups of the ligand and the
# SingleAtom functional groups of the metal are
# dative.
reaction_factory=stk.DativeReactionFactory(
stk.GenericReactionFactory(
bond_orders={
frozenset({
stk.GenericFunctionalGroup,
stk.SingleAtom,
}): 9,
},
),
),
),
)
stk.MolWriter().write(cage1, "test.xyz")
If I understand correctly, it should be possible to get the lattice parameters from this, because I specify a topology when building the MOF, but I don't know how to do it. Maybe the directions of the lattice vectors and their relative lengths, and the angles, are known for each topology, then I can measure the size of the molecule to scale the lattice vectors? I would optimise the structure first. It seems like the organic cage building option gives lattice parameters.
I've read the docs but not found the answer sorry.
The text was updated successfully, but these errors were encountered: