Closed brunocalcada closed 5 months ago
Hi @brunocalcada thanks for the kind words.
That error is likely coming from RDKit, not mordred
. Could you verify that the xyz, sdf, and mol files actually turn into the same molecule in RDKit? i.e. load all of the molecules into RDKit and then check if they are the same molecule. You can see which functions mordred
uses to do this here: https://github.com/JacksonBurns/mordred-community/blob/fdbd0d9121370f6e4bb3ffe4dd9f4d5b521c775b/mordred/__main__.py#L33
@JacksonBurns thanks for your reply.
Indeed my error was in the sdf file, something was in fact missing there :)
Glad the issue was discovered!
Hi all,
First, thanks for continuing this community, I use the mordred library on a regular basis.
In a more recent project that I'm working, I need to calculate all the descriptors for some charged molecules however mordred is complaining about the valence of the charged atoms (Explicit valence for atom # 8 N, 4, is greater than permitted).
If I generate the mol file from the smiles string and then calculate the descriptors, everything is ok. However, if a calculate the descriptors from a xyz or sdf file I'm getting that error. Is there a way to tell it that certain atoms have different valence or perhaps overwrite this and force the callculation of the descriptors?
Smiles string: "CCCCCCCCN+(CCCCCCCC)CCCCCCCC" (protonated atom is on square brackets) sdf file (in .txt): molecule_1.txt xyz file ( in .txt): molecule_1.txt
Thank you so much for any feedback in advance :)