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
"--gen3D" option generates a segmentation fault when converting hydrogen isotopomers in InChI to MOL/SDF format. #1794
Comments
On pc Debian x86-64 with master sources updated today, I could reproduce this. |
FYI. The following is the correct non-stereospecific InChI string: |
- data/UFF.prm: Add line for atom type 'D'. - src/forcefields/forcefielduff.cpp: Add checks to prevent segfaults. - test/regressiontest.cpp: Add test case.
The issue is that OBAtom::GetType() always returns "D" for deuterium.
Adding an entry for D in UFF.prm fixes the issue. Fix can be found here: https://github.com/timvdm/openbabel/tree/issue1794 |
Thanks for the fix!
…On Tue, Jan 7, 2020 at 6:09 PM Tim Vandermeersch ***@***.***> wrote:
The issue is that OBAtom::GetType() always returns "D" for deuterium.
char *OBAtom::GetType()
{
...
if (_ele == 1 && _isotope == 2)
snprintf(_type, 6, "%s", "D");
return(_type);
}
Adding an entry for D in UFF.prm fixes the issue.
Fix can be found here: https://github.com/timvdm/openbabel/tree/issue1794
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1794?email_source=notifications&email_token=ADEP7B2DPP5RCMDFURZLUTLQ4UDSRA5CNFSM4EV3O3AKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIKTO3Q#issuecomment-571815790>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADEP7B7ZQWEH7LDEAIHACGTQ4UDSRANCNFSM4EV3O3AA>
.
--
Hunter Moseley, Ph.D. -- Univ. of Kentucky
Associate Professor, Dept. of Molec. & Cell. Biochemistry / Markey Cancer
Center
/ Resource Center for Stable Isotope Resolved Metabolomics
Not just a scientist, but a fencer as well.
My foil is sharp, but my mind sharper still.
---------------------------------------------------------------
Email: hunter.moseley@uky.edu (work) hunter.moseley@gmail.com
(personal)
Phone: 859-218-2964 (office) 859-218-2965 (lab) 859-257-7715 (fax)
Web: http://bioinformatics.cesb.uky.edu/
Address: CC434 Roach Building, 800 Rose Street, Lexington, KY 40536-0093
|
Fix issue #1794, UFF atom typing for deuterium
This bug may be related to other "--gen3D" bugs reported, but it is not obvious from the description of those issues.
Environment Information
Open Babel version: 2.4.1
Operating system and version: Fedora 27
Expected Behavior
The "--gen3D" would create a stereospecific MOL/SDF file for a stereospecific InChI.
The following command should work without generating a segmentation fault:
% obabel -iinchi alpha-d-glucopyranose_modified_H13-2H.inchi -omol -Oalpha-d-glucopyranose_modified_H13-2H.inchi.mol --gen3D
Actual Behavior
Conversion of the following InChI strings into MOL/SDF format with the "--gen3D" option generates a Segmentation Fault.
InChI=1S/C6H12O6/c7-1-2-3(8)4(9)5(10)6(11)12-2/h2-11H,1H2/t2-,3-,4+,5-,6+/m1/s1/i1D/t1-,2-,3-,4+,5-,6+
InChI=1S/C6H12O6/c7-1-2-3(8)4(9)5(10)6(11)12-2/h2-11H,1H2/t2-,3-,4+,5-,6+/m1/s1/i1D/t1-,2+,3+,4-,5+,6-/m0
Even the non-stereospecific InChI causes a seg fault with the --gen3D option:
InChI=1S/C6H12O6/c7-1-2-3(8)4(9)5(10)6(11)12-2/h2-11H,1H2/t2-,3-,4+,5-,6+/m1/s1/i1D
Steps to Reproduce
Just use the InChI provided to reproduce.
The text was updated successfully, but these errors were encountered: