| # Contributing guidelines |
|
|
| Thanks for taking the time to contribute! :+1: |
|
|
| In general, we would like to |
|
|
| - keep the repository as small as possible but still produce (more or less) |
| physically meaningful results (e.g., roughly correct band structures). |
| Of course, for testing datasets, no such requirement is needed. |
| - keep the original DFT input files and scripts for generating the datasets, |
| to ensure reproducibility. This also allows us to regenerate the datasets |
| if needed. |
| |
| ## Dataset generation |
|
|
| Each folder in [`../datasets`](../datasets) folder is a standalone dataset |
| for one material, these files are generated by the respective `inputs/run.sh` |
| script. The `inputs` subdirectory contains all the script and input files for |
| DFT codes to generate the Wannier input `amn/mmn/eig/...` files. |
|
|
| The Fortran binary (also called unformatted) files are written by QE binaries |
| which are compiled with |
|
|
| ```bash |
| GNU Fortran (Ubuntu 11.2.0-19ubuntu1) 11.2.0 |
| ``` |
|
|
| To add a new dataset: |
|
|
| - Create a new subdirectory, e.g. `Si2` |
| - Put all the input files for the DFT code in the subdirectory `Si2/inputs/` |
| - Create a `run.sh` script in `inputs/` which runs the DFT code and generates the `amn/mmn/eig/...` files |
| - Move the `amn/mmn/eig/...` files to `Si2/` |
| - (Optional) Create a `README.md` file in `Si2/` which describes the dataset |
| - (Optional) Add reference results in a subdirectory `Si2/outputs/` |
|
|
| Out goal is that the `run.sh` script should be able to reproduce the `amn/mmn/eig/...` files, |
| on any machine. So we can easily regenerate the dataset if needed. |
|
|
| ## All Code Changes Happen Through Pull Requests |
|
|
| Pull requests are the best way to propose changes to the codebase. |
| We actively welcome your pull requests: |
|
|
| 1. Fork the repo and create your branch from `main`. |
| ```shell |
| # clone the repo, remember to replace the username with your own username |
| git clone git@hf.co:datasets/atomology/WannierDatasets |
| ``` |
| 2. Add dataset(s), ideally small (in terms of file size) but still gives |
| physical results. The `prefix` of the files (i.e. `prefix.amn`/`prefix.mmn`) |
| should be the same as the folder name, to allow easy loading of the dataset |
| by `Wannier.jl` (the function `Wannier.Datasets.load_dataset`) |
| 3. Make sure the original input files are committed in a `inputs` subfolder, |
| so we can always reproduce the results on different machines. |
| 4. (Optional) put useful reference files in a `outputs` subfolder |
| 5. Always `git rebase` your branch on top of the latest `main` branch, so that |
| we can merge your PR without ugly :worried: merge commits. |
| Otherwise, we will rebase explicitly your branch when merging. |
| 6. Create that pull request! |
| |
| ## Release process |
|
|
| See [`../release.sh`](../release.sh). |
|
|