chemistry / crystallography.io

Crystal Structure Search
http://crystallography.io
MIT License
7 stars 1 forks source link

unexpected coalescence of structure templates #22

Open nbehrnd opened 3 years ago

nbehrnd commented 3 years ago

The sketcher on https://crystallography.io/ offers templates to accelerate drawing the structure to query. In contrast to other sketchers, however, the current implementation tends to coalesce these unexpectedly early.

For example, aiming to extend a methyl-substituted cyclohexane by a second cyclohexane at the tip of the methyl group yields decalin instead. So far, the only approach I identified to prevent this to happen was 1) to sketch to separate cyclohexane rings, and then 2) to drag an extended single bond between the two:

sketchers_magnetism_1

Apparently, cyclohexane is not the only template with this property. With benzene, for example, the sketcher suggests a napthalene-like entity. The search in the database possibly does not account for the bond order between the atoms, yet may yield a pentavalent carbon atom. Again, this may be prevented by drawing the cycles separately, and to join them by a dragging a single bond:

sketchers_magnetism_2

Joining rings not over tips, but along an edge in common, however works along the expected way for e.g., both cyclohexane (to yield decalin), or benzene (to yield a naphthalene with the usual bond orders).

sketchers_magnetism.zip

vreshch commented 3 years ago

Thanks, @nbehrnd for feedback. That's not a bug, rather feature request. Let me check with other sketchers.
By the way the issue related to the sketchers should be reported here: https://github.com/chemistry/molpad/issues

nbehrnd commented 3 years ago

Maybe one of the internal magnets is too strong, because so far, I did not observe this with the version of Mr Ertl's sketcher used on COD.[1] The JavaScript version of Marvin, apparently, does not, either.[2] ChemDoodle's Webcomponents again seems to use attenuated magnets and keeps a ring on the tip, too.[3] While I'm not able to identify what and how to adjust something within you implementation, changing this (for me) unexpected property is not mission critical.

[1] https://www.crystallography.net/cod/jsme_search.html [2] https://marvinjs-demo.chemaxon.com/latest/demo.html [3] https://web.chemdoodle.com/demos/2d-sketcher