Skip to content

Commit

Permalink
Improve the help message for the one-step switch HTI case of parser_r…
Browse files Browse the repository at this point in the history
…un in hti.py (#76)

* fix hti's output of Helmholtz free energy for water

* correct error estimation: divide natoms in stead of np.sqrt(natoms)

* improve the help message of task_name of parser_run in hti.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Do not set default=one-step; further clarify help message

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
Yi-FanLi and pre-commit-ci[bot] authored Aug 6, 2024
1 parent 1183ca8 commit 642dad7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions dpti/hti.py
Original file line number Diff line number Diff line change
Expand Up @@ -1412,7 +1412,9 @@ def hti_phase_trans_analyze(job, jdata=None):
def run_task(task_dir, machine_file, task_name, no_dp=False):
if task_name == "00" or task_name == "01" or task_name == "02":
job_work_dir_ = glob.glob(os.path.join(task_dir, task_name + "*"))
assert len(job_work_dir_) == 1
assert (
len(job_work_dir_) == 1
), f"The task_name you entered is {task_name}. It indicates that you want to run tasks for step {task_name} of the two-step or three-step HTI. Please make sure that there is one and only one {task_name}.* directory in the hti task directory."
job_work_dir = job_work_dir_[0]
elif task_name == "one-step":
job_work_dir = task_dir
Expand Down Expand Up @@ -1538,7 +1540,9 @@ def add_module_subparsers(main_subparsers):
parser_run.add_argument("JOB", type=str, help="folder of the job")
parser_run.add_argument("machine", type=str, help="machine.json file for the job")
parser_run.add_argument(
"task_name", type=str, help="task name, can be 00, 01, or 02"
"task_name",
type=str,
help="task name, can be one-step, 00, 01, or 02. The task names 00, 01, and 02 are used for the two-step or three-step HTI.",
)
parser_run.add_argument(
"--no-dp", action="store_true", help="whether to use Deep Potential or not"
Expand Down

0 comments on commit 642dad7

Please sign in to comment.