Skip to content
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

Specify atom radical / charge for atypical valence #1116

Closed
nbehrnd opened this issue Aug 14, 2022 · 6 comments
Closed

Specify atom radical / charge for atypical valence #1116

nbehrnd opened this issue Aug 14, 2022 · 6 comments

Comments

@nbehrnd
Copy link
Contributor

nbehrnd commented Aug 14, 2022

Avogadro version: (please complete the following information from the About box):

  • Avogadrolibs: 1.96.0 as by the AppImage for Linux by July 21
  • Qt: 5.12.12

Desktop version: (please complete the following information):

  • OS: Linux Debian 12/bookworm (testing)

Describe the bug
The issue is related to this post about OpenBabel.

When drawing the structure of methane from scratch, the subsequent export of the molecule (File -> Export -> Molecule) as file methane.inchi yields an ASCII file including the string InChI=1S/CH4/h1H4. Here, Avogadro is working as anticipated.

Drawing a methane and removing an atom of hydrogen (pencil tool, right mouse click) to yield the methyl radical followed by the subsequent export by File -> Export -> Molecule as methyl_radical.inchi equally containing the string InChI=1S/CH4/h1H4 while e.g., the output with ChemDraw JS stays with three explicit hydrogens and consequently, exports InChI=1S/CH3/h1H3 only.

@welcome
Copy link

welcome bot commented Aug 14, 2022

Thanks for opening your first issue here! Please try to include example files and screenshots if possible. If you're looking for support, please post on our forum: https://discuss.avogadro.cc/

1 similar comment
@welcome
Copy link

welcome bot commented Aug 19, 2022

Thanks for opening your first issue here! Please try to include example files and screenshots if possible. If you're looking for support, please post on our forum: https://discuss.avogadro.cc/

@ghutchis ghutchis transferred this issue from OpenChemistry/avogadroapp Aug 19, 2022
@ghutchis
Copy link
Member

It's an interesting question. I believe the current latest of Avogadro with the latest of Open Babel (with CJSON support) should mark that as a radical, but I'll have to check.

@ghutchis
Copy link
Member

I've been thinking about this. Right now, the draw tool doesn't change formal charge or radicals when adding / removing hydrogens.

So I think the real bug here is whether the edit tool should prompt when you remove a hydrogen or otherwise leave an unusual valence.

Normally, in Avogadro v1, we left that to the user when exporting to Gaussian input, etc. but we track atomic formal charge, so tracking atomic spin might be needed. That way you could at least specify the radical site.

@ghutchis ghutchis changed the title InChI export of methyl radical adds a fourth hydrogen atom Specify atom radical / charge for atypical valence Sep 13, 2023
@nbehrnd
Copy link
Contributor Author

nbehrnd commented Sep 15, 2023

Unsure if it would have a significant influence on geometries built in Avogadro and eventually geometry optimized by one of the force fields then provided by openbabel, I run a comparison of methyl cation, methyl radical, and methyl carbanion. With starting geometries provided by ChemDraw as .sdf, openbabel's optimization with MMFF86 doesn't show a significant difference -- either by visual inspection (all are flat), nor by a numerical check (Kabsch test). Are there are force fields (more modern than UFF / MMFF86) which would discern the three cases as different, yield a more pyramidal shaped methyl carbanion?

But I agree, Avogadro's input generators for Gaussian, MOPAC, etc have a field to explicitly enter charge and spin. Storing these information already in Avogadro's JSON file then would be of potential benefit if one would like to replicate a quantum chemical computation in different dedicated programs. (Similar to benchmarks in lines of "How much are geometries / numbers apart from each other if performing the same type of computation once in Gaussian, and an other time e.g., in NWChem?".)

2023-09-15_brief_check.zip

@nbehrnd nbehrnd closed this as completed Sep 15, 2023
@ghutchis
Copy link
Member

GFN-FF using the XTB program probably can handle + / - / • better than those tools. Most conventional force fields are not designed to handle "unusual valence" - they're designed to get good geometries on common organic drug-like molecules.

CJSON does retain total charge / total spin - and #1059 is set to track integrating these into the input generators (e.g., you read in Gaussian / Orca output and the input generators would "remember" that the molecule is a radical and set charge / spin accordingly).

There's a bit of "plumbing" I need to do to finish #1059 - mainly to ensure charge / spin (and calculation metadata) are supplied to the input generator scripts and for the scripts to then update accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants