Conformer Generation

Conformer Generation#

Conformer generation is the process where 3D coordinates are generated for a molecule, purely based on its graph.

Hide code cell source

from boltz_data.mol import bzmol_from_smiles, generate_conformer
from boltz_data.draw.mol3d import draw_3d_svg, grid, ball_and_stick
from IPython.display import SVG

bzmol = bzmol_from_smiles("ClCCN(c2ccc1c(nc(n1C)CCCC(=O)O)c2)CCCl")

conformers = [
    generate_conformer(bzmol, seed=i)
    for i in range(9)
]

SVG(draw_3d_svg(*grid(*(
    ball_and_stick(conformer) for conformer in conformers
))))
../_images/f7bbafc9f088edf815d72f997dbb603e4b0ae46f9baa5a8e518127a7b2446f54.svg

Example conformers of Bendamustine#

Metal complexes#

By default, RDKit fails to generate conformers for metal-coordinated ligands such as haem and chlorophyll, due to the presence of dative bonds.

The conformer generation in boltz-data makes minor adjustments to the molecules before generation, such that this molecules do not fail

Hide code cell source

from boltz_data.mol import bzmol_from_smiles, generate_conformer
from boltz_data.draw.mol3d import draw_3d_svg, grid, ball_and_stick
from IPython.display import SVG

bzmol1 = bzmol_from_smiles(r"Cc1c2n3c(c1CCC(=O)O)C=C4C(=C(C5=[N]4[Fe]36[N]7=C(C=C8N6C(=C5)C(=C8C)C=C)C(=C(C7=C2)C)C=C)C)CCC(=O)O")
bzmol2 = bzmol_from_smiles(r"CCC1=C(C2=Cc3c(c(c4n3[Mg]56[N]2=C1C=C7N5C8=C([C@H](C(=O)C8=C7C)C(=O)OC)C9=[N]6C(=C4)[C@H]([C@@H]9CCC(=O)OC/C=C(\C)/CCC[C@H](C)CCC[C@H](C)CCCC(C)C)C)C)C=C)C")

bzmol1 = generate_conformer(bzmol1, seed=0)
bzmol2 = generate_conformer(bzmol2, seed=0)

SVG(draw_3d_svg(*grid(ball_and_stick(bzmol1), ball_and_stick(bzmol2))))
[13:56:56] UFFTYPER: Unrecognized charge state for atom: 11
../_images/7f0b97e74e995e7a9528b66244b6fb9959cd01973c3f8fc6633778edb881e539.svg

Example conformers of HEM and CLA#

2D Depictions of Conformers#

The generate_depiction method generates a 2D version of a molecule without coordinates. When 3D coordinates are available, the function will generate a 2D prediction based on that conformer.

Hide code cell source

from boltz_data.mol import bzmol_from_smiles, generate_conformer, generate_depiction
from boltz_data.draw.mol3d import draw_3d_svg, grid, ball_and_stick
from IPython.display import SVG

bzmol = bzmol_from_smiles("ClCCN(c2ccc1c(nc(n1C)CCCC(=O)O)c2)CCCl")

conformers = [
    generate_depiction(generate_conformer(bzmol, seed=i))
    for i in range(9)
]

SVG(draw_3d_svg(*grid(*(
    ball_and_stick(conformer) for conformer in conformers
))))
../_images/3c15aa5727335e2a8456249a32297ffaeeebddf7e52402fa6618a897837e23cc.svg

2D depictions of the above conformers of Bendamustine, making it easier to see the approximate arrangement of atoms#