In [4]:
from rdkit import Chem
from rdkit.Chem import AllChem
import py3Dmol
In [13]:
m = Chem.MolFromSmiles('c1cncc(c1)c1nc(ncc1)Nc1cc(ccc1C)NC(=O)c1ccc(cc1)CN1CCN(CC1)C')
Chem.SanitizeMol(m)
AllChem.EmbedMultipleConfs(m, 1)

sdf = Chem.MolToMolBlock(m)+'$$$$\n'

for i in xrange(100):
    AllChem.UFFOptimizeMolecule(m,1)
    sdf += Chem.MolToMolBlock(m)+'$$$$\n'
    
view = py3Dmol.view()
view.addModelsAsFrames(sdf,'sdf')
view.setStyle({'stick':{}})
view.zoomTo()
view.animate()
view.show()
Out[13]:
In [ ]: