Ignoring valences read from sdf file #7127
-
Is it possible to completely ignore the data related to valences when loading molecules from sd files? I.e.
Is it possible to ignore everything after the elements and treat the file as they are all 0, without changing the file itself? It seems that this is known issue for nmrshiftdb2, but no one found a solution yet (or no one published the solution yet). |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
@zarkoivkovicc The mol file parser interprets the valence flag and sets a couple of values on the atoms. You can manually change those and then run a normal sanitization and it should clear things up.
Here's a simple demonstration to show it working:
|
Beta Was this translation helpful? Give feedback.
-
Thank you so much for the fast answer. This solves my issue. |
Beta Was this translation helpful? Give feedback.
@zarkoivkovicc The mol file parser interprets the valence flag and sets a couple of values on the atoms. You can manually change those and then run a normal sanitization and it should clear things up.
This function seems to work for at least simple cases:
Here's a simple demonstration to show it working: