openbabel / openbabel/openbabel
Allylic Radicals: Open Babel Error in Do 3D coordinate generation failed
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 1.4k
- Forks
- 488
- Avg merge
- 6d 1h
- Merged PRs (30d)
- 1
Description
Environment Information
Open Babel version: Open Babel 3.1.0 -- Jun 13 2022 -- 01:49:04
Operating system and version: MacOS Ventura 13.2.1
Expected Behavior
I expect to generate a 3D geometry for the allylic radical below:
obabel -:"C/C=C(C)/[CH2]" --gen3D --ff MMFF94 -h -oxyz
Actual Behavior
When I attempt to generate the 3D geometry for the allylic radical, I obtain an error instead:
obabel -:"C/C=C(C)/[CH2]" --gen3D --ff MMFF94 -h -oxyz
==============================
*** Open Babel Error in Do
3D coordinate generation failed
14
C 0.00000 0.00000 0.00000
C 0.00000 0.00000 0.00000
C 0.00000 0.00000 0.00000
C 0.00000 0.00000 0.00000
C 0.00000 0.00000 0.00000
H 0.00000 0.00000 0.00000
H 0.00000 0.00000 0.00000
H 0.00000 0.00000 0.00000
H 0.00000 0.00000 0.00000
H 0.00000 0.00000 0.00000
H 0.00000 0.00000 0.00000
H 0.00000 0.00000 0.00000
H 0.00000 0.00000 0.00000
H 0.00000 0.00000 0.00000
1 molecule converted
Changing the alkene geometry (obabel -:"C/C=C(C)\[CH2]" --gen3D --ff MMFF94 -h -oxyz) or removing the alkene geometry entirely (obabel -:"CC=C(C)[CH2]" --gen3D --ff MMFF94 -h -oxyz) has no impact; I get the same error.
The corresponding anion seems fine (including with the other alkene geometry):
obabel -:"C/C=C(C)/[CH2-]" --gen3D --ff MMFF94 -h -oxyz
14
C 0.93745 0.00500 0.09536
C 2.42550 -0.10483 0.03668
C 3.12936 -1.25052 0.00992
C 2.51958 -2.62452 0.04605
C 4.57019 -1.21118 -0.07364
H 0.64233 1.06012 0.10304
H 0.54410 -0.45593 1.00624
H 0.47811 -0.45886 -0.78226
H 2.95568 0.84895 0.00129
H 1.42593 -2.60389 0.06982
H 2.85452 -3.16324 0.93934
H 2.81401 -3.20125 -0.83735
H 5.10498 -0.27298 0.02505
H 5.10141 -2.05996 -0.48980
1 molecule converted
I can get a structure for the original allylic radical by enumerating the Hs on the radical explicitly, like so, with no alkene geometry specified:
obabel -:"CC=C(C)[C]([H])[H]" --gen3D --ff MMFF94 -h -oxyz
14
C 0.96609 -0.13361 0.10476
C 2.44475 -0.13741 -0.11041
C 3.09441 0.53782 -1.07856
C 2.42731 1.41491 -2.10109
C 4.53079 0.44165 -1.18629
H 5.08925 -0.26795 -0.58627
H 5.08002 1.18435 -1.75434
H 0.71893 -0.72475 0.99267
H 0.44834 -0.58446 -0.74721
H 0.59124 0.88077 0.26961
H 3.01264 -0.74417 0.59270
H 1.33640 1.40950 -2.01873
H 2.67599 1.07752 -3.11348
H 2.76034 2.45275 -1.99086
1 molecule converted
Any idea what might be going on here? The closest related issue I could find was #2317.
Thanks so much for any assistance!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported obabel --gen3D --ff MMFF94 command for the allylic radical and compare it with the working anion and explicitly hydrogenated forms. Read the handling of radical input and 3D coordinate generation, using issue #2317 as the related reference. Done means the original radical command generates valid, nonzero 3D coordinates without the reported error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100