partridgejiang / Kekule.js

A Javascript cheminformatics toolkit.
http://partridgejiang.github.io/Kekule.js
MIT License
250 stars 61 forks source link

Wedge/Dash direction matching behavior #111

Closed MrDarkHorse closed 5 years ago

MrDarkHorse commented 5 years ago

This may be a difference in convention. The strong preference from the folks I'm working with is that wedge direction should be enforced in the matcher, and that dash is the one that can be ambiguous. It looks like, however, the current behavior in Kekule is the exact reverse.

Wedge is allowed to be either direction and dash enforces direction.

Is this maybe configurable?

screen shot 2019-02-04 at 10 58 12 am screen shot 2019-02-04 at 10 57 56 am

MrDarkHorse commented 5 years ago

Any thoughts on this?

partridgejiang commented 5 years ago

Hi @MrDarkHorse, the code has now been modified to make the wedge bonds as the prior factors in stereo perception. Please check the latest commit. However, if the old behavior is needed, you can always pass option parameter {wedgeBondPrior: false} in the perception process.

MrDarkHorse commented 5 years ago

Awesome! Thanks!