cheminfo / nmrium

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

Salt and multiple molecules #3087

Closed lpatiny closed 2 months ago

lpatiny commented 3 months ago

Currently there is no way to draw a salt and this is quite annoying. People should take care to draw many molecules if needed.

We have different scenario:

When drawing a molecule

lpatiny commented 3 months ago
  1. We draw a molecule such as

image

After validation we should have only one molecule compose of 2 parts.

  1. We paste a smiles like CCC.CC

We should have only one molecule composed of 2 parts

  1. We paste or drag / drop a file like 'test.smiles'
CCC.O
CCCC.S
CCCCC.N

The should obtain 3 molecules containing each 2 aprts

  1. We paste a molfile or drag / drop 'test.mol' containing 2 parts
first line
second line
third line
  2  0  0  0  0  0  0  0  0  0999 V2000
   -2.5208   -0.1432    0.0000 Na  0  3  0  0  0  0  0  0  0  0  0  0
    2.5208    0.1432    0.0000 Cl  0  5  0  0  0  0  0  0  0  0  0  0
M  CHG  2   1   1   2  -1
M  END

We should have only one molecule compose of 2 parts

  1. We paste a SDF file or drag / drop a file like test.sdf
first line
second line
third line
  2  0  0  0  0  0  0  0  0  0999 V2000
   -2.5208   -0.1432    0.0000 Na  0  3  0  0  0  0  0  0  0  0  0  0
    2.5208    0.1432    0.0000 Cl  0  5  0  0  0  0  0  0  0  0  0  0
M  CHG  2   1   1   2  -1
M  END
$$$$
first line
second line
third line
  2  0  0  0  0  0  0  0  0  0999 V2000
   -2.5208   -0.1432    0.0000 K   0  3  0  0  0  0  0  0  0  0  0  0
    2.5208    0.1432    0.0000 Br  0  5  0  0  0  0  0  0  0  0  0  0
M  CHG  2   1   1   2  -1
M  END
$$$$

We should only have 2 molecules each composed of 2 parts.

Ideally we should have Playwright in order to test those different scenario.