From 88e26ea90e7ce5de39881a3ab00469687b56459e Mon Sep 17 00:00:00 2001 From: Han Wang Date: Wed, 21 Apr 2021 09:12:40 +0800 Subject: [PATCH 1/2] fix bug of using old name se_a, changed to se_e2_a --- deepmd/train/trainer.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/deepmd/train/trainer.py b/deepmd/train/trainer.py index 52d8e97cf8..62934b0faa 100644 --- a/deepmd/train/trainer.py +++ b/deepmd/train/trainer.py @@ -113,22 +113,22 @@ def _init_param(self, jdata): # elif fitting_type == 'wfc': # self.fitting = WFCFitting(fitting_param, self.descrpt) elif fitting_type == 'dipole': - if descrpt_type == 'se_a': + if descrpt_type == 'se_e2_a': self.fitting = DipoleFittingSeA(**fitting_param) else : - raise RuntimeError('fitting dipole only supports descrptors: se_a') + raise RuntimeError('fitting dipole only supports descrptors: se_e2_a') elif fitting_type == 'polar': # if descrpt_type == 'loc_frame': # self.fitting = PolarFittingLocFrame(fitting_param, self.descrpt) - if descrpt_type == 'se_a': + if descrpt_type == 'se_e2_a': self.fitting = PolarFittingSeA(**fitting_param) else : - raise RuntimeError('fitting polar only supports descrptors: loc_frame and se_a') + raise RuntimeError('fitting polar only supports descrptors: loc_frame and se_e2_a') elif fitting_type == 'global_polar': - if descrpt_type == 'se_a': + if descrpt_type == 'se_e2_a': self.fitting = GlobalPolarFittingSeA(**fitting_param) else : - raise RuntimeError('fitting global_polar only supports descrptors: loc_frame and se_a') + raise RuntimeError('fitting global_polar only supports descrptors: loc_frame and se_e2_a') else : raise RuntimeError('unknow fitting type ' + fitting_type) From a5a31a6b9ace9a220ff25c4abcfea4d46224ef93 Mon Sep 17 00:00:00 2001 From: Han Wang Date: Wed, 21 Apr 2021 10:29:06 +0800 Subject: [PATCH 2/2] fix bugs in UT --- source/tests/data_modifier/dipole.json | 2 +- source/tests/test_data_modifier_shuffle.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/tests/data_modifier/dipole.json b/source/tests/data_modifier/dipole.json index f53be905de..963a973223 100644 --- a/source/tests/data_modifier/dipole.json +++ b/source/tests/data_modifier/dipole.json @@ -4,7 +4,7 @@ "model":{ "type_map": ["O", "H"], "descriptor" :{ - "type": "se_a", + "type": "se_e2_a", "sel": [46, 92], "rcut_smth": 3.80, "rcut": 4.00, diff --git a/source/tests/test_data_modifier_shuffle.py b/source/tests/test_data_modifier_shuffle.py index 6476ac2a63..205a31e68d 100644 --- a/source/tests/test_data_modifier_shuffle.py +++ b/source/tests/test_data_modifier_shuffle.py @@ -134,7 +134,7 @@ def _setUp_jdata(self): "model":{ "type_map": ["A", "B", "C", "D", "E"], "descriptor" :{ - "type": "se_a", + "type": "se_e2_a", "sel": [50, 50, 50, 50, 50], "rcut_smth": 3.80, "rcut": 4.00,