Open nishanthmerwin opened 2 months ago
This is not a bug. get_mol
will only parse the molblock up to the M END
tag, as it mimics the functionality of the Python function Chem.MolFromMolBlock
rather than from Chem.SDMolSupplier
.
@ptosco is there an alternative in rdkitjs that would allow me to get the properties?
No, at the moment there isn’t one.
Describe the bug I am trying to ingest an SDF file with RDKit JS and am running into an issue where the properties tagged on an SDF file are missing
To Reproduce
Consider the following code:
Expected behavior
I would expect to see the properties "some_property" and "PUBCHEM_COMPONENT_COUNT", but instead these are missing.
Screenshots
Output of metadata in the example:
Version
This issue was noticed in RDKit version: 2024.03.5
Additional context This is maybe medium priority for me, my current workaround is just to manually extract the properties outside of RDKit. It would be nice to update
get_mol
but it would also be even more useful to export functionality fromChem.SDMolSupplier
as defined here: https://www.rdkit.org/docs/GettingStartedInPython.html#reading-sets-of-molecules