8000 lasso only color when using smarts_list but not atom_indices · Issue #233 · datamol-io/datamol · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
lasso only color when using smarts_list but not atom_indices #233
Open
@OleinikovasV

Description

@OleinikovasV

Really like lasso functionality, but at times I would prefer to pass the atom indices and have them colored, but it seems that it is all grey, as they are not being assigned.

See example below: lasso only color when using smarts_list but not atom_indices

import datamol as dm

input_smiles = "Cc1c(scn1)c2ccc(cc2)CNC(=O)[C@@H]3C[C@H](CN3C(=O)[C@H](C(C)(C)C)NC(=O)C)O"

dm.lasso_highlight_image(
    input_smiles,
    search_molecules = ["N1CC(O)CC1C(=O)"],
    color_list=[(0.9, 0.5, 0.1)],
    mol_size=(500, 400),
    use_svg=False
)

Image

If I instead atom_indices directly, it gives me a gray lasso only (which is not useful when having multiple highlights!):

dm.lasso_highlight_image(
    input_smiles,
    # search_molecules = ["N1CC(O)CC1C(=O)"],
    atom_indices=[[20, 19, 18, 17, 16, 15, 14, 32]],
    color_list=[(0.9, 0.5, 0.1)],
    mol_size=(500, 400),
    use_svg=False
)

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0