nomad-coe / nomad

NOMAD lets you manage and share your materials science data in a way that makes it truly useful to you, your group, and the community.
https://nomad-lab.eu
Apache License 2.0
77 stars 19 forks source link

Material composition filtering and card improvement #66

Open ericpre opened 1 year ago

ericpre commented 1 year ago

Follow up of #47 on the material composition card: when an entry has a material composition with several elements, it is not easy to find the fraction (atomic or weight) of a particular element - see for example https://nomad-lab.eu/prod/v1/gui/search/solarcells/entry/id/kKcm7MIcC89IHVHQmjvFxIsGkxlF. To give more context on the use case, this is useful when working with alloyed compounds (for example of type of steels), where the composition of the given element can be related to a properties.

Similar idea applies for filtering entries with a given range of weight fraction when browsing the database. For example, being to select a range of Cr content in a steel materials is useful as it relates the corrosion resistance of the steel.

lauri-codes commented 1 year ago

Hi @ericpre!

This is indeed true. We have just now added the underlying data for the element fractions, and are in the process of updating our data to conform to this change. What is still missing are the UI concepts for displaying this kind of data and searching for it.

As for simply displaying the elemental composition: Maybe we should display a table, similar to the way we display band gaps. On the schema level these two are actually quite similar: repeating sections that can be searched individually.

As for searching the elemental composition: This is much trickier. The periodic table is our primary tool for searching elements, and now we somehow have to enable the users to also specify fractions for each element without overcomplicating things. I think the main challenges are:

Any suggestions especially for the search UI would be greatly appreciated from you @ericpre. I could come up with a prototype for this that we will discuss internally with our UX expert.

ericpre commented 1 year ago

@lauri-codes, thank you for following up and sorry for coming back only now - I didn't have time to follow up straightaway and then time goes!

What you are saying make a lot of sense and I appreciate that this is not straightforward and needs careful considering. A table sounds great, maybe with a display of atomic % and weight %. It may sound redundant to display both, but depending on the domain/community, atomic % or weight % are used and people (including me 😅) can find it inconvenient when one is used but the other one is needed...

The only thing that I can think to add is about adding optional content selector UI. Maybe add widget similar to the band-gap selection to the periodic table widget? If this is possible to add a content selector for a given element dynamically, that would be great!

image

An alternative would be possible to do it by adding custom filter and define a range, which should have been made possible with the recent changes on the elemental composition? For example, N_content >=0 and N_content <1.

To elaborate more on the use case:

Both will have positive or negative impact on the material properties!

lauri-codes commented 1 year ago

@ericpre: Thanks for the follow-up.

We should definitely show both the atomic and mass fractions in the table.

I think that the same type of histogram as is used for band gap value will indeed be used for the atomic_fraction and mass_fraction.

We definitely have room for improving the search bar query language, as it currently does not support boolean logic and does not understand the difference between "_I want entries which contain element X and which has an element with atomicfaction > y" and the query "_I want entries which contain element X which itself has atomicfraction > Y". This is a subtle difference that is also not easy for users to understand.

The use cases you mention definitely seem very reasonable :+1: