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. 

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 <[email protected]> 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



_______________________________________________
OpenBabel-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbabel-devel

Reply via email to