Skip to content
Merged
Show file tree
Hide file tree
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
57 changes: 44 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,53 @@ For more details, see our papers:

## Installation

Installing **DPNEGF** is straightforward. We recommend using a virtual environment for dependency management.
DPNEGF runs inside the DeePTB virtual environment. We use [UV](https://github.com/astral-sh/uv) as the package manager.

- **Requirements**
- Git
- DeePTB(https://github.com/deepmodeling/DeePTB) ≥ 2.1.1

- **From Source**
1. Clone the repository:
```bash
git clone https://github.com/deepmodeling/dpnegf.git
```
2. Navigate to the root directory and install DPNEGF:
```bash
cd dpnegf
pip install .
```
- Python 3.9 to 3.12 (UV can auto-install if needed)
- [DeePTB](https://github.com/deepmodeling/DeePTB) ≥ 2.1.1

- **Step 1: Install UV** (if not already installed)
```bash
# On macOS and Linux
curl -LsSf https://astral.sh/uv/install.sh | sh

# Or using pip
pip install uv

# On Windows (PowerShell)
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
```

- **Step 2: Install DeePTB**
```bash
git clone https://github.com/deepmodeling/DeePTB.git
cd DeePTB
uv sync # Creates .venv and installs DeePTB with all dependencies
```
For GPU support, see [DeePTB README](https://github.com/deepmodeling/DeePTB#installation).

- **Step 3: Add DPNEGF to the DeePTB environment**
```bash
# Clone the DPNEGF repository (you can clone it anywhere)
git clone https://github.com/deepmodeling/dpnegf.git

# Still inside the DeePTB directory
uv add /path/to/dpnegf
```
Replace `/path/to/dpnegf` with the actual path to your cloned DPNEGF repository.
Comment on lines +43 to +51
Comment on lines +43 to +51

- **Run DPNEGF**
```bash
# UV automatically activates the environment
uv run dpnegf --help

# Or activate manually
source .venv/bin/activate # On Unix/macOS
.venv\Scripts\activate # On Windows
Comment on lines +59 to +60
dpnegf --help
```
## Test code

To ensure the code is correctly installed, please run the unit tests first:
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ readme = "README.md"
repository = "https://github.com/DeePTB-Lab/dpnegf"

[tool.poetry.dependencies]
dptb = ">=2.1.0"
python = ">=3.9, <=3.12.9"
pytest = ">=7.2.0"
pytest-order = "1.2.0"
Comment on lines 10 to 13
Expand Down