Skip to content

Commit

Permalink
Merge pull request #547 from amcadmus/devel
Browse files Browse the repository at this point in the history
fix bug of using old name se_a, changed to se_e2_a
  • Loading branch information
amcadmus committed Apr 21, 2021
2 parents 6f5e4c1 + a5a31a6 commit a5cb130
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions deepmd/train/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion source/tests/data_modifier/dipole.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion source/tests/test_data_modifier_shuffle.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit a5cb130

Please sign in to comment.