Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding new adsorbents #1

Open
ltalirz opened this issue Aug 10, 2020 · 9 comments
Open

adding new adsorbents #1

ltalirz opened this issue Aug 10, 2020 · 9 comments

Comments

@ltalirz
Copy link
Member

ltalirz commented Aug 10, 2020

As of today, the AutocompleteInput does not allow for entering new values that aren't yet in the list.
Following our suggestion, this has been discussed at the bokeh level, and we have green light for adding support for this directly in the widget bokeh/bokeh#10295 (comment)

While this is a bit of work, it's probably better than an ugly workaround?
At the same time, the question is: if we want a new material, will people also need to enter a new materials identifier etc.?

@dwsideriusNIST
Copy link
Contributor

dwsideriusNIST commented Aug 10, 2020

I can add the function that generates the materials identifier to the repo. As we discussed, the "name" ---> ID hashing sequence is not intended to be reproducible, so it is OK if the digitizer's hashing sequence differs from one I use in house. The only restriction is that the format be the same: "NIST-MATDB-[MD5 hash digest]"

NOTE: I checked my code, the material identifier is generated with the MD5sum hash. We can salt the string if desired.

@ltalirz
Copy link
Member Author

ltalirz commented Aug 10, 2020

I can add the function that generates the materials identifier to the repo.

Thanks, Dan, in that case I will simply copy it and apply it here, once the AutocompleteInput works accordingly.

@ltalirz
Copy link
Member Author

ltalirz commented Aug 10, 2020

NOTE: I checked my code, the material identifier is generated with the MD5sum hash. We can salt the string if desired.

Ah. Ok!

@ltalirz
Copy link
Member Author

ltalirz commented Aug 11, 2020

Example of adsorbent representation

{
		"hashkey": "NIST-MATDB-SHA2hashdigest,
		"name": "New Material 2 name",
		"Formula": "Material 2 Formula",
		"Synonyms": [
			"Material 2 First Syn",
			"Material 2 Second Syn",
			"Material 2 Third Syn"
		],
		"External_Resources": [
			{
				"resource_id": "bd45316e8286e6ae4329da7a3448bcbd7fe45e91",
				"name": "COD",
				"values": [
					"1100118",
					"http://www.crystallography.net/cod/1100119.html"
				]
			}
		]
	}

@ltalirz
Copy link
Member Author

ltalirz commented Sep 8, 2020

Started working on this here: bokeh/bokeh#10476

@ltalirz
Copy link
Member Author

ltalirz commented Sep 20, 2020

Just to mention that the PR has been merged and bokeh 2.3.0.dev1 includes it, but now we're stuck on the panel side - let's see for how long holoviz/panel#1588

I've tried setting up an environment with both bokeh and panel development versions but failed to get it to work so far...

@ltalirz
Copy link
Member Author

ltalirz commented Sep 22, 2020

@danieleongari @dwsideriusNIST After fighting with the bokeh & panel development versions for hours, I've finally managed to get a version deployed on the server that allows specifying new adsorbents.

See http://digitizer.matscreen.com/ (using panel-dev branch of digitizer + this panel branch)

@ltalirz
Copy link
Member Author

ltalirz commented Sep 22, 2020

#48 adds the ability to enter adsorbents of unknown name.

Still to decide how to ask the user for additional information regarding the adsorbent.

@ltalirz ltalirz closed this as completed Sep 22, 2020
@ltalirz ltalirz reopened this Sep 22, 2020
@dwsideriusNIST
Copy link
Contributor

dwsideriusNIST commented Sep 22, 2020

There are a few options to consider:

  1. With the PHP digitizer, when a new adsorbent name was input (exactly the same behavior as the panel-dev branch), I left "hashkey" empty (though we should go with null). Any isotherms with empty hashkeys were flagged for review, after which I either corrected the adsorbent metadata or generated new hashkeys and updated the isotherms.

Main point: I'm OK with a null hashkey as the postprocessing script will flag that isotherm for review.

  1. For more experienced users, there could be a breakout menu where additional information (CSD refcode, synonyms, etc) is input. The hashkey generation could be an option as well.

-> Perhaps the best approach for now is to leave hashkey as null and we develop the breakout menu at a future date.

These options would be equally applicable to adsorbates/InChIKey. (though it would be great if there was a robust API for cross-referencing InChIKey/InChICode/IUPAC names.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants