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
10 changes: 8 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,14 @@ dpnegf/negf/check.ipynb
dpnegf/tests/data/test_negf/show.ipynb
dpnegf/tests/data/test_tbtrans/show.ipynb
# tutorial files
dpnegf/examples/graphene/negf_output_k20/self_energy/self_energy_leadL.h5
dpnegf/examples/graphene/negf_output_k20/self_energy/self_energy_leadR.h5
examples/graphene/negf_output_k20/self_energy/self_energy_leadL.h5
examples/graphene/negf_output_k20/self_energy/self_energy_leadR.h5
examples/hBN/negf_output_k20/self_energy/self_energy_leadL.h5
examples/hBN/negf_output_k20/self_energy/self_energy_leadR.h5
examples/hBN/negf_output_k50/self_energy/*
examples/hBN/negf_output_k70/self_energy/*



run_config.json
dpnegf/nnet/__pycache__/
Expand Down
1 change: 1 addition & 0 deletions docs/hands_on/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ A quick Example

.. toctree::
tutorial1_c_chain
tutorial2_2d_mat
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Confirm toctree target exists

Please confirm that docs/hands_on/tutorial2_2d_mat.rst (or matching path) is present; otherwise the Sphinx build will emit a “document not found” warning.

Run this to double-check the file is there:


🏁 Script executed:

#!/bin/bash
fd tutorial2_2d_mat.rst docs

Length of output: 0


🏁 Script executed:

#!/bin/bash
set -e
echo "Listing .rst files in docs/hands_on:"
fd -e rst docs/hands_on
echo
echo "Searching for 'tutorial2_2d_mat' in all .rst under docs:"
rg -l 'tutorial2_2d_mat' -g '*.rst' docs || true

Length of output: 394


🏁 Script executed:

#!/bin/bash
set -e
echo "Listing all .rst files in docs/hands_on:"
find docs/hands_on -maxdepth 1 -type f -name '*.rst' || echo "No .rst files found in docs/hands_on"

echo
echo "Searching for tutorial2_2d_mat.rst anywhere under docs:"
find docs -type f -name 'tutorial2_2d_mat.rst' || echo "tutorial2_2d_mat.rst not found"

Length of output: 121


Confirm toctree target exists
docs/hands_on/tutorial2_2d_mat.rst not found; add the missing file or update the toctree entry at docs/hands_on/index.rst:7 to reference an existing document.

🤖 Prompt for AI Agents
In docs/hands_on/index.rst around line 7 the toctree entry "tutorial2_2d_mat"
points to a non-existent file; either add a new file at
docs/hands_on/tutorial2_2d_mat.rst with the intended content, or update the
toctree entry to reference the correct existing document name/path (matching the
actual .rst filename without extension). After updating, ensure the referenced
file is committed and run a local Sphinx build to confirm the toctree resolves.

1,647 changes: 1,615 additions & 32 deletions docs/hands_on/tutorial2_2d_mat.ipynb

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions examples/MoS2/MoS2_orth.vasp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
MoS2
1.0
3.1912000179 0.0000000000 0.0000000000
0.0000000000 18.1270999908 0.0000000000
0.0000000000 0.0000000000 5.5272998810
Mo S
2 4
Cartesian
0.000000000 9.063549995 0.000000000
1.595600009 9.063549995 2.763649940
0.000000000 10.633718911 1.842414899
1.595600009 10.633718911 4.606064675
0.000000000 7.493380540 1.842414899
1.595600009 7.493380540 4.606064675
11 changes: 11 additions & 0 deletions examples/MoS2/POSCAR
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Mo S
1.0000000000000000
3.1911949999999996 0.0000000000000000 0.0000000000000000
-1.5955980000000001 2.7636560000000001 0.0000000000000000
-0.0000000000000000 -0.0000000000000000 18.1271099999999983
Mo S
1 2
Cartesian
0.0000000000000000 0.0000000000000000 9.0635549999999991
1.5955989289309997 0.9212177454480001 10.6337615224199986
1.5955989289309997 0.9212177454480001 7.4933484775799997
16 changes: 16 additions & 0 deletions examples/MoS2/extra_baseline/MoS_spds.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"common_options": {
"basis": {
"Mo": [
"5s",
"5p",
"4d"
],
"S": [
"3s",
"3p",
"d*"
]
}
}
}
93 changes: 93 additions & 0 deletions examples/MoS2/extra_baseline/input_templete.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
{
"common_options": {
"basis": {
"Mo": [
"5s",
"5p",
"4d"
],
"S": [
"3s",
"3p",
"d*"
]
},
"device": "cpu",
"dtype": "float32",
"overlap": true,
"seed": 3982377700
},
"train_options": {
"num_epoch": 2,
"batch_size": 1,
"optimizer": {
"lr": 0.01,
"type": "Adam"
},
"lr_scheduler": {
"type": "exp",
"gamma": 0.999
},
"loss_options": {
"train": {
"method": "eigvals",
"diff_on": false,
"eout_weight": 0.001,
"diff_weight": 0.01
}
},
"save_freq": 1,
"validation_freq": 10,
"display_freq": 100,
"ref_batch_size": 1,
"val_batch_size": 1,
"max_ckpt": 4
},
"model_options": {
"nnsk": {
"onsite": {
"method": "uniform"
},
"hopping": {
"method": "poly4pow",
"rs": {
"S-S": 5.66,
"S-Mo": 5.85,
"Mo-S": 5.85,
"Mo-Mo": 6.03
},
"w": 0.2
},
"soc": {},
"freeze": [
"overlap"
],
"push": false,
"std": 0.01,
"atomic_radius": "cov"
}
},
"data_options": {
"train": {
"root": "path/to/dataset",
"prefix": "prexfix_for_dataset",
"get_eigenvalues": true,
"type": "DefaultDataset",
"get_Hamiltonian": false
},
"validation": {
"root": "path/to/dataset",
"prefix": "prexfix_for_dataset",
"get_eigenvalues": true,
"type": "DefaultDataset",
"get_Hamiltonian": false
},
"reference": {
"root": "path/to/dataset",
"prefix": "prexfix_for_dataset",
"get_eigenvalues": true,
"type": "DefaultDataset",
"get_Hamiltonian": false
}
Comment on lines +71 to +91
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Point the template to the committed MoS₂ dataset

With root still set to "path/to/dataset" and the placeholder "prexfix_for_dataset", anyone trying to run this “baseline” straight from the repo will immediately hit a FileNotFoundError because the loader can’t locate the data you added under examples/MoS2/train/data. Let’s wire the template to that dataset (both for train/val/reference) so the example actually runs out of the box.

-            "root": "path/to/dataset",
-            "prefix": "prexfix_for_dataset",
+            "root": "../train/data",
+            "prefix": "kpath.0",

Repeat the same adjustment for the validation and reference sections.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"train": {
"root": "path/to/dataset",
"prefix": "prexfix_for_dataset",
"get_eigenvalues": true,
"type": "DefaultDataset",
"get_Hamiltonian": false
},
"validation": {
"root": "path/to/dataset",
"prefix": "prexfix_for_dataset",
"get_eigenvalues": true,
"type": "DefaultDataset",
"get_Hamiltonian": false
},
"reference": {
"root": "path/to/dataset",
"prefix": "prexfix_for_dataset",
"get_eigenvalues": true,
"type": "DefaultDataset",
"get_Hamiltonian": false
}
"train": {
"root": "../train/data",
"prefix": "kpath.0",
"get_eigenvalues": true,
"type": "DefaultDataset",
"get_Hamiltonian": false
},
"validation": {
"root": "../train/data",
"prefix": "kpath.0",
"get_eigenvalues": true,
"type": "DefaultDataset",
"get_Hamiltonian": false
},
"reference": {
"root": "../train/data",
"prefix": "kpath.0",
"get_eigenvalues": true,
"type": "DefaultDataset",
"get_Hamiltonian": false
}
🤖 Prompt for AI Agents
In examples/MoS2/extra_baseline/input_templete.json around lines 71-91 the
dataset paths are placeholders ("path/to/dataset" and "prexfix_for_dataset")
which will cause FileNotFoundError; update the "root" values to point to the
committed example dataset directory (examples/MoS2/train/data) and set the
"prefix" to the actual prefix used by those files for the train, validation, and
reference sections so the example runs out-of-the-box.

}
}
Loading