Skip to content

fix fp style variants #788

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions dpgen/generator/arginfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def fp_style_cp2k_args() -> List[Argument]:


def fp_style_variant_type_args() -> Variant:
doc_fp_style = 'The style of fp.'
doc_fp_style = 'Software for First Principles.'

return Variant("fp_style", [Argument("vasp", dict, fp_style_vasp_args()),
Argument("gaussian", dict,
Expand All @@ -271,18 +271,13 @@ def fp_style_variant_type_args() -> Variant:


def fp_args() -> List[Argument]:
doc_fp_style = 'Software for First Principles. Options include “vasp”, “pwscf”, “siesta” and “gaussian” up to now.'
doc_fp_task_max = 'Maximum of structures to be calculated in 02.fp of each iteration.'
doc_fp_task_min = 'Minimum of structures to be calculated in 02.fp of each iteration.'
doc_fp_accurate_threshold = 'If the accurate ratio is larger than this number, no fp calculation will be performed, i.e. fp_task_max = 0.'
doc_fp_accurate_soft_threshold = 'If the accurate ratio is between this number and fp_accurate_threshold, the fp_task_max linearly decays to zero.'
doc_fp_cluster_vacuum = 'If the vacuum size is smaller than this value, this cluster will not be choosen for labeling.'

return [
Argument('fp_style', dict, [],
[fp_style_variant_type_args()],
optional=False,
doc=doc_fp_style),
Argument("fp_task_max", int, optional=False, doc=doc_fp_task_max),
Argument("fp_task_min", int, optional=False, doc=doc_fp_task_min),
Argument("fp_accurate_threshold", float,
Expand All @@ -306,5 +301,5 @@ def run_jdata_arginfo() -> Argument:
return Argument("run_jdata",
dict,
sub_fields=basic_args() + data_args() + training_args() + fp_args(),
sub_variants=model_devi_args(),
sub_variants=model_devi_args() + [fp_style_variant_type_args()],
doc=doc_run_jdata)