Closed David-Araripe closed 2 months ago
Forgot the send the file, sorry: 68_27_aligned.txt
I don't think you're doing anything wrong; I can load it using the OEChem backend and it looks like a sensible molecule in Avogadro as well. The toolkit internally has a different way of going through to the SDF supplier which is probably the cause of this trivalent oxygen you're seeing (?)
https://github.com/openforcefield/openff-toolkit/blob/f282282c6c5fb14df4c479cb7c689984bf3952f0/openff/toolkit/utils/rdkit_wrapper.py#L1074-L1076 / https://github.com/openforcefield/openff-toolkit/blob/f282282c6c5fb14df4c479cb7c689984bf3952f0/openff/toolkit/utils/rdkit_wrapper.py#L1009
Specifically here's where the failure bubbles up from: https://github.com/openforcefield/openff-toolkit/blob/f282282c6c5fb14df4c479cb7c689984bf3952f0/openff/toolkit/utils/rdkit_wrapper.py#L1019-L1024
I don't know why this is happening - Jeff, Josh, or somebody else may drop by and actually answer your question 😅
Indeed, there was something wrong with the molecule I sent. I added hydrogens at some point of processing, but I noticed that was wrong in the end, as my molecules had an "empty" valence configuration. Once I corrected this issue, I didn't see this bug anymore! Thank you very much for having a look into this!
If it's something you'd like to further investigate, fine, but from my side I'm fine with having this issue closed
Thanks for writing in and for the update, @David-Araripe. I'll mark this as closed.
I have a
.sdf
file that I want to parse usingopenff.toolkit.Molecule
. In general, I don't have problems with reading molecules like this.However, this was an exception. When trying to read the attached
.sdf
file with the methodMolecule.from_file(fpath, allow_undefined_stereo=True)
, I got the following logging message:Followed by the error:
Solves it for the moment A workaround that I found to work is loading the molecule by doing:
Is this the desired behavior from the
Molecule
class? If so, is there some parameter I can pass so that I can still read he molecule file using thefrom_file()
method?To reproduce the error & get the version I'm using
Where the version details are: