Blogger doesn't allow you to upload pdf files, so the picture above really doesn't do the corresponding pdf file justice.
This work is licensed under a Creative Commons Attribution 4.0
Blogger doesn't allow you to upload pdf files, so the picture above really doesn't do the corresponding pdf file justice.
Reaction SMARTS is an RDKit feature that is very useful for generating reactant products pairs for a given reaction. Unfortunately the algorithm changes the atom order between reactants and products, which creates problems one tries to locate the reaction paths using an interpolation-based algorithm such as nudged elastic band (NEB).
Fortunately, RDKit keeps track of the the change in atom order (thanks to my MS student Julius Seumer for the tip!) and it's easy to reorder the atoms:
If the 3D structures are to be used for interpolation it is important to embed the reactant structure before converting it to product. This keeps the "label-chirality" of groups such as CH2 the same in reactant and products.
Here is a demo notebook
It's almost 3 years ago that I wrote about atom mapper and now the code has received a major overhaul thanks to my PhD student Mads Koerstz. The 2D atom mapping part is basically left untouched, but the main new thing is a general implementation of the 3D mapping problem.
The 3D mapping problem is that if labels (i.e. atom orders) are considered then all tetrahedral centers are chiral and the chirality of centers with equivalent atoms, such as CH2 groups, generated by RDKit's embed function will be arbitrary and unlikely to match in reactants and products. This creates problems for methods such as nudged elastic band (NEB) that try to determine the reaction path by interpolation.
Mads found a clever approach using chiral atom tags, where he generates arbitrary tags for the reactant and makes sure the tags match in the product. If there are true chiral centers he also generates all enantiomers.
The old version had some code that tried to align the coordinates, but that has been removed since that can be done much better with xTBs reaction path method.
is there maybe a way with RDKit to generate random (but valid) molecules with a given chemical sumformula?For example:C12H9N could generate Carbazole as valid compound.The output would be mol or SMILES.