Replies: 4 comments 12 replies
-
FWIW I don't think there's anything about the proposed Python solution which would require just-in-time compilation. The potential caveat to that is whether the I vote we delete |
Beta Was this translation helpful? Give feedback.
-
We will have a molecule object generator on the Python side, for example XYZ to start. |
Beta Was this translation helpful? Give feedback.
-
Open Babel does have Python bindings as far as I know: https://openbabel.org/wiki/Python
|
Beta Was this translation helpful? Give feedback.
-
Weird, I don’t see the post below on GitHub (yet).
Anyway, I think OpenBabel is a sensible solution. However, note that I have seen it do some really weird stuff when trying to generate a 3D structure from a SMILES string. I reported one bug and that one got fixed (OpenBabel builds the structure from fragments, and some fragments had all atomic coordinates listed as 0.0). However, more recently I got some surprising results trying to generate the structure of 2-propanol from the SMILES string CC(O)C (it generated a triangular carbon ring with a ketone on it). So in my experience, if you start from a structure that has all atoms specified then OpenBabel seems to be reliable in converting from one to another. But if you start from something where OpenBabel has to add atoms (hydrogens for example) then I would be more careful.
…-----------------------------------------------------------------------------------------------------
Hubertus van Dam, 631-344-6020, ***@***.******@***.***>
Brookhaven National Laboratory, orcid.org/0000-0002-0876-3294<http://www.orcid.org/0000-0002-0876-3294>
From: Zachery Crandall ***@***.***>
Reply-To: NWChemEx-Project/ChemCache ***@***.***>
Date: Monday, February 21, 2022 at 12:54
To: NWChemEx-Project/ChemCache ***@***.***>
Cc: "Van Dam, Hubertus" ***@***.***>, Mention ***@***.***>
Subject: Re: [NWChemEx-Project/ChemCache] Importing Molecules from Files (Discussion #32)
@ryanmrichard<https://github.com/ryanmrichard> Yeah, there are a lot of chemical file formats out there. I agree that writing our own parsers for all, or even a subset, would be a nightmare, and it is already a solved problem.
Open Babel sounds like a promising option! I have had good experiences with it in the past. The source code is compiled with CMake<https://urldefense.com/v3/__https:/openbabel.org/docs/current/Installation/install.html*requirements__;Iw!!P4SdNyxKAPE!TWnSXRzF4RHLOophG1k2IEogRRN79yaiN4z4gwzycUiijqTwSm1zmCy4KoTZ1F0$> and allows you to compile language bindings<https://urldefense.com/v3/__https:/openbabel.org/docs/current/Installation/install.html*compile-bindings__;Iw!!P4SdNyxKAPE!TWnSXRzF4RHLOophG1k2IEogRRN79yaiN4z4gwzycUiijqTwSm1zmCy4Q0ZlVdk$>. It also looks like there is a PyPI package<https://urldefense.com/v3/__https:/pypi.org/project/openbabel/__;!!P4SdNyxKAPE!TWnSXRzF4RHLOophG1k2IEogRRN79yaiN4z4gwzycUiijqTwSm1zmCy4PcGBBOg$>, so pip install openbabel might be sufficient.
—
Reply to this email directly, view it on GitHub<#32 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABDS7HVC36V4QSKXY6BQB43U4J343ANCNFSM5OBRV7PA>.
Triage notifications on the go with GitHub Mobile for iOS<https://urldefense.com/v3/__https:/apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675__;!!P4SdNyxKAPE!TWnSXRzF4RHLOophG1k2IEogRRN79yaiN4z4gwzycUiijqTwSm1zmCy4hzk_zLs$> or Android<https://urldefense.com/v3/__https:/play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign*3Dnotification-email*26utm_medium*3Demail*26utm_source*3Dgithub__;JSUlJSU!!P4SdNyxKAPE!TWnSXRzF4RHLOophG1k2IEogRRN79yaiN4z4gwzycUiijqTwSm1zmCy4XlylbjE$>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I am starting this discussion from PR #25, where we (@ryanmrichard, @hjjvandam, and @zachcran) discussed whether storing molecules as C++ code (as we currently do in ChemCache) is still the best approach.
This discussion continues that exchange from the last comment:
Beta Was this translation helpful? Give feedback.
All reactions