Let user choose which toolkits are enabled/disabled for random_depiction() calls
Closed this issue · 4 comments
tulay commented
@OBrink I started a solution for this on my dev branch. The solution adds omegaconf as a new dependency. Feel free to check out the changes if you have any cycles. If you like its direction, I can do a PR after testing.
Here is how I use it:
from RanDepict import RandomDepictor, RandomDepictorConfig
from pathlib import Path
smiles = "CN1C=NC2=C1C(=O)N(C(=O)N2C)C"
cfg = RandomDepictorConfig(seed=24, styles=["cdk", "indigo"])
with RandomDepictor(config=cfg) as depictor:
img1 = depictor(smiles)
"""
# omega_conf.yaml
RandomDepictorConfig:
seed: 42
augment: False
styles:
- cdk
"""
with RandomDepictor.from_config(config_file=Path('omega_conf.yaml')) as depictor:
img2 = depictor(smiles)
OBrink commented
Hey @tulay,
Thank you for your contribution! I would be really happy if you did a PR once it's tested!
Otto
OBrink commented
Nice! Will you do a PR?