cheminfo / cheminfo-types

https://cheminfo.github.io/cheminfo-types/
MIT License
2 stars 3 forks source link

Assign peaks #50

Open lpatiny opened 3 years ago

lpatiny commented 3 years ago

https://github.com/cheminfo/cheminfo-types/blob/e4bd7ebcdf10e9b3a973f7661dfba36e9580d584/src/spectra/core/MolecularAssignment.ts#L2-L5

@kjappelbaum We need to find a way to mark atoms in a molecule in a non-ambigus way and using an existing javascript library. Not obvious to me that ChemAxon hacked SMILES format is a solution.

The openchemlib format allows to tag atoms and I'm using this for NMR assignment. However tagging hydrogens is rather a hack as well but at least from this modified OCL code you can directly visualize the assigned atoms

https://github.com/cheminfo/openchemlib-utils/blob/f644262b349f50dd5e80a18397bd131cc217bc21/src/util/tagAtom.js#L8-L20

kjappelbaum commented 3 years ago

there is some discussion here https://github.com/cheminfo/cheminfo-types/issues/26 and I actually do not like SMILES for a couple of reasons:

The molfile seems, atm, the most robust solution to me. It allows for bonding information in case this is required (e.g.), could be used with the structure graph can not be uniquely be determined (e.g., metal-organics)

The drawback of a molfile is that it does not allow for storing unit cell in its default specification. For periodic systems one would hence need some other convention. It guess this would be relevant for solid-state NMR, where one would rather use a CIF.

A CIF also allows to specify bonds and the CSD actually does this. The good thing about CIF is that one could, in principle, define a custom loop variable for the assignments. This is actually done for some crystallographic assignments in some cases and it might make sense to check what NMR star is doing