-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect sum formula and molecular mass for inorganic compounds #2340
Comments
This problem can be worked around (to obtain correct sum formulas and molecular mass - minus the extremely messy drawings) by
![]() or
![]() For even-membered rings, on the other hand, it is easiest to use alternating single and double bonds with the valence on the carbons set to five: ![]() Alternatively, one can also use alternating single/double bonds with explicit H atoms: ![]() |
Since inspection of https://github.com/ComPlat/chemotion_ELN/blob/main/app/models/molecule.rb with a debugger showed the internal data structures
is responsible for this unexpected behaviour, since it is the only time where This is only invoke if A procedure to check could either be:
or
|
If the issue with incorrect setting of |
Further digging in the code,
using this code and more stuff below:
So, this problem indeed seems to be due to problems with molfile RGROUP handling within Chemotion itself @adambasha0 @JanCBrammer @nicolejung |
Further playing around, the issue seems to arise not even from the NHC carbene C atoms, since when I define them as "free carbene" with a "standard valence" of two, they are right. Rather, the problem appears to be due to the nitrogen atom, which has to be assigend a charge of +1 Incorrect sum formula with one hydrogen too much even with central N atom "standard valence" set to four: Correct sum formula with +1 charge on nitrogen: |
Then the above statement is possibly partially incorrect in the sense of blaming the R group handling, but maybe rather due to removal of metal-ligand bonds or a special handling of the "super-valent" (= "standard valence" larger than three) N atom somewhere along the line?!? Because when I replace N by higher group V element P I need to set a valence of four to avoid a "PH" unit appearing (because "standard valence" of P is five, not three?!?) but then get the correct sum formula (same with As, Sb, and Bi but data not shown) but no charge: |
@adambasha0 @JanCBrammer @nicolejung Executive summary: the problem is not due to the NHC carbene unit but the "super-valent" nitrogen atom which seems to be handled differently from the other group V elements. |
So maybe the "NHC problem" can be solved with a "drawing inorganic structures" guideline document?!? |
What remains is the extremely distorted look of the sandwich complexes, since both Ketcher and consequently Chemotion seem to be unable to properly handle the "multi-attachment" statement of the molfile like
The graphics look nice but the "*" "star pseudo-atoms" used to define the multi-attachment points are not properly handled and thus only a picture but no sum formula is passed from Ketcher to Chemotion: One can manually enter the sum formula but then possibly still the sub-structure search and other stuff will not work: |
However, the multi-attachment statement in a v3000 molfile like
can easily be replaced by standard single/simple bonds, as we have implemented in TUCAN: Thus, if does quite a bit of working on the molfile, why not also do this multipoint-to-single_bonds conversion in Chemotion before updating the molecule data structure?!? |
And to resolve the problem with the highly distorted display in particular of sandwich complexes might be solved but more detailed examination of what the *.svg generation does: chemotion_ELN/app/models/molecule.rb Line 255 in e718707
|
@adambasha0 @JanCBrammer @nicolejung
As already reported about 1 1/2 years ago in #1551 there are serious problems with the display of inorganic structures and furthermore incorrect sum formulas generated in Chemotion while Ketcher gets the formulas right.
In an extensive debug session today with @JanCBrammer we were able to track down a good part of the problem, which is rooted actually not in one but at least two different issues.
Further elaborated in separate posts below
The text was updated successfully, but these errors were encountered: