cheminfo / nmrium

React component to display and process nuclear magnetic resonance (NMR) spectra.
https://docs.nmrium.org
MIT License
55 stars 26 forks source link

Enable reading peaks, ranges, multiplicity of jcamp files #2039

Open NRayya opened 1 year ago

NRayya commented 1 year ago

The jcamp file generated from unzipping https://github.com/NFDI4Chem/nmrium-react-wrapper/files/9494956/HMS-Q303_11.edit.zip can't have its peaks and integrals displayed in the corresponding tables

lpatiny commented 1 year ago

The standard that we are using is defined here: http://www.jcamp-dx.org/protocols/dxnmr01.pdf

There are some custom comments that we are not parsing

##$OBSERVEDINTEGRALS= (X Y Z)
(117.54850535600065, 167.7517328787416, 0.7688874662387057, 7458045956.1968775)
##$OBSERVEDMULTIPLETS=
(1, 48.49425617027523, 98.8959225932613, 71.51395088422314, 1.0, 1, m, A)
##$OBSERVEDMULTIPLETSPEAKS=
(1, 88.42100629180075, 41460686.26228226)
(1, 83.37378114407994, 47730911.617038734)
(1, 61.231857165231986, 4610227.459403367)
(1, 53.02915893577986, 32141353.241591156)

And 2 peak tables:

##TITLE=HMS-Q303_11
##JCAMP-DX=5.00
##DATA TYPE=NMRPEAKTABLE
##DATA CLASS=PEAKTABLE
##$CSCATEGORY=EDIT_PEAK
##$CSTHRESHOLD=0.005
##MAXX=235.4798379479265

That we currently parse but probably don't use.

I guess we could use this information but because there are 2 tables it means that all the peaks will be doubled in the peak table list.

baolanlequang commented 1 year ago

@NRayya the customized fields in the files that were generated by Chemspectra are only used in Chemspectra. In general, NMRium can't read our customized fields at the moment. I don't know that @lpatiny has any plan to allow 3rd parties applications can send their own customized jcamp files or not.