Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 23, 2024
1 parent c9e47a3 commit 28ef352
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion deepmd/pt/utils/stat.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
to_torch_tensor,
)
from deepmd.utils.out_stat import (
compute_stats_do_not_distinguish_types,
compute_stats_from_atomic,
compute_stats_from_redu,
compute_stats_do_not_distinguish_types,
)
from deepmd.utils.path import (
DPPath,
Expand Down
14 changes: 7 additions & 7 deletions doc/model/train-fitting-property.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@ from dpdata.data_type import (
DataType,
)

property_name = "band_prop" #fittng_net/property_name
task_dim = 3 #fitting_net/task_dim
property_name = "band_prop" # fittng_net/property_name
task_dim = 3 # fitting_net/task_dim

# register datatype
datatypes = [
DataType(
property_name,
np.ndarray,
shape=(Axis.NFRAMES,task_dim),
shape=(Axis.NFRAMES, task_dim),
required=False,
),
]
Expand All @@ -90,15 +90,15 @@ datatypes.extend(
DataType(
"energies",
np.ndarray,
shape=(Axis.NFRAMES,1),
shape=(Axis.NFRAMES, 1),
required=False,
),
DataType(
"forces",
np.ndarray,
shape=(Axis.NFRAMES, Axis.NATOMS, 1),
required=False,
)
),
]
)

Expand All @@ -107,10 +107,10 @@ for datatype in datatypes:
dpdata.LabeledSystem.register_data_type(datatype)

ls = dpdata.MultiSystems()
frame = dpdata.System("POSCAR",fmt="vasp/poscar")
frame = dpdata.System("POSCAR", fmt="vasp/poscar")
labelframe = dpdata.LabeledSystem()
labelframe.append(frame)
labelframe.data[property_name] = np.array([[-0.236,0.056,0.292]],dtype=np.float32)
labelframe.data[property_name] = np.array([[-0.236, 0.056, 0.292]], dtype=np.float32)
ls.append(labelframe)
ls.to_deepmd_npy_mixed("deepmd")
```
Expand Down

0 comments on commit 28ef352

Please sign in to comment.