Skip to content

Commit

Permalink
Fix: ZBL test path (deepmodeling#3757)
Browse files Browse the repository at this point in the history
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **Tests**
- Updated the path configuration for the `use_srtab` key in test
settings to enhance reliability by changing from a relative path to an
absolute path.
- Imported `os` module and defined `CUR_DIR` as the directory of the
current file.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
anyangml and pre-commit-ci[bot] committed May 7, 2024
1 parent 6c715d1 commit 6f06adb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion source/tests/pt/model/test_permutation.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# SPDX-License-Identifier: LGPL-3.0-or-later
import copy
import os
import unittest

import torch
Expand All @@ -14,6 +15,8 @@
env,
)

CUR_DIR = os.path.dirname(__file__)

dtype = torch.float64

model_se_e2_a = {
Expand Down Expand Up @@ -60,7 +63,7 @@

model_zbl = {
"type_map": ["O", "H", "B"],
"use_srtab": "source/tests/pt/model/water/data/zbl_tab_potential/H2O_tab_potential.txt",
"use_srtab": f"{CUR_DIR}/water/data/zbl_tab_potential/H2O_tab_potential.txt",
"smin_alpha": 0.1,
"sw_rmin": 0.2,
"sw_rmax": 1.0,
Expand Down

0 comments on commit 6f06adb

Please sign in to comment.