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

Add func #29

Merged
merged 20 commits into from
Dec 1, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Deepcopy dict to avoid reference issue
FNTwin committed Nov 29, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 0197dd002feea4a0657b47c886393de0d26558ab
3 changes: 2 additions & 1 deletion src/openqdc/datasets/base.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
import pickle as pkl
from copy import deepcopy
from os.path import join as p_join
from typing import Dict, List, Optional, Union

@@ -560,7 +561,7 @@ def get_statistics(self, normalization: str = "formation", return_none: bool = T
Whether to return None if the statistics for the forces are not available, by default True
Otherwise, the statistics for the forces are set to 0.0
"""
stats = self._stats
stats = deepcopy(self._stats)
if len(stats) == 0:
raise StatisticsNotAvailableError(self.__name__)
if normalization not in POSSIBLE_NORMALIZATION: