You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Sometimes it is convenient to exchange molecules in JSON format rather than SMILES or
.sdf
files. Fortunately,rdChem.Mol
<-> JSON is already implemented inrdkit.Chem.rdMolInterchange.MolsToJSON
andrdkit.Chem.rdMolInterchange.JSONToMols
. This can be implemented in eitherdatamol.io
ordatamol.mol
, though I'm not sure exactly where, and what the signatures should be: For example, implementing this indatamol.mol.to_mol()
with JSON string input will require another if-else, which will slow down the method slightly. Perhapsdatamol.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.The text was updated successfully, but these errors were encountered: