Skip to content

Commit 23c59e1

Browse files
authored
add aliases to Arguments (#932)
fix #846.
1 parent 773ed37 commit 23c59e1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

source/train/argcheck.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def descrpt_se_a_args():
6060
Argument("rcut", float, optional = True, default = 6.0, doc = doc_rcut),
6161
Argument("rcut_smth", float, optional = True, default = 0.5, doc = doc_rcut_smth),
6262
Argument("neuron", list, optional = True, default = [10,20,40], doc = doc_neuron),
63-
Argument("axis_neuron", int, optional = True, default = 4, doc = doc_axis_neuron),
63+
Argument("axis_neuron", int, optional = True, default = 4, n_axis_neuron = ['n_axis_neuron'], doc = doc_axis_neuron),
6464
Argument("activation_function", str, optional = True, default = 'tanh', doc = doc_activation_function),
6565
Argument("resnet_dt", bool, optional = True, default = False, doc = doc_resnet_dt),
6666
Argument("type_one_side", bool, optional = True, default = False, doc = doc_type_one_side),
@@ -146,7 +146,7 @@ def fitting_ener():
146146
return [
147147
Argument("numb_fparam", int, optional = True, default = 0, doc = doc_numb_fparam),
148148
Argument("numb_aparam", int, optional = True, default = 0, doc = doc_numb_aparam),
149-
Argument("neuron", list, optional = True, default = [120,120,120], doc = doc_neuron),
149+
Argument("neuron", list, optional = True, default = [120,120,120], alias = ['n_neuron'], doc = doc_neuron),
150150
Argument("activation_function", str, optional = True, default = 'tanh', doc = doc_activation_function),
151151
Argument("precision", str, optional = True, default = 'float64', doc = doc_precision),
152152
Argument("resnet_dt", bool, optional = True, default = True, doc = doc_resnet_dt),
@@ -169,14 +169,14 @@ def fitting_polar():
169169
doc_seed = 'Random seed for parameter initialization of the fitting net'
170170

171171
return [
172-
Argument("neuron", list, optional = True, default = [120,120,120], doc = doc_neuron),
172+
Argument("neuron", list, optional = True, default = [120,120,120], alias = ['n_neuron'], doc = doc_neuron),
173173
Argument("activation_function", str, optional = True, default = 'tanh', doc = doc_activation_function),
174174
Argument("resnet_dt", bool, optional = True, default = True, doc = doc_resnet_dt),
175175
Argument("precision", str, optional = True, default = 'float64', doc = doc_precision),
176176
Argument("fit_diag", bool, optional = True, default = True, doc = doc_fit_diag),
177177
Argument("scale", [list,float], optional = True, default = 1.0, doc = doc_scale),
178178
Argument("diag_shift", [list,float], optional = True, default = 0.0, doc = doc_diag_shift),
179-
Argument("sel_type", [list,int,None], optional = True, doc = doc_sel_type),
179+
Argument("sel_type", [list,int,None], optional = True, alias = ['pol_type'], doc = doc_sel_type),
180180
Argument("seed", [int,None], optional = True, doc = doc_seed)
181181
]
182182

@@ -193,11 +193,11 @@ def fitting_dipole():
193193
doc_sel_type = 'The atom types for which the atomic dipole will be provided. If not set, all types will be selected.'
194194
doc_seed = 'Random seed for parameter initialization of the fitting net'
195195
return [
196-
Argument("neuron", list, optional = True, default = [120,120,120], doc = doc_neuron),
196+
Argument("neuron", list, optional = True, default = [120,120,120], alias = ['n_neuron'], doc = doc_neuron),
197197
Argument("activation_function", str, optional = True, default = 'tanh', doc = doc_activation_function),
198198
Argument("resnet_dt", bool, optional = True, default = True, doc = doc_resnet_dt),
199199
Argument("precision", str, optional = True, default = 'float64', doc = doc_precision),
200-
Argument("sel_type", [list,int,None], optional = True, doc = doc_sel_type),
200+
Argument("sel_type", [list,int,None], optional = True, alias = ['dipole_type'], doc = doc_sel_type),
201201
Argument("seed", [int,None], optional = True, doc = doc_seed)
202202
]
203203

0 commit comments

Comments
 (0)