XYMOL: A Python package to understand and explain atom/bond contributions of small molecules in machine learning models.
Using pip
to install:
# for release (stable) version
pip install xymol
# for the latest version
pip install git+https://github.com/smu-tao-group/xymol.git
The easiest way to use XYMOL is to input your featurizer (function to featurize SMILES) and the trained ML model through create_map
function.
from xymol import XYMOL
SMILES = "CCC" # replace with your SMILES
xymol = XYMOL(SMILES)
xymol.create_map(FEATURIZER, TRAINED_MODEL)
One example is displayed below. Green color means dropping this atom would lead to an increase in prediction, and vice versa.
Apache-2.0 license