GPCR-ModSim / qfepweb

Development of the web interface to QligFEP.
GNU Lesser General Public License v2.1
2 stars 1 forks source link

group saving prompt mislabels ligands #20

Closed JenkeScheen closed 3 years ago

JenkeScheen commented 3 years ago

when saving a group (for later analysis), e.g.: image the prompt to enter a name for the group should be listing the selected ligands (by name, i.e. 1h1q, 17, 1h1r). Currently the ligand names are depicted wrongly: image

I don't quite recognise those strings, do they remind you of anything @xbello? The correct string should be caught by this line, specifically selNodes IIRC.

xbello commented 3 years ago

Those strings are the "ids" of each molecule (Ligand) at DB level. We should use "name" and not "uuid" property.

JenkeScheen commented 3 years ago

do you have any idea how to catch that through selNodes in the call?

xbello commented 3 years ago

So the data Json is a bunch of {"label": "21", "image": "/media/molimages/5fb9a0ad-07e9-4c15-b068-ed9c2918d3f1.png", "id": "5fb9a0ad-07e9-4c15-b068-ed9c2918d3f1"}. In the code, at "network/models.py" method _build_json, ligand.name gets assigned to label.

We need the uuid at DB level, because "label" can be duplicated. So I opted for extract the value of "label" from the data object, just for the ligand selection.

Note that "label" is user friendly, while uuid is the proper way to talk to the DB: show the user labels, work behind the courtains with Uuids.

xbello commented 3 years ago

Check 2c068749a75c1d315005a6133d8cebac8d1e49f8, please.

JenkeScheen commented 3 years ago

awesome, works: image