Skip to content

Instantly share code, notes, and snippets.

@cisert
cisert / highlight_atoms_3d.py
Created February 9, 2022 10:48
Draw 3D molecule with highlighted atoms
import py3Dmol
from rdkit import Chem
def draw_mol_with_highlights(mol, hit_ats, style=None):
"""Draw molecule in 3D with highlighted atoms.
Parameters
----------
mol : RDKit molecule
hit_ats : tuple of tuples