Skip to content

Commit c1c56b0

Browse files
committed
fix: UT
1 parent 833cddb commit c1c56b0

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

tests/test_deepmd_mixed.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
import unittest
66
from glob import glob
77

8+
from dpdata.data_type import (
9+
Axis,
10+
DataType,
11+
)
12+
813
import numpy as np
914
from comp_sys import (
1015
CompLabeledMultiSys,
@@ -464,6 +469,27 @@ def setUp(self):
464469
self.f_places = 6
465470
self.v_places = 6
466471

472+
new_datatypes=[
473+
474+
DataType(
475+
"fparam",
476+
np.ndarray,
477+
shape=(Axis.NFRAMES, 2),
478+
required=False,
479+
),
480+
DataType(
481+
"aparam",
482+
np.ndarray,
483+
shape=(Axis.NFRAMES, Axis.NATOMS, 2),
484+
required=False,
485+
),
486+
]
487+
488+
for datatype in new_datatypes:
489+
dpdata.System.register_data_type(datatype)
490+
dpdata.LabeledSystem.register_data_type(datatype)
491+
492+
467493
# C1H4
468494
system_1 = dpdata.LabeledSystem(
469495
"gaussian/methane.gaussianlog", fmt="gaussian/log"

0 commit comments

Comments
 (0)