Problem with creating a project on MPContribs

Hello,

I’ve tried making a project on MPContribs (using the new website) to contribute our results. The project seems to have been created as I see it on my dashboard, but when I try to open it, it does not open and keeps loading. I keep seeing the green line going across the screen. I’ve tried yesterday and today. I’m not sure if the project got created properly since when I was creating it, I didn’t get any confirmation message.

Thanks,

Jakub

Hi Jakub,

thanks for reporting the issue. We’ll look into what’s causing the issue in the new explorer. In the meantime, you can revert back to using the previous interface at MPContribs

Thanks
Patrick

Thank you, this works fine. I didn’t realize it’s still possible to use the old website for this.

Ok great! Yes, I should have mentioned that the old interface will stay available until we’re confident that most issues and missing functionality with the new one have been ironed out. Both interfaces connect to the same database in the backend.

I’ve encountered a different problem. I’ve tried appending a table and it is not plotting properly. On the Materials Project site it gives the error “Can’t display table: line() got an unexpected keyword argument ‘id’” and it shows only the table, not the plot. The problem seems to be with the ‘id’ keyword in attrs of the DataFrame that gets added automatically.

At first I thought this is a problem with my formatting, but I’ve tried a different table that’s displaying properly on the website and I actually get the same problem when running it on my computer:

I download the table using t = client.get_table("600b713104f51b4a4e905f61")
t.plot() works fine, but t.dislay() gives the same error.

Good catch! I left myself a note in the code in the past about this bug but never got around to fix it :frowning: I just released mpcontribs-client==5.4.3 with the bugfix. We are in the process of re-deploying our services, so the graphs should also start showing in the MPContribs interfaces sometime next week.

FYI you can set axis titles, graph titles, table name, and legend title on the DataFrame to control some aspects of how the table is displayed through plotly.express:

import pandas as pd

df = pd.DataFrame(data={
    "Energy": [1, 2, 3], "XAS": [4, 5, 6], "XMCD": [3, 2, 1]
})
df.set_index("Energy", inplace=True)
df.index.name = "Energy [eV]"  # x-axis title
df.columns.name = "spectral type" # legend title
df.attrs["name"] = "Fe-XAS/XMCD"  # table name
df.attrs["title"] = "XAS and XMCD Spectra for Fe"  # graph title
df.attrs["labels"] = {"value": "a.u."}  # y-axis title

Use the following snippet to preview the graph that MPContribs would display.

from mpcontribs.client import Table

table = Table(df)
table.attrs = df.attrs
table.display()

Thanks. It now works fine on my computer.

How would I go about making the data public? I’ve now uploaded a couple hundred calculations. We have about 2800 in total.

Wonderful! I approved your project to upload more than 500 contributions. You can make your project public using client.make_public().