materialsvirtuallab / matgl

Graph deep learning library for materials
BSD 3-Clause "New" or "Revised" License
233 stars 57 forks source link

Ensure the `energy` property is type `float` in ASE calculator #203

Closed Andrew-S-Rosen closed 7 months ago

Andrew-S-Rosen commented 7 months ago

Closes #202 (see issue report for additional details).

Summary: I corrected the type for the energy property in the ASE calculator interface, such as when doing atoms.get_potential_energy() or fetching the property directly from atoms.calc.results["energy"]. The ASE standard is that it is type float, but it is an NDArray of length 1 in main.

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (9a54615) 98.59% compared to head (c031b09) 98.59%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #203 +/- ## ======================================= Coverage 98.59% 98.59% ======================================= Files 28 28 Lines 1927 1927 ======================================= Hits 1900 1900 Misses 27 27 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

shyuep commented 7 months ago

Thanks!