Integrate LOBSTER apps into crystal toolkit - #459
Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
StructureMoleculeComponent update
CohpAndDosComponent Features
Example rendered appTodos (Will be worked on once app layout is finalized))
Open questions and things to improve
|
|
@naik-aakash @JaGeo for this to be used on MP's site, we'll need any of the required outputs to be in the LobsterTaskDocument. The client will retrieve a LobsterTaskDocument and then use any fields, like (The client shouldn't depend on lobsterpy / need to call lobsterpy). Also to be clear, crystal toolkit shouldn't depend on emmet, but should use data that is available in the task document The method you implemented is OK to keep as a Can you double check that any data that is required for the app to work is included in the task document model? Any updates to the schema should be made against this branch in emmet (PR link) |
|
Hi @esoteric-ephemera, thanks for the suggestion. I will look at the pinned emmet PR and raise a PR if I find anything is missing. I will also try to make the changes in the client in the PR soon. |
| from crystal_toolkit.settings import SETTINGS | ||
|
|
||
|
|
||
| class CustomVasprun(Vasprun): |
There was a problem hiding this comment.
For this class, I would recommend against copying all of Vasprun.final_energy:
class CustomVasprun(Vasprun):
@property
def final_energy(self):
return float(super().final_energy)
|
Hi @esoteric-ephemera , have one question. So, now the plan is that LobsterPy is already run as part of taskdoc generation, and we simply use the outputs from the taskdoc and render the app? I did it this way because, in our initial discussions, it was emphasized that Postprocessing should not be part of Taskdoc, but rather that this app should handle it. Curious about how the workflow pipeline would be now. Once I start with this, I can better comment on the emmet PR. |
|
Any "heavy" post-processing, or post-processing which requires raw output files like vasprun.xml, should happen in the build process for your data. In the current pipeline, the lobster build would be Ex: all derived MP data is built from Light post-processing can occur in the app (e.g., the oxygen evolution graph drawing in the client) , but this should be Let me know if that makes sense! |
|
Hi @esoteric-ephemera , I made the changes are requested to directly work with taskdoc inputs. Made some tweaks and added some more options to enable more interactive anaylsis. Here is screenshot of updated layout
Also I have an additional code that can create such visualization using plotly and dash. Have attached a short video of it here Screencast.from.06.02.2026.17.03.33.webmI could not figure out to reuse the Let me know what you think? Also if this additional app is desired, It would be great if anyone can help with modifying |
|
Thanks, @naik-aakash! Looking good and perhaps @minhsueh has suggestions on how to modify / work with existing components We can discuss this more, but would this ideally be included as a separate property tab for a material, or in a standalone app? |
for more information, see https://pre-commit.ci
…y_graph with MoleculeGraph.from_empty_graph
…y_graph with MoleculeGraph.from_empty_graph
|
@naik-aakash My guess is that the LOBSTER analysis is taking longer than expected, causing the page to exceed the 30-second timeout. One suggestion before directly increasing the timeout: if you're able to reproduce the issue locally, try running the test in headed mode with python -m pytest --cov=crystal_toolkit --cov-report=xml --color=yes --webdriver Chrome --headed --slowmo 3000 crystal_toolkit/apps/examples/tests/test_lobsterenv.py |
Hi @minhsueh , I created a fresh new environment and installed the same dependencies as in the current CI workflow. It still seems to pass without any issues. The page seemed to load properly and navigate to the expected dropdown option "LobsterEnv" before running the assertions. No errors I could see. |
Seems now the test passed, not sure if it failed yesterday use to issues of github actions yesterday or now it passed cause of my changes here.. |
|
@naik-aakash Thanks for the test fix. I reran the test and it failed twice (see Attempt # 2 and # 3), but the failure doesn't appear to be related to lobsterenv.
I'll merge this PR. |
Hi @minhsueh , I have updated the |
minhsueh
left a comment
There was a problem hiding this comment.
LGTM! Thanks! @naik-aakash @JaGeo
|
Congrats @naik-aakash and thanks @minhsueh !! |



This is the PR to integrate LOBSTER into the Crystal Toolkit.
See below for a detailed explanation of the PR by @naik-aakash !