We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 69b9093 commit 637692bCopy full SHA for 637692b
source/train/test.py
100755
100644
@@ -36,11 +36,18 @@ def test_ener (args) :
36
37
dp = DeepPot(args.model)
38
data = DeepmdData(args.system, args.set_prefix, shuffle_test = args.shuffle_test, type_map = dp.get_type_map())
39
+ data.add('energy', 1, atomic=False, must=False, high_prec=True)
40
+ data.add('force', 3, atomic=True, must=False, high_prec=False)
41
+ data.add('virial', 9, atomic=False, must=False, high_prec=False)
42
+ if dp.get_dim_fparam() > 0:
43
+ data.add('fparam', dp.get_dim_fparam(), atomic=False, must=True, high_prec=False)
44
+ if dp.get_dim_aparam() > 0:
45
+ data.add('aparam', dp.get_dim_aparam(), atomic=True, must=True, high_prec=False)
46
47
test_data = data.get_test ()
- numb_test = args.numb_test
48
natoms = len(test_data["type"][0])
49
nframes = test_data["box"].shape[0]
50
+ numb_test = args.numb_test
51
numb_test = min(nframes, numb_test)
52
53
coord = test_data["coord"][:numb_test].reshape([numb_test, -1])
0 commit comments