Coder Social home page Coder Social logo

molwitch's People

Contributors

chemmitch avatar dkatzel-ncats avatar tylerperyea avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

molwitch's Issues

Support / require reading unspecified SMARTS bonds as single-or-aromatic on query atoms

From Daylight's SMARTS page:
https://www.daylight.com/dayhtml/doc/theory/theory.smarts.html

4.2 Bond Primitives

Various bond symbols are available to match connections between atoms. A missing bond symbol is interpreted as "single or aromatic".

In practice, most tools don't really honor this daylight convention, per se. And that's mostly okay. By a strict reading of the Daylight resource a SMARTS query of c1ccccc1 (benzene) would actually be interpreted as having single-or-aromatic bonds between each atom with each atom itself having at least one aromatic bond somewhere. This is impractical to specify in a molfile.

Typically when a tool produces a SMARTS/SMILES pattern with aromatic atoms (e.g. c) but non-specific bonds between those aromatic atoms (e.g. cc), the common interpretation is that the unspecified bond is aromatic (e.g. c:c). Similarly, when a tool produces a SMARTS/SMILES pattern with aliphatic atoms (e.g. C), but a non-specific bond (e.g. CC), the common interpretation is an implied single bond (e.g. C-C). These conventions are widely used even if they present some problems.

The compromise solution requires a modification to Daylight's statement:

A missing bond symbol BETWEEN ATOMS WHERE AT LEAST ONE ATOM HAS A QUERY FEATURE is interpreted as "single or aromatic".

That is, it's fine to have explicit non-query atoms imply the bonds between them. But if at least one atom is a query atom, AND the SMARTS pattern does not specify a bond type, it should get interpreted as single-or-aromatic. For example:

Ambiguous SMARTS Equivalent to
cc c:c
CC C-C
C[#6] C-,:[#6]
C[*] C-,:[*]
[#6,#7][#6] [#6,#7]-,:[#6]

Here a "query atom" is any atom specified as an atom list (including a list of 1 element) or an atom wildcard.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.