diff --git a/README.md b/README.md
index 27559351..08c3883b 100644
--- a/README.md
+++ b/README.md
@@ -1,417 +1,38 @@
+
+
+ DeePTB
+
+
+
+
+
+
+
+
+
+
+
+
+
+## About DeePTB
+
**DeePTB** is a Python package that adopts the deep learning method to construct electronic tight-binding (TB) Hamiltonians using a minimal basis.
-With a neural network environmental correction scheme, **DeePTB** can efficiently predict TB Hamiltonians for large-size unseen structures with *ab initio* accuracy after training with *ab initio* eigenvalues from smaller sizes.
-This feature enables efficient simulations of large-size systems under structural perturbations such as strain, which is crucial for semiconductor band gap engineering. Furthermore, DeePTB offers the ability to perform efficient and accurate finite temperature simulations, incorporating both atomic and electronic behaviour through the integration of molecular dynamics (MD). Another significant advantage is that using eigenvalues as the training labels makes DeePTB much more flexible and independent of the choice of various bases (PW or LCAO) and the exchange-correlation (XC) functionals (LDA, GGA and even HSE) used in preparing the training labels. In addition, **DeePTB** can handle systems with strong spin-orbit coupling (SOC) effects.
+Trained on smaller structures, **DeePTB** can efficiently predict TB Hamiltonians for large-size unseen structures. This feature enables efficient simulations of large-size systems under structural perturbations. Furthermore, DeePTB offers the ability to perform efficient and accurate finite temperature simulations, incorporating both atomic and electronic behavior through the integration of molecular dynamics (MD). Another significant advantage is that **DeePTB** is independent of the choice of various bases (PW or LCAO) and the exchange-correlation (XC) functionals (LDA, GGA, and even HSE) used in preparing the training labels. In addition, **DeePTB** can handle systems with strong spin-orbit coupling (SOC) effects.
These capabilities make **DeePTB** adaptable to various research scenarios, extending its applicability to a wide range of materials and phenomena and offering a powerful and versatile tool for accurate and efficient simulations.
See more details in our DeePTB paper: [arXiv:2307.04638](http://arxiv.org/abs/2307.04638)
-
-In summary, **DeePTB** offers the following key features:
-- Slater-Koster-like parameterization with customizable radial dependence.
-- Orthogonal basis tight-binding Hamiltonian with a customizable number of basis and bond neighbours.
-- Incorporation of local atomic and bond environmental corrections using symmetry-preserving neural networks.
-- Utilization of an efficient gradient-based fitting algorithm based on autograd implementation.
-- Flexibility and independence from the choice of bases and XC functionals used in preparing the training labels.
-- Ability to handle systems with strong spin-orbit coupling effects.
-- Efficient and accurate finite temperature simulations through integration with molecular dynamics.
-
-
-
-
-- [1. **installation**](#1-installation)
- - [**From Source**](#from-source)
- - [**From Pypi**](#from-pypi)
- - [**From Conda**](#from-conda)
-- [2. **Getting Started.**](#2-getting-started)
- - [2.1 **Data**](#21-data)
- - [**Bandinfo**](#bandinfo)
- - [2.2 **input json**](#22-input-json)
- - [2.3 **Training**](#23-training)
- - [2.4 **Testing**](#24-testing)
- - [2.5 **Processing**](#25-processing)
-- [3. **Example: hBN.**](#3-example-hbn)
-- [4. **Gallary**](#4-gallary)
- - [Density of States (DOS)](#density-of-states-dos)
- - [Fermi Surface of Bulk Silicon](#fermi-surface-of-bulk-silicon)
- - [Fermi Velocity of Bulk Silicon](#fermi-velocity-of-bulk-silicon)
- - [Large-scale simulations](#large-scale-simulations)
-
-
-# 1. **installation**
-## **From Source**
-If you are installing from source, you will need:
-
-- Python 3.8 or later
-- torch 1.13.0 or later, following the instruction on [PyTorch: Get Started](https://pytorch.org/get-started/locally) if GPU support is required, otherwise this can be installed with the building procedure.
-- ifermi (optional, install only when 3D fermi-surface plotting is needed.)
-
-First clone or download the source code from the website.
-Then, located in the repository root and running
-
-```bash
-cd path/deeptb
-pip install .
-```
-## **From Pypi**
-
-## **From Conda**
-
-
-
-# 2. **Getting Started.**
-
-## 2.1 **Data**
-The dataset of one structure is recommended to prepare in the following format:
-```
-data/
--- set.x
--- -- eigs.npy # numpy array of shape [num_frame, num_kpoint, num_band]
--- -- kpoints.npy # numpy array of shape [num_kpoint, 3]
--- -- xdat.traj # ase trajectory file with num_frame
--- -- bandinfo.json # defining the training objective of this bandstructure
-```
-One should prepare the **atomic structures** and **electronic band structures**. The **atomic structures** data is in ASE trade binary format, where each structure is stored using an **Atom** class defined in ASE package. The **band structures** data contains the kpoints list and eigenvalues in the binary format of npy. The shape of kpoints data is **[num_kpoint,3]** and eigenvalues is **[num_frame,nk,nbands]**. nsnaps is the number of snapshots, nk is the number of kpoints and nbands is the number of bands.
-
-### **Bandinfo**
-
-`bandinfo.json` defines the settings of the training objective of each structure, basicly you can have specific settings for different structures, which enables flexible training objectives for various structures with different atom numbers and atom types.
-
-The **bandinfo.json** file looks like this:
-```bash
-{
- "band_min": 0,
- "band_max": 4,
- "emin": null, # minimum of fitting energy window
- "emax": null, # maximum of fitting energy window
- "weight": [1] # optional, indicating the weight for each band separately
-}
-```
-**note:** The `0` energy point is located at the lowest energy eigenvalues of the data files, to generalize bandstructure data compute by different DFT packages.
-
-## 2.2 **input json**
-**DeePTB** provides input config templates for quick setup. User can run:
-```bash
-dptb config [-full]
-```
-The template config file will be generated at the path `./input.json`.
-For the full document about the input parameters, we refer to the detail [document](https://deeptb-doc.readthedocs.io/en/latest/index.html). For now, we only need to consider a few vital parameters that can setup the training:
-
-```json
-"common_options": {
- "onsitemode": "none",
- "bond_cutoff": 3.2,
- "atomtype": ["A","B"],
- "proj_atom_anglr_m": {
- "A": ["2s","2p"],
- "B": ["2s","2p"]
- }
-}
-```
-We can get the bond cutoff by `DeePTB`'s bond analysis function, using:
-```bash
-dptb bond [[-c] ] [[-acc] ]
-```
-
-```json
-"model_options": {
- "skfunction": {
- "sk_cutoff": 3.5,
- "sk_decay_w": 0.3,
- }
-}
-```
-
-```json
-"data_options": {
- "use_reference": true,
- "train": {
- "batch_size": 1,
- "path": "./data",
- "prefix": "set"
- },
- "validation": {
- "batch_size": 1,
- "path": "./data",
- "prefix": "set"
- },
- "reference": {
- "batch_size": 1,
- "path": "./data",
- "prefix": "set"
- }
-}
-```
-
-## 2.3 **Training**
-When data and input config file is prepared, we are ready to train the model.
-To train a neural network parameterized Slater-Koster Tight-Binding model (**nnsk**) with Gradient-Based Optimization method, we can run:
-```bash
-dptb train -sk [[-o] ] [[-i|-r] ]
-```
-For training an environmental dependent Tight-Binding model (**dptb**), the suggested procedure is first to train a **nnsk** model, and use environment dependent neural network as a correction with the command **"-crt"** as proposed in our paper: xxx:
-```bash
-dptb train -crt [[-i|-r] ] [[-o] ]
-```
-
-## 2.4 **Testing**
-After the model is converged, the testing function can be used to do the model test or compute the eigenvalues for other analyses.
-
-Test config is just attained by a little modification of the train config.
-Delete the `train_options` since it is not useful when testing the model. And we delete all lines contained in `data_options`, and add the `test` dataset config:
-```json
-"test": {
- "batch_size": 1,
- "path": "./data", # dataset path
- "prefix": "set" # prefix of the data folder
-}
-```
-if test **nnsk** model, we can run:
-```bash
-dptb test -sk -i [[-o] ]
-```
-if test **dptb** model, we can run:
-```bash
-dptb test -crt -i [[-o] ]
-```
-## 2.5 **Processing**
-**DeePTB** integrates multiple post-processing functionalities in `dptb run` command, including:
-- band structure plotting
-- density of states plotting
-- fermi surface plotting
-- slater-koster parameter transcription
-
-Please see the template config file in `examples/hBN/run/`, and the running command is:
-```bash
-dptb run [-sk] [[-o] ] -i [[-crt] ]
-```
-
-For detailed documents, please see our [Document page](https://deeptb-doc.readthedocs.io/en/latest/index.html).
-
-# 3. **Example: hBN.**
-hBN is a binary compound made of equal numbers of boron (B) and nitrogen (N), we present this as a quick hands-on example. The prepared files are located in:
-```
-deeptb/examples/hBN/
--- data/kpath.0/
--- -- bandinfo.json
--- -- xdat.traj
--- -- kpoints.npy
--- -- eigs.npy
--- run/
--- input_short.json
-```
-The ```input_short.json``` file contains the least number of parameters that are required to start training the **DeePTB** model. ```data``` folder contains the bandstructure data ```kpath.0```, where another important configuration file ```bandinfo.json``` is located.
-
-```bash
-cd deeptb/examples/hBN/data
-# to see the bond length
-dptb bond struct.vasp
-# output:
-Bond Type 1 2 3 4 5
-------------------------------------------------------------------------
- N-N 2.50 4.34 5.01
- N-B 1.45 2.89 3.82 5.21 5.78
- B-B 2.50 4.34 5.01
-```
-Having the data file and input parameter, we can start training our first **DeePTB** model, the first step using the parameters defined in ```input_short.json```:
-Here list some important parameters:
-```json
- "common_options": {
- "onsitemode": "none",
- "bond_cutoff": 1.6,
- }
-
- "proj_atom_anglr_m": {
- "N": [
- "2s",
- "2p"
- ],
- "B": [
- "2s",
- "2p"
- ]
- }
-```
-The ```onsitemode``` is set to ```none``` which means we do not use onsite correction. The ```bond_cutoff``` is set to ```1.6``` which means we use the 1st nearest neighbour for bonding. The ```proj_atom_anglr_m``` is set to ```2s``` and ```2p``` which means we use $s$ and $p$ orbitals as basis.
-
-using the command to train the first model:
-```bash
-cd deeptb/examples/hBN
-dptb train -sk input_short.json -o ./first
-```
-Here ``-sk`` indicate to fit the sk parameters, and ``-o`` indicate the output directory. During the fitting procedure, we can see the loss curve of hBN is decrease consistently. When finished, we get the fitting results in folders ```first```:
-```shell
-first/
-|-- checkpoint
-| |-- best_nnsk_b1.600_c1.600_w0.300.json
-| |-- best_nnsk_b1.600_c1.600_w0.300.pth
-| |-- latest_nnsk_b1.600_c1.600_w0.300.json
-| `-- latest_nnsk_b1.600_c1.600_w0.300.pth
-|-- input_short.json
-|-- log
-| `-- log.txt
-`-- train_config.json
-```
-Here checkpoint saves our fitting files, which best indicate the one in the fitting procedure which has the lowest validation loss. The latest is the most recent results.
-we can plot the fitting bandstructure as:
-```bash
-dptb run -sk band.json -i ./first/checkpoint/best_nnsk_b1.600_c1.600_w0.300.pth -o ./band
-```
-``-i`` states initialize the model from the checkpoint file `./first/checkpoint/best_nnsk_b1.600_c1.600_w0.300.pth`. results will be saved in the directory `band`:
-```
-band/
--- log/
--- -- log.txt
--- results/
--- -- band.png
--- -- bandstructure.npy
-```
-Where `band.png` is the band structure of the trained model. Which looks like this:
-
-
-
-
-It shows that the fitting has learned the rough shape of the bandstructure, but not very accurate. We can further improve the accuracy by incorporating more features of our code, for example, the onsite correction. There are two kinds of onsite correction supported: `uniform` or `strain`. We use `strain` for now to see the effect. Now change the `input_short.json` by the parameters:
-```json
- "common_options": {
- "onsitemode": "strain",
- "bond_cutoff": 1.6,
- }
- "train_options": {
- "num_epoch": 800,
- }
-```
-see the input file `hBN/reference/2.strain/input_short.json` for detail. Then we can run the training again:
-```bash
-dptb train -sk input_short.json -o ./strain -i ./first/checkpoint/best_nnsk_b1.600_c1.600_w0.300.pth
-```
-After the training is finished, you can get the strain folder with:
-```shell
-strain
-|-- checkpoint
-| |-- best_nnsk_b1.600_c1.600_w0.300.json
-| |-- best_nnsk_b1.600_c1.600_w0.300.pth
-| |-- latest_nnsk_b1.600_c1.600_w0.300.json
-| `-- latest_nnsk_b1.600_c1.600_w0.300.pth
-|-- log
-| `-- log.txt
-`-- train_config.json
-```
-plot the result again:
-```bash
-dptb run -sk band.json -i ./strain/checkpoint/best_nnsk_b1.600_c1.600_w0.300.pth -o ./band
-```
-
-
-
-
-It looks ok, we can further improve the accuracy by adding more neighbours, and training for a longer time. We can gradually increase the `sk_cutoff` from 1st to 3rd neighbour. change the `input_short.json` by the parameters:
-```json
- "common_options": {
- "onsitemode": "strain",
- "bond_cutoff": 3.6,
- }
- "train_options": {
- "num_epoch": 2000,
- }
- "model_options": {
- "skfunction": {
- "sk_cutoff": [1.6,3.6],
- "sk_decay_w": 0.3,
- }
- }
-```
-This means that we use up to 3rd nearest neighbour for bonding, and we train for 2000 epochs. see the input file `hBN/reference/3.varycutoff/input_short.json` for detail. Then we can run the training again:
-```bash
-dptb train -sk input_short.json -o ./varycutoff -i ./strain/checkpoint/best_nnsk_b1.600_c1.600_w0.300.pth
-```
-
-After the training is finished, you can get the strain folder with:
-```shell
-varycutoff
-|-- checkpoint
-| |-- best_nnsk_b3.600_c1.600_w0.300.json
-| |-- best_nnsk_b3.600_c1.600_w0.300.pth
-| |-- ... ...
-| |-- latest_nnsk_b3.600_c3.599_w0.300.json
-| `-- latest_nnsk_b3.600_c3.599_w0.300.pth
-|-- log
-| `-- log.txt
-`-- train_config.json
-```
-We finally get the `latest_nnsk_b3.600_c3.599_w0.300.pth` with more neighbours.
-plot the result again:
-```bash
-dptb run -sk band.json -i ./varycutoff/checkpoint/latest_nnsk_b3.600_c3.599_w0.300.pth -o ./band
-```
-
-
-
-
-We can again increase more training epochs, using the larger cutoff checkpoint, and change the input using
-```json
- "train_options": {
- "num_epoch": 10000,
- "optimizer": {"lr":1e-3},
- "lr_scheduler": {
- "type": "exp",
- "gamma": 0.9995
- }
- }
- "model_options": {
- "skfunction": {
- "sk_cutoff": 3.6,
- "sk_decay_w": 0.3
- }
- }
-```
-We can get a better fitting result:
-
-
-
-
-Now you have learnt the basis use of **DeePTB**, however, the advanced functions still need to be explored for accurate and flexible electron structure representation, such as:
-- atomic orbitals
-- environmental correction
-- spin-orbit coupling (SOC)
-- ...
-
-Altogether, we can simulate the electronic structure of a crystal system in a dynamic trajectory. **DeePTB** is capable of handling atom movement, volume change under stress, SOC effect and can use DFT eigenvalues with different orbitals and xc functionals as training targets. More results can be found in the [Gallary](#4-gallary).
-
-
-# 4. **Gallary**
-## Density of States (DOS)
-
-
-
-
-## Fermi Surface of Bulk Silicon
-This is done with api to Ifermi.
-
-
-
-
-
-
-
-
-
-## Fermi Velocity of Bulk Silicon
-This is done with api to Ifermi.
-
-
-
-
-
-## Large-scale simulations
-This is done with api to TBPLaS.
-
-
-
-
+
+## Online Documentation
+For detailed documentation, please refer to [our documentation website](https://deeptb.readthedocs.io/en/latest/).
diff --git a/docs/advanced/dptb_env.md b/docs/advanced/dptb_env.md
index 217df4fe..bcd73169 100644
--- a/docs/advanced/dptb_env.md
+++ b/docs/advanced/dptb_env.md
@@ -1 +1,245 @@
-# Environment-dependent TB
\ No newline at end of file
+# Environment-dependent TB
+
+ - [Method Introduction:](#method-introduction)
+ - [Example: Bulk Silicon](#example-bulk-silicon)
+ - [1. Data Preparation](#1-data-preparation)
+ - [ 2. Training Neural Network Emperical TB Model (no env) ](#2-training-neural-network-emperical-tb-model-no-env)
+ - [ 2.1 Training a First Nearest Neighbour Model ](#21-training-a-first-nearest-neighbour-model)
+ - [ 2.2 Add More Orbitals and Neighbours ](#22-add-more-orbitals-and-neighbours)
+ - [ 2.3 Training the Bond-length Dependent Parameters ](#23-training-the-bond-length-dependent-parameters)
+ - [ 3. Training Deep Learning TB Models with Env. Correction ](#3-training-deep-learning-tb-models-with-env-correction)
+
+
+## Method Introduction:
+The basic idea of the DeePTB method is to fit the DFT electronic band structure through deep learning, thereby constructing a TB model to achieve first-principles accuracy.
+
+In the TB model, the Hamiltonian matrix elements can be expressed as:
+
+$$
+\begin{equation}
+H_{i,j}^{lm,l^\prime m^\prime} = \left\langle {i,lm} \right| \hat{H} \left| {j, l^\prime m^\prime} \right\rangle
+\end{equation}
+$$
+
+where $i$, $j$ are site indices. $l$ and $m$ are angular and magnetic quantum numbers. $H$ is the Hamiltonian operator. In DeePTB, we choose the traditional Slater-Koster (SK) parameterized Hamiltonian, where all the Hamiltonian can be expressed in terms of SK integrals: $h_{ss\sigma}, h_{sp\sigma}, h_{pp\sigma}, h_{pp\pi}, \cdots$, etc.
+Based on these SK integrals, we can construct Hamiltonian matrix as follows:
+
+$$
+\begin{equation}
+ H_{i,j}^{lm,l^\prime m^\prime} = \sum_{\zeta} \Big[ \mathcal{U}_{\zeta}(\hat{r}_{ij}) \ h_{ll^\prime \zeta} \Big]_{mm^\prime}
+\end{equation}
+$$
+
+Here, $\mathcal{U}_{\zeta}$ is a $[2l+1,2l^\prime+1]$ matrix, and $\zeta$ represents the key type, such as $\sigma, \pi$, etc. The specific form of $\mathcal{U}_{\zeta}$ can be found in [Ref:1](https://journals.aps.org/pr/abstract/10.1103/PhysRev.94.1498).In traditional SK-TB, SK integrals often use analytical expressions based on the following empirical rules, and are based on the two-center approximation.
+
+In DeePTB, we use a neural network-based method to predict SK integrals, which is expressed as:
+
+$$
+\begin{equation}
+h^{\text{env}}_{ll^\prime{\zeta}} = h_{ll^\prime{\zeta}}(r_{ij}) \times \left[1+\Phi_{ll^\prime\zeta}^{o_i,o_j}\left(r_{ij},\mathcal{D}^{ij}\right)\right]
+\end{equation}
+$$
+
+where $h_{ll^\prime{\zeta}}$ is also an SK integral based on an analytical expression. In DeePTB, the undetermined coefficients of the analytical expression are represented by neurons. $h^{\text{env}}_{ll^\prime{\zeta}}$ depends on the local environment introduced by the neural network. Refer to [DeePTB paper](https://journals.aps.org/prmaterials/abstract/10.1103/PhysRevMaterials.2.083801) for more information.
+
+In the following, we will use Silicon as an example to show the full training procedure of DeePTB.
+
+## Example: Bulk Silicon
+Bulk silicon has diamond structure at room temperature and pressure. Due to its widespread applications in the semiconductor industry, it has been a significant important element in modern society. Here we provide an example of building a silicon **DeePTB** model. By following this instruction step-by-step, you will be introduced to the high-level functionalities of **DeePTB**, which can provide a model bypass empirical TB, to achieve *ab initio* accuracy.
+
+This example can be seen in the `example/silicon` folder. The whole training procedure can be summarized as below:
+
+
+
+This procedure contains the full steps to training an environmentally corrected **DeePTB** model. The converged model can predict the electronic structure of both perfect crystals and the configurations with atomic distortion, while can generalize to structures with more atoms. For convenience, we provide all the training checkpoints in `ckpt`:
+```bash
+deeptb/examples/silicon/ckpt/
+-- md/
+-- -- 2-3-25K_best_nnsk_b5.000_c5.000_w0.100.pth # nnsk model trained on 25K MD trajectory
+-- -- 2-3-100K_best_nnsk_b5.000_c5.000_w0.100.pth # nnsk model trained on 100K MD trajectory
+-- -- 2-3-300K_best_dptb_b5.000_c5.000_w0.100.pth # nnsk model trained on 300K MD trajectory
+-- -- 2-3-300K_best_nnsk_b5.000_c5.000_w0.100.pth # dptb model trained on 300K MD trajectory
+-- 2-1_best_nnsk_b2.600_c2.600_w0.300.pth
+-- 2-2-1_best_nnsk_b2.600_c2.600_w0.300.pth
+-- 2-2-2_best_nnsk_b5.000_c5.000_w0.100.pth
+```
+
+
+### 1. Data Preparation
+
+The data for training and plotting contains in `data` folders:
+```bash
+deeptb/examples/silicon/data/
+-- kpath.0/ # bandstructure of primary cell
+-- kpathmd25.0/ # bandstructure of 10 MD snapshots at T=25K
+-- kpathmd100.0/ # bandstructure of 10 MD snapshots at T=100K
+-- kpathmd300.0/ # bandstructure of 10 MD snapshots at T=300K
+-- kpt.0/ # kmesh samples of primary cell
+-- silicon.vasp
+```
+Each of these folders, contains data files with required format, here we give an examples of `kpath.0`:
+```bash
+deeptb/examples/silicon/data/kpath.0/
+-- bandinfo.json
+-- eigs.npy
+-- kpoints.npy
+-- xdat.traj
+```
+
+### 2. Training Neural Network Emperical TB Model (no env)
+
+#### 2.1 Training a First Nearest Neighbour Model
+We first analyse the bond length by running.
+```bash
+dptb bond ./data/silicon.vasp
+```
+The output will be like:
+```bash
+ Bond Type 1 2 3 4 5
+------------------------------------------------------------------------
+ Si-Si 2.35 3.84 4.50 5.43 5.92
+```
+
+The fitting of empirical TB on the first nearest neighbours shares the same procedure as the `hBN` example. We suggest the user try on hBN before proceeding. This time, the training starts from the first nearest neighbour checkpoint in `ckpt` folders.
+
+#### 2.2 Add More Orbitals and Neighbours
+Let's plot the converged `nnsk` model in last step, using `band.json` in `run/`, by:
+
+```bash
+dptb run -sk run/band.json -i ./ckpt/2-1_best_nnsk_b2.600_c2.600_w0.300.pth -o ./band
+```
+The file `band.json` includes the parameters to plot the band structure.
+```json
+
+{
+ "structure":"./data/silicon.vasp",
+ "task_options": {
+ "task": "band",
+ "kline_type":"abacus",
+ "kpath":[[0.0000000000, 0.0000000000, 0.0000000000, 50],
+ [0.5000000000, 0.0000000000, 0.5000000000, 50],
+ [0.6250000000, 0.2500000000, 0.6250000000, 1],
+ [0.3750000000, 0.3750000000, 0.7500000000, 50],
+ [0.0000000000, 0.0000000000, 0.0000000000, 50],
+ [0.5000000000, 0.5000000000, 0.5000000000, 50],
+ [0.5000000000, 0.2500000000, 0.7500000000, 50],
+ [0.5000000000, 0.0000000000, 0.5000000000, 1 ]
+ ],
+ "klabels":["G","X","X/U","K","G","L","W","X"],
+ "E_fermi":-7.5,
+ "emin":-12,
+ "emax":12,
+ "ref_band": "./data/kpath.0/eigs.npy"
+ }
+}
+```
+- `task`: the task to run, here we plot the band structure.
+- `kline_type`: the type of kpath, here we use the abacus kpath.
+- `kpath`: shape (:,4), here [:,:3] is the kpath, using the kpoints at the high symmetry points to define kpath, [:,3] is the number of kpoints in between two high symmetry points.
+- `klabels`: the labels of high symmetry points.
+- `E_fermi`: the fermi energy of the system.
+- `emin`: the minimum energy of the band structure.
+- `emax`: the maximum energy of the band structure.
+- `ref_band`: the reference bandstructure, here we use the bandstructure of the primary cell calculated by abacus with the same kpath setting.
+
+we can see, the fitted model has already captured the shape of the valance bands. However, the conductance band is less accurate since the orbitals `3s` and `3p` is not complete for the space spanned by the considered valance and conductance band. Therefore we need to include more orbitals in the model.
+
+
+
+
+
+In **DeePTB**, users are able to add or remove orbitals by altering the input configuration file. Here we add `d*` orbital, which can permit us to fit the conductance band essential when calculating excitation properties such as photo-electronics and electronic transport.
+
+First, we add `d*` in `proj_atom_anglr_m` of input configuration, which looks like this:
+```json
+"proj_atom_anglr_m": {
+ "Si": [
+ "3s",
+ "3p",
+ "d*"
+ ]
+}
+```
+
+Also, we need to change the learning-rate to `1e-3` to maintain stability in the first few iterations. Then, we start training the model with `-i/--init-model` of our last checkpoint, by running:
+```bash
+dptb train -sk ./ckpt/2-2-1_input.json -i ./ckpt/2-1_best_nnsk_b2.600_c2.600_w0.300.pth -o nnsk
+```
+
+In this way, the parameters in `nnsk` model corresponding to `3s` and `3p` orbitals can be reloaded.
+When convergence is achieved, we can plot the band structure, using the command:
+```bash
+dptb run -sk run/band.json -i ./ckpt/2-2-1_best_nnsk_b2.600_c2.600_w0.300.pth -o ./band
+```
+which shows that both the valance and conductance bands are fitted well:
+
+
+
+
+
+*Note: In practice, we find that training with the minimal basis set in begin, and then increasing the orbitals gradually is a better choice than directly training with full orbitals from scratch. This procedure can help to reduce the basis size and to improve the training stability.*
+
+To further enhance the model, we can enlarge the cutoff range considered, to build a model beyond the first nearest neighbours. The parameters that control the cutoff radius:
+- `bond_cutoff` (angstrom unit): it indicates bonds that have a bond-length smaller than what is included.
+
+We first increase the `bond_cutoff` to be larger than the bong-length of the third nearest neighbour, while shorter than the fourth. However, abrupt change in the cutoff will introduce discontinuity in the model training, we, therefore, introduce a smoothing function:
+$$f_s(r)=\frac{1}{1+e^{(r-r_{skc})/\omega}}$$
+ that is controlled by parameters:
+
+- `sk_cutoff` (angstrom unit): $r_{skc}$ it controls the cutoff of the decay weight of each bond.
+- `sk_decay_w`: $\omega$, it decides the smoothness of the decay.
+
+
+
+
+
+As is shown in the above figure, this smoothing function will decay centred at $r_{skc}$. According to the smoothness $\omega$, this function has different smoothness. Here, to take more neighbours' terms into consideration while retaining the stability of fitting, we first set the $r_{skc}$ at the first-nearest neighbour distance, this decay function can suppress the newly included second and third neighbour terms, which brings no abrupt changes to the predicted hamiltonians.
+
+Then what is left is pushing $r_{skc}$ gradually to the value of `bond_cutoff`. This can be achieved by modifying the parameters in the input configuration and repeating along with training with initialization manually. Alternatively, **DeePTB** support to push the smooth boundary automatically. We can set the `sk_cutoff` as a list of two values: [boundary1, boundary2]. **DeePTB** will push the sk_cutoff use linear interpolation during training. It is recommended to analyse the bond distribution before pushing. The boundary-pushing often takes more training epochs. One can try to push the boundaries with configuration `ckpt/2-2-2-1_input.json` for pushing $r_{skc}$ and `2-2-2-2_input.json` for tightening $\omega$, or use the model after boundary-pushing (since this step takes a few more iterations) in `ckpt/2-2-2_best_nnsk_b5.000_c5.000_w0.100.pth` for the next step:
+
+
+
+
+
+#### 2.3 Training the Bond-length Dependent Parameters
+The empirical SK integrals in **DeePTB** are parameterized by various bond-length dependent functions. This provides the representative power of `nnsk` model to model the change of electronic structure by atomic distortions. If the user wants to learn the bond-length dependent parameters or would like to add environmental correction to improve the accuracy, or to fit various structures, this step is highly recommended.
+
+The training of Bond-length Dependence parameters will use the dataset of MD snapshots. By modifying the `data_options/train/prefix` in the input configuration to `kpathmd25K/kpathmd100K/kpathmd300K` and training the model with initialized checkpoints. The parameters are easily attained. The checkpoint in `ckpt/md` provide the converged checkpoint of `nnsk` models on MD snapshots with different temperature. The user can plot the bandstructure using `band_md.json`, with the command:
+
+```
+dptb run -sk band_md.json -i ./ckpt/md/xxx.pth -o band
+```
+
+and check out the `band/result` folder for the plottings. Here we illustrate the bandstructure plotting on a snapshot of 25K MD trajectory:
+
+
+
+
+
+We highly suggest training the model from a low temperature, and the transfer to a higher temperature to improve the fitting stability.
+
+### 3. Training Deep Learning TB Models with Env. Correction
+**DeePTB** provide powerful environmental-dependent modelling with symmetry-preserving neural networks. Based on the last step, we can further enhance the power of TB model to overcome the accuracy limit, brought by the two-centre approximation. We denote the model that builds the environmental dependence as `dptb`. With the converged checkpoint in the last step, we can just run:
+```bash
+dptb train -crt [[-i|-r] ] [[-o] ] [-f]
+```
+To start training, e.p. if starting from the checkpoint `./ckpt/md/2-3-25K_best_nnsk_b5.000_c5.000_w0.100.pth`, we need to run:
+```bash
+dptb train ./ckpt/md/input.json -crt ./ckpt/md/2-3-25K_best_nnsk_b5.000_c5.000_w0.100.pth -o dptb300K -f
+```
+
+`-f` above indicate `--freeze` the `nnsk` model when training the `dptb` model. It is important to use `-f` when one initializes a new `dptb` model (i.e. without `-i/--init-model` or `-r/--restart`).
+
+The only parameter need to be considered here is the `env_cutoff`. It indicates the chemical environment radius that is centred at each atom. To ensure the spatial symmetries of the atom environment and the bond environment embeddings, the `env_cutoff` should be larger than 0.5*`bond_cutoff`.
+
+During the training procedure, the `dptb` model will be saved periodically as checkpoints. If one hasn't frozen the `nnsk` model with `-f`, the trained `nnsk` model will also be saved. Then, we can use the converged model to predict the bandstructure, calculating properties supported by **DeePTB**, or get the predicted Hamiltonian directly. We plot the bandstructure of the converged model on $T=300K$'s MD trajectory for illustration:
+One can run:
+```bash
+dptb run band_md.json -i ./ckpt/md/2-3-300K_best_dptb_b5.000_c5.000_w0.100.pth -crt ./ckpt/md/2-3-300K_best_nnsk_b5.000_c5.000_w0.100.pth -o band
+```
+
+
+
+
+Now you know how to train a **DeePTB** model, congratulations!
+
diff --git a/docs/advanced/elec_properties/dos.md b/docs/advanced/elec_properties/dos.md
index 0ee3e646..d9ec6230 100644
--- a/docs/advanced/elec_properties/dos.md
+++ b/docs/advanced/elec_properties/dos.md
@@ -1 +1,6 @@
-# Density of states
\ No newline at end of file
+# Density of states
+
+## Density of States (DOS)
+
+
+
\ No newline at end of file
diff --git a/docs/advanced/elec_properties/fermi_surface.md b/docs/advanced/elec_properties/fermi_surface.md
index 088d55ca..51c9558a 100644
--- a/docs/advanced/elec_properties/fermi_surface.md
+++ b/docs/advanced/elec_properties/fermi_surface.md
@@ -1 +1,19 @@
# Fermi surface
+
+## Fermi Surface of Bulk Silicon
+This is done with api to Ifermi.
+
+
+
+
+
+
+
+
+
+## Fermi Velocity of Bulk Silicon
+This is done with api to Ifermi.
+
+
+
+
\ No newline at end of file
diff --git a/docs/advanced/interface/TBPLAS.md b/docs/advanced/interface/TBPLAS.md
index 3e786629..27bf94d0 100644
--- a/docs/advanced/interface/TBPLAS.md
+++ b/docs/advanced/interface/TBPLAS.md
@@ -1 +1,7 @@
-# TBPLAS
\ No newline at end of file
+# TBPLAS
+
+## Large-scale simulations
+This is done with api to TBPLaS.
+
+
+
\ No newline at end of file
diff --git a/docs/advanced/soc.md b/docs/advanced/soc.md
index 44995250..1ccc507b 100644
--- a/docs/advanced/soc.md
+++ b/docs/advanced/soc.md
@@ -1 +1,149 @@
-# Spin-orbit coupling
\ No newline at end of file
+# Spin-orbit coupling
+
+## Method Introduction:
+for the systems with non-negligible SOC effect (usually the case of heavy atoms), this effect must be considered, which can be formulated as [Ref:1](https://doi.org/10.1016/j.commatsci.2023.112090):
+
+$$
+\begin{equation}
+\hat{H}_\text{soc}=\sum_i \lambda_i \boldsymbol L_i \cdot \boldsymbol S_i
+\end{equation}
+$$
+
+Here, $\boldsymbol L_i$ and $\boldsymbol S_i$ are the orbital and spin momentum operators with interaction strength $\lambda_i$.
+The full Hamiltonian $\mathcal{H}$ with SOC effect can be constructed as $\mathcal{H}= \mathcal{I}_2 \otimes H + H_{\text{soc}}$, where $\mathcal{I}_2$ is the $2\times 2$ identity matrix and $\otimes$ is the Kronecker product.
+
+In the following, we will use Sn as an example include SOC interaction in DeePTB.
+
+## Example: SOC effect in alpha-Sn
+This example can be seen in the `example/Sn_soc` folder.
+
+### Training data
+The training data is generated by the ABACUS code. The training data is stored in the `/data` folder. The `data` folder contains the following files:
+
+- `non_soc`: folder contains the band structure and training data for the non-soc case.
+- `soc`: folder contains the band structure and training data for the soc case.
+
+Inside of the `non_soc` and `soc` folder, the following files are included:
+- `BANDS_1.dat`: the band structure data generated by the ABACUS code.
+- `Sn.vasp`: the structure file of the alpha-Sn material.
+- `ref_eig_band.npy`: the reference band structure data, read from `BANDS_1.dat` by removing the core electronic bands.
+- `set.0`: the training data with dense k points.
+- `set_sparseK.0`: the training data with sparse k points. usually, the sparse k points are used for the training data.
+
+
+```shell
+data
+|-- non_soc
+| |-- BANDS_1.dat
+| |-- Sn.vasp
+| |-- ref_eig_band.npy
+| |-- set.0
+| | |-- bandinfo.json
+| | |-- eigs.npy
+| | |-- kpoints.npy
+| | `-- xdat.traj
+| `-- set_sparseK.0
+| |-- bandinfo.json
+| |-- eigs.npy
+| |-- kpoints.npy
+| `-- xdat.traj
+`-- soc
+ |-- BANDS_1.dat
+ |-- Sn.vasp
+ |-- ref_eig_band.npy
+ |-- set.0
+ | |-- bandinfo.json
+ | |-- eigs.npy
+ | |-- kpoints.npy
+ | `-- xdat.traj
+ `-- set_sparseK.0
+ |-- bandinfo.json
+ |-- eigs.npy
+ |-- kpoints.npy
+ `-- xdat.traj
+```
+
+### Training
+#### 1. train the non-soc model
+This is already explained in other examples, here we just give a model checkpoint. one can just to visualize the band structure and compare with the reference band structure. in the `reference` folder:
+
+```shell
+cd reference/non_soc
+# run the command manually
+dptb run -sk band.json -i ./checkpoint/best_nnsk_c6.0w0.1.pth -o ./band
+# or just type:
+bash run.sh
+```
+This will generate the non-soc band structure in the `band`.
+
+
+
+
+
+#### 2. train the soc model
+in the `run` folder:
+
+```shell
+run
+|-- band.json
+|-- input.json
+|-- nonsoc_model
+| |-- best_nnsk_c6.0w0.1.json
+| |-- best_nnsk_c6.0w0.1.pth
+| |-- latest_nnsk_c6.0w0.1.json
+| `-- latest_nnsk_c6.0w0.1.pth
+|-- plot.sh
+|-- plotband.ipynb
+`-- train.sh
+```
+
+- `band.json`: the configuration file for ploting band structure.
+- `input.json`: the configuration file for training.
+- `nonsoc_model`: the folder contains the non-soc model checkpoint.
+- `plot.sh`: the script for ploting band structure.
+- `plotband.ipynb`: the jupyter notebook for ploting band structure.
+- `train.sh`: the script for training the soc model.
+
+For training: turn on soc in `input.json`
+```json
+"common_options": {
+ ...
+ ...
+ "soc":true
+ },
+```
+then run the command:
+
+```shell
+bash train.sh
+```
+or
+```shell
+dptb train input.json -sk -i ./nonsoc_model/best_nnsk_c6.0w0.1.pth -o ./soc_model
+```
+
+During the training you can monitor the training process by typing the command:
+```shell
+bash plot.sh
+```
+or
+```shell
+dptb run -sk band.json -o ./band -i ./soc/checkpoint/best_nnsk_b6.000_c6.000_w0.100.pth
+```
+This will plot the band structure and save the results in the `band` folder.
+
+Or you can use the jupyter notebook to plot the band structure.
+
+In the reference, we have already trained a soc model, you can just use it to plot the band structure.
+
+```shell
+cd reference/soc
+# run the command manually
+dptb run -sk band.json -o ./band -i ./checkpoint/best_nnsk_c6.0w0.1.pth
+# or just type:
+bash run.sh
+```
+This will generate the soc band structure in the `band`.
+
+
+