CederGroupHub / chgnet

Pretrained universal neural network potential for charge-informed atomistic modeling https://chgnet.lbl.gov
https://doi.org/10.1038/s42256-023-00716-3
Other
226 stars 61 forks source link

Crystaltoolkit Relaxation Viewer #14

Closed janosh closed 1 year ago

janosh commented 1 year ago

This PR adds the 2nd example notebook that showcases how to visualize atom positions and energy of a structure relaxation over the course of a CHGNet relaxation in a Plotly Dash app built with Crystal Toolkit.

Here's a screen recording of what the Dash app looks like in action.

https://user-images.githubusercontent.com/30958850/226071804-c9015f22-d0dd-46a7-85d4-ae4033635723.mp4

Something seems to be going wrong with the relaxation though. @BowenD-UCB Maybe you can take a look what's happening?

janosh commented 1 year ago

Sorry about the noise here. I should stop opening unfinished PRs when I'm tired.

The problem was I was reconstructing pymatgen Structures from the TrajectoryObserver's atom positions which are Cartesian. pymatgen by default interprets coords as fractional. Simple fix.

Now the relaxation behavior is very good. CHGNet finds its way to sensible atom configurations even if you heavily scramble the structure.

https://user-images.githubusercontent.com/30958850/226144566-302cc689-2caa-498e-9429-53e771aee0eb.mp4