cheminfo / ocl-cache-docker

MIT License
0 stars 1 forks source link

structures with multiple fragments #6

Open RicardoSilvestr opened 1 year ago

RicardoSilvestr commented 1 year ago

It appears that we overlooked the fact that structures can consist of multiple fragments. When this occurs, both atoms and unsaturations are included within the mfInfo.parts property as an array that contains the corresponding information for each fragment.

Given that atoms are stored as text data, I created a workaround by converting an array of atoms (e.g., [{atoms1},{atoms2}]) into a string. However, the issue with unsaturations, which are stored as integers, presents a more significant challenge. Currently, the highest value of all fragments is being used (as of 20.03.23), but this is not a permanent solution.

We need to find a more comprehensive solution that addresses the unsaturation problem.

lpatiny commented 1 year ago

I think if fragment>1 we should just ignore unsaturation and atoms.

image

lpatiny commented 1 year ago

Finally we will add the sum. A new version of mass-tools will be released to calculate the sum in case there are any parts: https://github.com/cheminfo/mass-tools/commit/b96a6d605af0d01bf9bac54de341c27f6c19a8c3