Skip to content

Commit b60f3a8

Browse files
committed
fix bug in argcheck
1 parent 134b36a commit b60f3a8

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

deepmd/utils/argcheck.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@
5555
doc_dos = "Fit a density of states model. The total density of states / site-projected density of states labels should be provided by `dos.npy` or `atom_dos.npy` in each data system. The file has number of frames lines and number of energy grid columns (times number of atoms in `atom_dos.npy`). See `loss` parameter."
5656
doc_dipole = "Fit an atomic dipole model. Global dipole labels or atomic dipole labels for all the selected atoms (see `sel_type`) should be provided by `dipole.npy` in each data system. The file either has number of frames lines and 3 times of number of selected atoms columns, or has number of frames lines and 3 columns. See `loss` parameter."
5757
doc_polar = "Fit an atomic polarizability model. Global polarizazbility labels or atomic polarizability labels for all the selected atoms (see `sel_type`) should be provided by `polarizability.npy` in each data system. The file with has number of frames lines and 9 times of number of selected atoms columns, or has number of frames lines and 9 columns. See `loss` parameter."
58+
# modifier
59+
doc_dipole_charge = "Use WFCC to model the electronic structure of the system. Correct the long-range interaction."
5860

5961

6062
def list_to_doc(xx):
@@ -1782,6 +1784,10 @@ def fitting_variant_type_args():
17821784

17831785

17841786
# --- Modifier configurations: --- #
1787+
modifier_args_plugin = ArgsPlugin()
1788+
1789+
1790+
@modifier_args_plugin.register("dipole_charge", doc=doc_dipole_charge)
17851791
def modifier_dipole_charge():
17861792
doc_model_name = "The name of the frozen dipole model file."
17871793
doc_model_charge_map = f"The charge of the WFCC. The list length should be the same as the {make_link('sel_type', 'model[standard]/fitting_net[dipole]/sel_type')}. "
@@ -1802,14 +1808,9 @@ def modifier_dipole_charge():
18021808

18031809
def modifier_variant_type_args():
18041810
doc_modifier_type = "The type of modifier."
1805-
doc_dipole_charge = "Use WFCC to model the electronic structure of the system. Correct the long-range interaction."
18061811
return Variant(
18071812
"type",
1808-
[
1809-
Argument(
1810-
"dipole_charge", dict, modifier_dipole_charge(), doc=doc_dipole_charge
1811-
),
1812-
],
1813+
modifier_args_plugin.get_all_argument(),
18131814
optional=False,
18141815
doc=doc_modifier_type,
18151816
)

0 commit comments

Comments
 (0)