Closed mhellstr closed 1 year ago
This is a expected error since the system is an isolated H atom, and the pretrained CHGNet can not be used to calculate such scenarios.
If you palce two H atoms in the cell less than r_cutoff
apart, CHGNet will run with no error.
Note that CHGNet is based on graph neural networks which depend on message passing within 5A cutoff. As a result atoms without any neighbors in 5A will never enter the convolution functions in CHGNet. Another reason is that CHGNet is trained on condensed matter from Materials Project, which doesn't contain isolated-atom phases.
I appreciate that, but technically it would be helpful if the code didn't crash and instead the energy for an isolated atom is whatever the atomic reference is (and 0 forces). For example if one wants to calculate atomization energies (of diamond or other materials).
Here is a figure for a dissociation curve of H2, it would be nice to continue the graph to infinity:
Hi,
Sorry for the late reply. I personally think this will be quite dangerous feature to add. Extending the graph to infinitity might make the graph you showed look nice, but it's really not reliable considering there are certain long range interaction that CHGNet is not able to capture. While CHGNet is a universal potential based on one of the largest crystal database, it is important to decide whether it's reliable to apply to the system of interest. Again, our dataset is mainly based on condensed phases from Materials Project. Systematic benchmark needs to be done for reliable calculation on out-of-distribution tasks, like the long H - H bond you have shown. The error message is added here to avoid such use cases.
Related: https://github.com/materialsvirtuallab/matgl/pull/85 is an active PR and discussion about how to treat isolated atoms.
This is now further addressed in: https://github.com/CederGroupHub/chgnet/commit/a96d37a0dddcdd4ee38150aed4d09b7bbd886194
If I run a calculation on an isolated atom I get the ValueError below. This issue might happen for example during molecular dynamics.
Example:
Output: