On 2021-05-13 21:52, Ghahremanpour, Mohammad wrote:
Hi David,
Thanks for your reply.
It is practical to manually specify the formal charge of the atoms in the input
file for a few compounds, the problem arises when you work with many compounds
in different file formats. In this case, it would be good to have a backup
plan. It seems that if the bond order of bonds and the formal charge of atoms
are specified correctly, Kekulization works fine in most cases, if I am not
mistaken.
So in the problematic cases we have been working on, we use Gaussian
output files. The total charge of the compound is set correctly in the
obmol structure when reading the file, but not which atom it is on
(Gaussian does not do this kind of analysis).
I uploaded an issue with input files to reproduce the problem here:
https://github.com/openbabel/openbabel/issues/2366
It would definitely help to see what other people suggest before changing the
source code or the format of data files. Any suggestion is highly appreciated.
Cheers,
Mohammad
On May 13, 2021, at 3:33 PM, David Koes <dk...@pitt.edu> wrote:
Hi Mohammad,
bondtyper.txt does not have any ability to set formal charges. If you need to
do something more sophisticated than matching with SMARTS to set bond orders
you need to modify the C++ code.
Whether what you are proposing is the right thing to do, I leave to others to
decide. I would typically assume that the formal charge should be specified in
the input file. Also, I'm not sure bondtyping is the right place for
Kekulization fixes.
David Koes
Associate Professor
Computational & Systems Biology
University of Pittsburgh
On 5/13/21 10:50 AM, Ghahremanpour, Mohammad wrote:
Hi David,
In order to make kekulization work on imidazolium rings, I hard coded SMARTS in
bondtyper.cpp, where I explicitly set the formal charge of one of the nitrogens
to 1 and also set the bond order to 2 for two of the bonds in the ring. Doing
this, kekulization works fine.
As pointed out by you, the SMARTS for bond typing should be defined in
bondtyp.txt data file not hardcoded in the source file. I did it but
kelulizataion fails again, as the result of which the imidazolium ring is
considered as AL instead of AR. I think the problem is the formal charge which
is set to 0 for all atoms by default. While, for rings like imidazolium, the
formal charge of the nitrogen with four bonds is 1.
In bondtyper.cpp, there are other examples were the formal charges are set
explicitly, oxido-n+ (e.g., pyridine-N-oxide).
I was wondering if there is some data file to tabulate formal charge for
specific cases like this. I checked atomtyp.txt, not formal charge is stored
there.
Thanks,
Mohammad
--
David van der Spoel, Ph.D.,
Professor of Computational Molecular Biophysics
Uppsala University.
http://virtualchemistry.org
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: http://www.uu.se/om-uu/dataskydd-personuppgifter/
E-mailing Uppsala University means that we will process your personal data. For
more information on how this is performed, please read here:
http://www.uu.se/en/about-uu/data-protection-policy
_______________________________________________
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel