@@ -13,22 +13,50 @@ For more details, see our papers:
1313
1414## Installation
1515
16- Installing ** DPNEGF** is straightforward. We recommend using a virtual environment for dependency management .
16+ DPNEGF runs inside the DeePTB virtual environment. We use [ UV ] ( https://github.com/astral-sh/uv ) as the package manager .
1717
1818- ** Requirements**
1919 - Git
20- - DeePTB(https://github.com/deepmodeling/DeePTB ) ≥ 2.1.1
21-
22- - ** From Source**
23- 1 . Clone the repository:
24- ``` bash
25- git clone https://github.com/deepmodeling/dpnegf.git
26- ```
27- 2. Navigate to the root directory and install DPNEGF:
28- ` ` ` bash
29- cd dpnegf
30- pip install .
31- ` ` `
20+ - Python 3.9 to 3.12 (UV can auto-install if needed)
21+ - [ DeePTB] ( https://github.com/deepmodeling/DeePTB ) ≥ 2.1.1
22+
23+ - ** Step 1: Install UV** (if not already installed)
24+ ``` bash
25+ # On macOS and Linux
26+ curl -LsSf https://astral.sh/uv/install.sh | sh
27+
28+ # Or using pip
29+ pip install uv
30+
31+ # On Windows (PowerShell)
32+ powershell -c " irm https://astral.sh/uv/install.ps1 | iex"
33+ ```
34+
35+ - ** Step 2: Install DeePTB**
36+ ``` bash
37+ git clone https://github.com/deepmodeling/DeePTB.git
38+ cd DeePTB
39+ uv sync # Creates .venv and installs DeePTB with all dependencies
40+ ```
41+ For GPU support, see [ DeePTB README] ( https://github.com/deepmodeling/DeePTB#installation ) .
42+
43+ - ** Step 3: Add DPNEGF to the DeePTB environment**
44+ ``` bash
45+ # Still inside the DeePTB directory
46+ uv add /path/to/dpnegf
47+ ```
48+ Replace ` /path/to/dpnegf ` with the actual path to your cloned DPNEGF repository.
49+
50+ - ** Run DPNEGF**
51+ ``` bash
52+ # UV automatically activates the environment
53+ uv run dpnegf --help
54+
55+ # Or activate manually
56+ source .venv/bin/activate # On Unix/macOS
57+ .venv\S cripts\a ctivate # On Windows
58+ dpnegf --help
59+ ```
3260## Test code
3361
3462To ensure the code is correctly installed, please run the unit tests first:
0 commit comments