Skip to content

Adding JSON I/O for molecules #230

@isty2e

Description

@isty2e

Sometimes it is convenient to exchange molecules in JSON format rather than SMILES or .sdf files. Fortunately, rdChem.Mol <-> JSON is already implemented in rdkit.Chem.rdMolInterchange.MolsToJSON and rdkit.Chem.rdMolInterchange.JSONToMols. This can be implemented in either datamol.io or datamol.mol, though I'm not sure exactly where, and what the signatures should be: For example, implementing this in datamol.mol.to_mol() with JSON string input will require another if-else, which will slow down the method slightly. Perhaps datamol.mol.to_mol(mol: str | Mol | dict) might be better, but the JSON can contain multiple molecules so it's not a good interface in the first place.

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