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

New example app: visualize structure relaxation #323

Merged
merged 3 commits into from
Mar 23, 2023
Merged

Conversation

janosh
Copy link
Member

@janosh janosh commented Mar 19, 2023

Might even be useful on the MP website for investigating unusual relaxations like mp-1033715 in this screen recording. Curious to know your thoughts @mkhorton.

Screen.Recording.2023-03-18.at.19.04.03.mp4

I originally built this to inspect relaxations from ML IAPs like M3GNet and CHGNet (related PR CederGroupHub/chgnet#14) but then thought this would make a good example app too.

@janosh janosh added the docs Documentation, examples, user guides label Mar 19, 2023
@mkhorton
Copy link
Member

mkhorton commented Mar 21, 2023

I agree, this is useful. Could be added to the TaskDocument component in #313 even.

I will say that the longer-term goal was to support this via a Trajectory component which would render the Trajectory object obtainable from e.g. a vasprun or the API, and a lot of the groundwork is in place for this -- namely, animation support in the Scene renderer via Three.js.

This would be a lot faster, since geometries etc. are generated just once, and then it loops through a set of displacements, so it becomes much more responsive.

However, in the interim, I think this solution is great--it works today! so in that sense it is the best solution :)

@janosh
Copy link
Member Author

janosh commented Mar 21, 2023

I agree, this is useful. Could be added to the TaskDocument component in #313 even.

Good idea! Are there some preliminary screenshots of the TaskDocument UI somewhere to get a sense of what it will look like?

This would be a lot faster, since geometries etc. are generated just once, and then it loops through a set of displacements, so it becomes much more responsive.

I was thinking about that as well. Definitely makes sense. This PR constructs a list of structures one for each step which is needlessly expensive.

@janosh
Copy link
Member Author

janosh commented Mar 23, 2023

I added the normed force averaged over atoms to the relaxation plot as a secondary y-axis and cleaned up the code. The app now looks like this:

Screenshot 2023-03-22 at 19 31 43

@janosh janosh enabled auto-merge (squash) March 23, 2023 02:35
@janosh janosh disabled auto-merge March 23, 2023 02:35
@janosh janosh merged commit e5f91d2 into main Mar 23, 2023
@janosh janosh deleted the ionic-steps-app branch March 23, 2023 02:36
@mkhorton
Copy link
Member

mkhorton commented Apr 2, 2023

Good idea! Are there some preliminary screenshots of the TaskDocument UI somewhere to get a sense of what it will look like?

@janosh yes! The Materials Project "task detail" pages were intended as a proof-of-concept for this component. Changing it to a general TaskDocument component was considered beneficial since it would allow re-use of the component in e.g. an atomate2 UI or in other contexts.

@janosh
Copy link
Member Author

janosh commented Apr 2, 2023

Oh cool! I wasn't even aware these exist. For reference: https://materialsproject.org/materials/mp-1033715/tasks/mp-1033715

Perhaps the convergence graph should have the option to toggle between showing electronic and ionic steps as it can be hard to read for long trajectories. @mkhorton I'll create a tracking issue for that.

Screenshot 2023-04-02 at 09 20 14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation, examples, user guides
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants