Thanks for your email. I've always thought the CDK HBond acceptor/donor
code is a little wonky and needs investigating. I don't have time to look
deeply at it but yes my reading of this is it doesn't check for the ether
oxygen correctly. If someone was inclined checking CDK's (and RDKit's)
values with PubChem would be a quick project that may provide some insight
onto missed cases and disagreements.

I've made a change here to get the correct value for phenol:
https://github.com/cdk/cdk/compare/bug/hbondacceptor?expand=1

On Fri, 15 Oct 2021 at 11:27, Guillermo Restrepo <
guillermo.restr...@mis.mpg.de> wrote:

> We are working with some descriptors taken from Reaxys database, which
> according to its owner are computed using your CDK library. We found
> something unexpected and would very much appreciate it if you could help
> us to understand.
>
> We noted that some phenols are reported as having 0 hydrogen bond
> acceptors, whereas we expected them to have at least one. We checked CDK
> source code and found this comment on HBondAcceptorCountDescriptor.java:
>
> The following groups are counted as hydrogen bond acceptors:
> - any oxygen where the formal charge of the oxygen is non-positive (i.e.
> formal charge <= 0) except
>        - an aromatic ether oxygen (i.e. an ether oxygen that is adjacent
> to at least one aromatic carbon)
>         - an oxygen that is adjacent to a nitrogen
> - any nitrogen where the formal charge of the nitrogen is non-positive
> (i.e. formal charge <= 0) except
>         - a nitrogen that is adjacent to an oxygen
>
> The way we understood it, this means that phenols should have at least
> one hydrogen bond acceptor. But further down in the same file, these
> lines seem to specify otherwise:
>
> // looking for suitable oxygen atoms
>              else if (atom.getAtomicNumber() == IElement.O &&
> atom.getFormalCharge() <= 0) {
>                  //excluding oxygens that are adjacent to a nitrogen or
> to an aromatic carbon
>                  List<IBond> neighbours = ac.getConnectedBondsList(atom);
>                  for (IBond bond : neighbours) {
>                      IAtom neighbor = bond.getOther(atom);
>                      if (neighbor.getAtomicNumber() == IElement.N ||
>                          (neighbor.getAtomicNumber() == IElement.C &&
>                           neighbor.isAromatic() &&
>                           bond.getOrder() != IBond.Order.DOUBLE))
>                          continue atomloop;;
>                  }
>                  hBondAcceptors++;
>              }
>
> Is this intended, or is it a bug, or are we misunderstanding something?
>
>
>
> _______________________________________________
> Cdk-user mailing list
> Cdk-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/cdk-user
>
_______________________________________________
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user

Reply via email to