Conformers
ETKDG on Metal — distance geometry in 4D, ETK in 3D, then MMFF94 — for N molecules × k conformers in one batch. Every conformer passes RDKit’s embedding checks.
generate_conformers_nkMolecular modelling on Apple silicon
Prepare molecular structures, run simulations and compare results in one open-source Python toolkit. MLX and Metal accelerate batched calculations on the GPU.
ETKDG on Metal — distance geometry in 4D, ETK in 3D, then MMFF94 — for N molecules × k conformers in one batch. Every conformer passes RDKit’s embedding checks.
generate_conformers_nkMorgan fingerprints, Tanimoto neighbour lists and Butina clustering for 150,000+ molecules, with divide-and-conquer memory.
butina_tanimoto_mlxMNDO, RM1, AM1, PM3, PM6 and PM7 with their corrections: scalar and batched SCF, gradients and geometry optimisation, no MOPAC needed.
mlxmolkit.nddoGFN0, GFN1, GFN2 and g-xTB energies, analytical gradients, ANCOPT geometry optimisation and ALPB water solvation.
mlxmolkit.xtbSurface charge profiles and σ-potentials. Activity coefficients and solubility in solvent mixtures through openCOSMO-RS.
mlxmolkit.xtbERG fingerprints, dense cosine similarity, CHEESE embeddings, Connolly surfaces and dipole atom features.
from mlxmolkit import …Every stage after the extraction runs on the GPU. An attempt is kept only if it passes RDKit’s embedding checks — chirality, E/Z, tetrahedral centres — after each minimisation.
RDKit reads each of the N SMILES and builds its constraints once.
The k conformers of a molecule share its constraints: ~50% less memory.
Molecules short of k conformers get new random starts, in bounded rounds.
On an M3 Max, packed Metal BFGS took 300 ms to optimise 2,500 conformers, compared with 555 ms for RDKit on 14 threads. 2,444 final energies were within 0.1 kcal/mol of RDKit. RDKit reached lower residual forces.
See the MMFF benchmarkpython -m pip install rdkit \
git+https://github.com/guillaume-osmo/mlxmolkit.git@mainRequires an Apple silicon Mac, Python 3.10 or later, Git and Xcode Command Line Tools.
from mlxmolkit import generate_conformers_nk, butina_tanimoto_mlx
import mlx.core as mx
# 3D conformers — N molecules × k conformers, one GPU batch
result = generate_conformers_nk(
smiles_list=["c1ccccc1", "CC(=O)O", "CC(=O)Oc1ccccc1C(=O)O"],
n_confs_per_mol=10,
run_mmff=True,
)
# Clustering — 150k+ molecules
clusters = butina_tanimoto_mlx(mx.array(fp_bytes), cutoff=0.4)
# Semi-empirical SCF
from mlxmolkit.nddo import nddo_energy
e = nddo_energy(atoms=[8, 1, 1],
coords=[[0, 0, 0], [0.97, 0, 0.93], [-0.97, 0, 0.93]],
method="PM6_D")
# xTB
from mlxmolkit.xtb import gfn2_energy
e = gfn2_energy(atoms, coords)