Autodesk / Autodesk/notebook-molecular-visualization
viewer.color_by is slow for large molecules
- Dominant language
- Python
- Stars
- 88
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Description
This actually looks cool, although it's probably not what we want :)
**To reproduce:**
In a notebook, execute this cell:
```python
mol = mdt.from_pdb('3aid')
drug = mol.chains['A'].get_ligand()
viewer = mol.draw(display=True)
viewer.stick()
```
Then this one:
```python
viewer.color_by(lambda atom:atom.distance(drug))
```
In the latest version, the colors draw in 1-at-a-time, which takes a while:

In 0.7.3, the color comes in all-at-once after thinking for a second or two:

Contributor guide
Assessment
This issue has not been assessed yet.