Re: [OpenBabel-Devel] Non-integer bond orders for resonant groups

2021-08-01 Thread David van der Spoel

On 2021-07-27 12:33, David van der Spoel wrote:

On 2021-07-27 10:39, Noel O'Boyle wrote:

OBBond.IsAromatic(). See the docs.


Thanks for the suggestion. That works fine for aromatic rings, but not
for COO- or NO2 groups. Is there another flag to test, I cannot find
anything in the documentation.

An OBbond.IsResonant() would be great...


Just some feed back that I was able to implement a hack in my own code
turning both aromatic bonds and specific others like COO- into bond
orders of 1.5.

Cheers, David.






I would not use Smarts patterns to type atoms or bonds, but rather do
it in code. The former is just too error prone, slow and less readable.

On Tue, 27 Jul 2021, 07:18 David van der Spoel,
mailto:david.vandersp...@icm.uu.se>>
wrote:

On 2021-07-27 07:51, Noel O'Boyle wrote:
> Is there a particular problem you are trying to solve where
underlying
> kekule representation is causing a problem?
>

Yes, I am extracting bond orders from OB and they go into my force
field
code. Different bond orders means different bond properties which in
addition yield different charges in my force field code.

If I understand it correctly the kekulization code checks for
resonance
but in order to get the chemistry of single and double bonds
right we
had to add over 100 lines to bondtyp.txt, so I am not sure that
the code
alone is enough.

If it would be easy to extract the aromaticity of a bond that
would be
sufficient for my purpose indeed.

>
> On Mon, 26 Jul 2021, 21:28 David Koes, mailto:dk...@pitt.edu>
> >> wrote:
>
> In my opinion, if the only fractional value will be 1.5 then
> non-integer
> bond orders aren't worth the pain of breaking compatibility
since
> this
> state can be (and is, for rings) represented by setting the
aromatic
> property of the bond.  Perhaps we should provide additional,
more
> nuanced properties to indicate resonance vs aromaticity?
>
> If there is a reason for fractions other than 1.5, then I
think this
> should be a separate property entirely (e.g., like formal
charges vs
> partial charges).
>
> I would point out that although O=CO is represented with a
double and
> single bond, the oxygens still get an identical partial
charge as the
> carboxylic acid group is recognized as such:
> print(pybel.readstring('smi','O=CO').write('mol2'))
>
> David Koes
>
> Associate Professor
> Computational & Systems Biology
> University of Pittsburgh
>
> On 7/26/21 5:36 AM, David van der Spoel wrote:
> > Hi,
> >
> > maybe this has been discussed earlier, but I would like to
hear your
> > opinion on implementing non-integer bond orders. For e.g.
> benzene the
> > average CC bond order would be 1.5, and likewise for COO-
groups
> or NOO
> > groups. Quantum-chemically such resonant groups turn out
to be
> > symmetrical and e.g. with identical charges on the O in
those cases.
> >
> > When using integer bond orders we are enforcing an asymmetry
> that is not
> > there. So would it be worthwhile implementing non-integer
bond
> orders or
> > is there a workaround that I am overlooking?
> >
> > Cheers,
> >
> > --
> > David van der Spoel, Ph.D.,
> > Professor of Computational Molecular Biophysics
> > Uppsala University.
>
>
> ___
> OpenBabel-Devel mailing list
> OpenBabel-Devel@lists.sourceforge.net

> >
> https://lists.sourceforge.net/lists/listinfo/openbabel-devel

>
>
>


--
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

Re: [OpenBabel-Devel] Non-integer bond orders for resonant groups

2021-07-27 Thread David van der Spoel

On 2021-07-27 10:39, Noel O'Boyle wrote:

OBBond.IsAromatic(). See the docs.


Thanks for the suggestion. That works fine for aromatic rings, but not
for COO- or NO2 groups. Is there another flag to test, I cannot find
anything in the documentation.

An OBbond.IsResonant() would be great...




I would not use Smarts patterns to type atoms or bonds, but rather do
it in code. The former is just too error prone, slow and less readable.

On Tue, 27 Jul 2021, 07:18 David van der Spoel,
mailto:david.vandersp...@icm.uu.se>> wrote:

On 2021-07-27 07:51, Noel O'Boyle wrote:
> Is there a particular problem you are trying to solve where
underlying
> kekule representation is causing a problem?
>

Yes, I am extracting bond orders from OB and they go into my force
field
code. Different bond orders means different bond properties which in
addition yield different charges in my force field code.

If I understand it correctly the kekulization code checks for
resonance
but in order to get the chemistry of single and double bonds right we
had to add over 100 lines to bondtyp.txt, so I am not sure that
the code
alone is enough.

If it would be easy to extract the aromaticity of a bond that would be
sufficient for my purpose indeed.

>
> On Mon, 26 Jul 2021, 21:28 David Koes, mailto:dk...@pitt.edu>
> >> wrote:
>
> In my opinion, if the only fractional value will be 1.5 then
> non-integer
> bond orders aren't worth the pain of breaking compatibility
since
> this
> state can be (and is, for rings) represented by setting the
aromatic
> property of the bond.  Perhaps we should provide additional,
more
> nuanced properties to indicate resonance vs aromaticity?
>
> If there is a reason for fractions other than 1.5, then I
think this
> should be a separate property entirely (e.g., like formal
charges vs
> partial charges).
>
> I would point out that although O=CO is represented with a
double and
> single bond, the oxygens still get an identical partial
charge as the
> carboxylic acid group is recognized as such:
> print(pybel.readstring('smi','O=CO').write('mol2'))
>
> David Koes
>
> Associate Professor
> Computational & Systems Biology
> University of Pittsburgh
>
> On 7/26/21 5:36 AM, David van der Spoel wrote:
> > Hi,
> >
> > maybe this has been discussed earlier, but I would like to
hear your
> > opinion on implementing non-integer bond orders. For e.g.
> benzene the
> > average CC bond order would be 1.5, and likewise for COO-
groups
> or NOO
> > groups. Quantum-chemically such resonant groups turn out to be
> > symmetrical and e.g. with identical charges on the O in
those cases.
> >
> > When using integer bond orders we are enforcing an asymmetry
> that is not
> > there. So would it be worthwhile implementing non-integer bond
> orders or
> > is there a workaround that I am overlooking?
> >
> > Cheers,
> >
> > --
> > David van der Spoel, Ph.D.,
> > Professor of Computational Molecular Biophysics
> > Uppsala University.
>
>
> ___
> OpenBabel-Devel mailing list
> OpenBabel-Devel@lists.sourceforge.net
>
> https://lists.sourceforge.net/lists/listinfo/openbabel-devel
>
>


--
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





--
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 

Re: [OpenBabel-Devel] Non-integer bond orders for resonant groups

2021-07-27 Thread Noel O'Boyle
OBBond.IsAromatic(). See the docs.

I would not use Smarts patterns to type atoms or bonds, but rather do it in
code. The former is just too error prone, slow and less readable.

On Tue, 27 Jul 2021, 07:18 David van der Spoel, 
wrote:

> On 2021-07-27 07:51, Noel O'Boyle wrote:
> > Is there a particular problem you are trying to solve where underlying
> > kekule representation is causing a problem?
> >
>
> Yes, I am extracting bond orders from OB and they go into my force field
> code. Different bond orders means different bond properties which in
> addition yield different charges in my force field code.
>
> If I understand it correctly the kekulization code checks for resonance
> but in order to get the chemistry of single and double bonds right we
> had to add over 100 lines to bondtyp.txt, so I am not sure that the code
> alone is enough.
>
> If it would be easy to extract the aromaticity of a bond that would be
> sufficient for my purpose indeed.
>
> >
> > On Mon, 26 Jul 2021, 21:28 David Koes,  > > wrote:
> >
> > In my opinion, if the only fractional value will be 1.5 then
> > non-integer
> > bond orders aren't worth the pain of breaking compatibility since
> > this
> > state can be (and is, for rings) represented by setting the aromatic
> > property of the bond.  Perhaps we should provide additional, more
> > nuanced properties to indicate resonance vs aromaticity?
> >
> > If there is a reason for fractions other than 1.5, then I think this
> > should be a separate property entirely (e.g., like formal charges vs
> > partial charges).
> >
> > I would point out that although O=CO is represented with a double and
> > single bond, the oxygens still get an identical partial charge as the
> > carboxylic acid group is recognized as such:
> > print(pybel.readstring('smi','O=CO').write('mol2'))
> >
> > David Koes
> >
> > Associate Professor
> > Computational & Systems Biology
> > University of Pittsburgh
> >
> > On 7/26/21 5:36 AM, David van der Spoel wrote:
> > > Hi,
> > >
> > > maybe this has been discussed earlier, but I would like to hear
> your
> > > opinion on implementing non-integer bond orders. For e.g.
> > benzene the
> > > average CC bond order would be 1.5, and likewise for COO- groups
> > or NOO
> > > groups. Quantum-chemically such resonant groups turn out to be
> > > symmetrical and e.g. with identical charges on the O in those
> cases.
> > >
> > > When using integer bond orders we are enforcing an asymmetry
> > that is not
> > > there. So would it be worthwhile implementing non-integer bond
> > orders or
> > > is there a workaround that I am overlooking?
> > >
> > > Cheers,
> > >
> > > --
> > > David van der Spoel, Ph.D.,
> > > Professor of Computational Molecular Biophysics
> > > Uppsala University.
> >
> >
> > ___
> > OpenBabel-Devel mailing list
> > OpenBabel-Devel@lists.sourceforge.net
> > 
> > https://lists.sourceforge.net/lists/listinfo/openbabel-devel
> > 
> >
>
>
> --
> 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


Re: [OpenBabel-Devel] Non-integer bond orders for resonant groups

2021-07-27 Thread David van der Spoel

On 2021-07-27 07:51, Noel O'Boyle wrote:

Is there a particular problem you are trying to solve where underlying
kekule representation is causing a problem?



Yes, I am extracting bond orders from OB and they go into my force field
code. Different bond orders means different bond properties which in
addition yield different charges in my force field code.

If I understand it correctly the kekulization code checks for resonance
but in order to get the chemistry of single and double bonds right we
had to add over 100 lines to bondtyp.txt, so I am not sure that the code
alone is enough.

If it would be easy to extract the aromaticity of a bond that would be
sufficient for my purpose indeed.



On Mon, 26 Jul 2021, 21:28 David Koes, mailto:dk...@pitt.edu>> wrote:

In my opinion, if the only fractional value will be 1.5 then
non-integer
bond orders aren't worth the pain of breaking compatibility since
this
state can be (and is, for rings) represented by setting the aromatic
property of the bond.  Perhaps we should provide additional, more
nuanced properties to indicate resonance vs aromaticity?

If there is a reason for fractions other than 1.5, then I think this
should be a separate property entirely (e.g., like formal charges vs
partial charges).

I would point out that although O=CO is represented with a double and
single bond, the oxygens still get an identical partial charge as the
carboxylic acid group is recognized as such:
print(pybel.readstring('smi','O=CO').write('mol2'))

David Koes

Associate Professor
Computational & Systems Biology
University of Pittsburgh

On 7/26/21 5:36 AM, David van der Spoel wrote:
> Hi,
>
> maybe this has been discussed earlier, but I would like to hear your
> opinion on implementing non-integer bond orders. For e.g.
benzene the
> average CC bond order would be 1.5, and likewise for COO- groups
or NOO
> groups. Quantum-chemically such resonant groups turn out to be
> symmetrical and e.g. with identical charges on the O in those cases.
>
> When using integer bond orders we are enforcing an asymmetry
that is not
> there. So would it be worthwhile implementing non-integer bond
orders or
> is there a workaround that I am overlooking?
>
> Cheers,
>
> --
> David van der Spoel, Ph.D.,
> Professor of Computational Molecular Biophysics
> Uppsala University.


___
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/openbabel-devel





--
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


Re: [OpenBabel-Devel] Non-integer bond orders for resonant groups

2021-07-26 Thread David Koes
In my opinion, if the only fractional value will be 1.5 then non-integer 
bond orders aren't worth the pain of breaking compatibility since this 
state can be (and is, for rings) represented by setting the aromatic 
property of the bond.  Perhaps we should provide additional, more 
nuanced properties to indicate resonance vs aromaticity?


If there is a reason for fractions other than 1.5, then I think this 
should be a separate property entirely (e.g., like formal charges vs 
partial charges).


I would point out that although O=CO is represented with a double and 
single bond, the oxygens still get an identical partial charge as the 
carboxylic acid group is recognized as such:

print(pybel.readstring('smi','O=CO').write('mol2'))

David Koes

Associate Professor
Computational & Systems Biology
University of Pittsburgh

On 7/26/21 5:36 AM, David van der Spoel wrote:

Hi,

maybe this has been discussed earlier, but I would like to hear your
opinion on implementing non-integer bond orders. For e.g. benzene the
average CC bond order would be 1.5, and likewise for COO- groups or NOO
groups. Quantum-chemically such resonant groups turn out to be
symmetrical and e.g. with identical charges on the O in those cases.

When using integer bond orders we are enforcing an asymmetry that is not
there. So would it be worthwhile implementing non-integer bond orders or
is there a workaround that I am overlooking?

Cheers,

--
David van der Spoel, Ph.D.,
Professor of Computational Molecular Biophysics
Uppsala University.



___
OpenBabel-Devel mailing list
OpenBabel-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-devel


[OpenBabel-Devel] Non-integer bond orders for resonant groups

2021-07-26 Thread David van der Spoel

Hi,

maybe this has been discussed earlier, but I would like to hear your
opinion on implementing non-integer bond orders. For e.g. benzene the
average CC bond order would be 1.5, and likewise for COO- groups or NOO
groups. Quantum-chemically such resonant groups turn out to be
symmetrical and e.g. with identical charges on the O in those cases.

When using integer bond orders we are enforcing an asymmetry that is not
there. So would it be worthwhile implementing non-integer bond orders or
is there a workaround that I am overlooking?

Cheers,

--
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