Hi Madeleine, There is also a data file for ring types. That might help you fix the problem with small rings.
openbabel/data/ringtyp.txt Best, Mohammad > On Jun 8, 2021, at 8:15 AM, Marie-Madeleine Walz > <marie-madeleine.w...@icm.uu.se> wrote: > > Hi David, > > thank you for your advice regarding using AssignTotalChargeToAtoms. Adding it > resulted in less errors in the bond order assignment. > Unfortunately, it did not remove e.g. the error with sulfite (SO3^2-) that is > still getting three double bonds. > > Another issue is that some of the small rings (e.g. thiirene, C2H2S) are not > recognised as rings. > This is really confusing as the coordinates fullfil the requirement set in > mol.cpp, ConnectTheDots(), lines 3027-3028: > > // bonded if closer than elemental Rcov + tolerance > cutoff = SQUARE(rad[j] + rad[k] + 0.45); > > If you have any advice I would really appreciate it. > > With kind regards, > Madeleine > >> On 7 Jun 2021, at 15:34, David Koes <dk...@pitt.edu> wrote: >> >> There is AssignTotalChargeToAtoms which is called when parsing the gamess >> format, but not, apparently, gaussian. >> >> Again, if you could upload examples of failures to a GitHub Issue (or even >> better, start a pull request with failing tests added to the testing >> framework) that would be helpful. >> >> David Koes >> >> Associate Professor >> Computational & Systems Biology >> University of Pittsburgh >> >> On 6/7/21 8:22 AM, Marie-Madeleine Walz wrote: >>> Hi David, >>> thank you for your reply. I tested your code that assigns a sp2 >>> hybridisation to a N as e.g. in azete (in mol.cpp), and it solves the >>> incorrect bond orders. >>> However, I think that this is a general problem: I have numerous compounds >>> that get incorrect bond orders and that end up with a different charge than >>> specified in the Gaussian output file (like e.g. sulfite and sulfur >>> trioxide). I think it might be a good idea to have somewhere a general >>> "charge check”. (Maybe there is and I miss to use it? I checked whether OB >>> is getting the specified charge and it seems to get it.) >>> For example, it would be great if there is a function that checks (i) the >>> charge of the compound (or whether it is a radical) and (ii) the sum of >>> bond orders to a certain atom (I guess that is done with >>> GetExplicitValence()). If a compound is neutral (and not a radical) and >>> ends up with e.g. a C that only has three single bonds, this should be >>> somehow corrected. >>> Is there any way to do this with the existing OB functions, i.e. without >>> changing the code? >>> With kind regards, >>> Madeleine > > > > > > > > > > När du har kontakt med oss på Uppsala universitet med e-post så innebär det > att vi behandlar dina personuppgifter. För att läsa mer om hur vi gör det kan > du läsa här: > https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.uu.se%2Fom-uu%2Fdataskydd-personuppgifter%2F&data=04%7C01%7Cmohammad.ghahremanpour%40yale.edu%7C3800a155cf7140cbbe9408d92a772244%7Cdd8cbebb21394df8b4114e3e87abeb5c%7C0%7C0%7C637587513460790622%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=unIJsWaCXbAz%2B0gRtvO25UCDGA6naxS8vigP3EEaaQw%3D&reserved=0 > > <https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.uu.se%2Fom-uu%2Fdataskydd-personuppgifter%2F&data=04%7C01%7Cmohammad.ghahremanpour%40yale.edu%7C3800a155cf7140cbbe9408d92a772244%7Cdd8cbebb21394df8b4114e3e87abeb5c%7C0%7C0%7C637587513460790622%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=unIJsWaCXbAz%2B0gRtvO25UCDGA6naxS8vigP3EEaaQw%3D&reserved=0> > > E-mailing Uppsala University means that we will process your personal data. > For more information on how this is performed, please read here: > https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.uu.se%2Fen%2Fabout-uu%2Fdata-protection-policy&data=04%7C01%7Cmohammad.ghahremanpour%40yale.edu%7C3800a155cf7140cbbe9408d92a772244%7Cdd8cbebb21394df8b4114e3e87abeb5c%7C0%7C0%7C637587513460790622%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Z2wEGiSarBatMRVsJniKLg6O23SWykeotgK0o7qt604%3D&reserved=0 > > <https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.uu.se%2Fen%2Fabout-uu%2Fdata-protection-policy&data=04%7C01%7Cmohammad.ghahremanpour%40yale.edu%7C3800a155cf7140cbbe9408d92a772244%7Cdd8cbebb21394df8b4114e3e87abeb5c%7C0%7C0%7C637587513460790622%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Z2wEGiSarBatMRVsJniKLg6O23SWykeotgK0o7qt604%3D&reserved=0> > > _______________________________________________ > OpenBabel-Devel mailing list > OpenBabel-Devel@lists.sourceforge.net > <mailto:OpenBabel-Devel@lists.sourceforge.net> > https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fopenbabel-devel&data=04%7C01%7Cmohammad.ghahremanpour%40yale.edu%7C3800a155cf7140cbbe9408d92a772244%7Cdd8cbebb21394df8b4114e3e87abeb5c%7C0%7C0%7C637587513460790622%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=rJNJ1K5VEHB5LyW8Wu6h2jabAoyhLWaLLdLA%2F7Iv8JE%3D&reserved=0 > > <https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fopenbabel-devel&data=04%7C01%7Cmohammad.ghahremanpour%40yale.edu%7C3800a155cf7140cbbe9408d92a772244%7Cdd8cbebb21394df8b4114e3e87abeb5c%7C0%7C0%7C637587513460790622%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=rJNJ1K5VEHB5LyW8Wu6h2jabAoyhLWaLLdLA%2F7Iv8JE%3D&reserved=0>
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ OpenBabel-Devel mailing list OpenBabel-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbabel-devel