Skip to content

Commit 80732cf

Browse files
committed
Merge branch 'develop' of https://github.com/deepmodeling/abacus-develop into develop
2 parents 473b53c + 330bc26 commit 80732cf

File tree

5 files changed

+58
-25
lines changed

5 files changed

+58
-25
lines changed

CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
########################################
22
# CMake build system
33
# This file is part of ABACUS
4-
cmake_minimum_required(VERSION 3.18)
4+
cmake_minimum_required(VERSION 3.16)
55
########################################
66

77
project(ABACUS
@@ -22,7 +22,7 @@ option(BUILD_TESTING "Build ABACUS unit tests" OFF)
2222
option(GENERATE_TEST_REPORTS "Enable test report generation" OFF)
2323

2424
set(ABACUS_BIN_NAME abacus)
25-
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/modules)
25+
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/modules)
2626
set(ABACUS_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/source)
2727
set(ABACUS_TEST_DIR ${CMAKE_CURRENT_SOURCE_DIR}/tests)
2828
set(ABACUS_BIN_PATH ${CMAKE_CURRENT_BINARY_DIR}/${ABACUS_BIN_NAME})
@@ -85,6 +85,7 @@ else() # CUDA not found
8585
endif()
8686

8787
if(USE_CUDA OR USE_CUSOLVER_LCAO)
88+
cmake_minimum_required(VERSION 3.18) # required by `CUDA_ARCHITECTURES` below
8889
set(CMAKE_CXX_STANDARD 14)
8990
set(CMAKE_CXX_EXTENSIONS ON)
9091
set(CMAKE_CXX_STANDARD_REQUIRED ON)

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# To build this docker file, run `docker build -t abacus - < Dockerfile`.
1+
# To build this Dockerfile, run `docker build -t abacus - < Dockerfile`.
2+
# Pull image with `docker pull ghcr.io/deepmodeling/abacus:latest`.
23
FROM ubuntu:latest
34
RUN apt update && apt install -y --no-install-recommends libopenblas-dev liblapack-dev libscalapack-mpi-dev libelpa-dev libfftw3-dev libcereal-dev libxc-dev g++ make cmake bc time sudo vim git
45
# If you wish to use the LLVM compiler, replace 'g++' above with 'clang libomp-dev'.

docs/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ This file provides a guideline for it.
66
## Table of Contents
77

88
- [Got a question?](#got-a-question)
9-
- [Before getting started](#before-getting-started)
109
- [Structure of the package](#structure-of-the-package)
1110
- [Submitting an Issue](#submitting-an-issue)
1211
- [Comment Style for documentation](#comment-style-for-documentation)
@@ -23,6 +22,7 @@ If you would like to implement a new feature, please submit an issue with a prop
2322

2423
## Structure of the package
2524

25+
Please refer to [our instructions](./install.md) on how to installing ABACUS.
2626
The source code of ABACUS is based on several modules. Under the ABACUS root directory, there are the following folders:
2727

2828
- `cmake`: relevant files for finding required packages when compiling the code with cmake;

docs/input-main.md

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@
2424

2525
- [Electronic structure](#electronic-structure)
2626

27-
[basis_type](#basis-type) | [ks_solver](#ks-solver) | [nbands](#nbands) | [nbands_sto](#nbands_sto) | [nbands_istate](#nbands-istate) | [nspin](#nspin) | [occupations](#occupations) | [smearing_method](#smearing_method) | [smearing_sigma](#smearing_sigma) | [mixing_type](#mixing-type) | [mixing_beta](#mixing-beta) | [mixing_ndim](#mixing-ndim) | [mixing_gg0](#mixing-gg0) | [gamma_only](#gamma-only) | [printe](#printe) | [scf_nmax](#scf_nmax) | [scf_thr](#scf_thr) | [chg_extrap](#chg_extrap) | [nche_sto](#nche_sto) | [emin_sto](#emin_sto) | [emax_sto](#emax_sto) | [seed_sto](#seed_sto)
27+
[basis_type](#basis-type) | [ks_solver](#ks-solver) | [nbands](#nbands) | [nbands_istate](#nbands-istate) | [nspin](#nspin) | [occupations](#occupations) | [smearing_method](#smearing_method) | [smearing_sigma](#smearing_sigma) | [mixing_type](#mixing-type) | [mixing_beta](#mixing-beta) | [mixing_ndim](#mixing-ndim) | [mixing_gg0](#mixing-gg0) | [gamma_only](#gamma-only) | [printe](#printe) | [scf_nmax](#scf_nmax) | [scf_thr](#scf_thr) | [chg_extrap](#chg_extrap)
28+
29+
- [Electronic structure (SDFT)](#electronic-structure-sdft)
30+
31+
[nbands_sto](#nbands_sto) | [nche_sto](#nche_sto) | [emin_sto](#emin_sto) | [emax_sto](#emax_sto) | [seed_sto](#seed_sto)
2832

2933
- [Geometry relaxation](#geometry-relaxation)
3034

@@ -464,14 +468,6 @@ calculations.
464468
- nspin=1: 1.2\*occupied_bands, occupied_bands+10)
465469
- nspin=2: max(1.2\*nelec, nelec+20)
466470
467-
#### nbands_sto
468-
469-
- **Type**: Integer
470-
- **Description**:
471-
- nbands_sto>0: Number of stochastic orbitals to calculate in stochastic DFT (SDFT) or mix stochastic-deterministic (MDFT). More bands obtain more precise results or smaller stochastic errors ($ \propto 1/\sqrt{N_{\chi}}$);
472-
- nbands_sto=0: Complete basis will be used to replace stochastic orbitals with the Chebyshev method (CT) and it will get the results the same as KSDFT without stochastic errors.
473-
- **Default**: 0
474-
475471
#### nbands_istate
476472
477473
- **Type**: Integer
@@ -570,6 +566,21 @@ calculations.
570566
- second-order: second-order extrapolation
571567
- **Default**:atomic
572568
569+
by time(NULL).
570+
- **Default**:0
571+
572+
### Electronic structure (SDFT)
573+
574+
This part of variables are used to control the parameters of stochastic DFT (SDFT), mix stochastic-deterministic DFT (MDFT), or complete-basis Chebyshev method (CT).
575+
576+
#### nbands_sto
577+
578+
- **Type**: Integer
579+
- **Description**:
580+
- nbands_sto>0: Number of stochastic orbitals to calculate in SDFT and MDFT. More bands obtain more precise results or smaller stochastic errors ($ \propto 1/\sqrt{N_{\chi}}$);
581+
- nbands_sto=0: Complete basis will be used to replace stochastic orbitals with the Chebyshev method (CT) and it will get the results the same as KSDFT without stochastic errors.
582+
- **Default**: 0
583+
573584
#### nche_sto
574585
575586
- **Type**: Integer
@@ -593,8 +604,7 @@ calculations.
593604
- **Type**: Integer
594605
- **Description**: The random seed to generate stochastic orbitals.
595606
- seed_sto>=0: Stochastic orbitals have the form of $\exp(i2\pi\theta(G))$, where $\theta$ is a uniform distribution in $(0,1)$. If seed_sto=0, the seed is decided by time(NULL).
596-
- seed_sto<=-1: Stochastic orbitals have the form of $\pm1$ with the equal probability. If seed_sto=-1, the seed is decided by time(NULL).
597-
- **Default**:0
607+
- seed_sto<=-1: Stochastic orbitals have the form of $\pm1$ with the equal probability. If seed_sto=-1, the seed is decided
598608
599609
### Geometry relaxation
600610

docs/install.md

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,34 +13,55 @@
1313

1414
## Installation
1515

16+
### Container Deployment
17+
18+
We've built a ready-for-use version of ABACUS with docker [here](https://github.com/deepmodeling/abacus-develop/pkgs/container/abacus). For a quick start: pull the image, prepare the data, run container. Instructions on using the image can be accessed in [Dockerfile](../Dockerfile).
19+
20+
We also offer a pre-built docker image containing all the requirements for development. Please refer to our [Package Page](https://github.com/deepmodeling/abacus-develop/pkgs/container/abacus-development-kit).
21+
22+
The project is ready for VS Code development container. Please refer to [Developing inside a Container](https://code.visualstudio.com/docs/remote/containers#_quick-start-try-a-development-container). Choose `Open a Remote Window -> Clone a Repository in Container Volume` in VS Code command palette, and put the [git address](https://github.com/deepmodeling/abacus-develop.git) of `ABACUS` when prompted.
23+
24+
We also support [gitpod](https://www.gitpod.io/) to offer an ready-to-use online development environment.
25+
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/deepmodeling/abacus-develop)
26+
1627
### Prerequisites
1728

18-
ABACUS current supports Linux. To compile ABACUS, please make sure that the following prerequisites are
19-
present:
29+
ABACUS currently supports Linux. `Dockerfile`s under the root directory of our repo will come in handy.
30+
31+
To compile ABACUS, please make sure that the following prerequisites are present:
2032

2133
- C++ compiler, supporting C++11. You can use [Intel® C++ compiler](https://software.intel.com/enus/c-compilers) or [GCC](https://gcc.gnu.org/).
2234
- MPI compiler. The recommended version are [Intel MPI](https://software.intel.com/enus/mpi-library) or [MPICH](https://www.mpich.org/).
2335
- Fortran compiler for building `BLAS`, `LAPACK` and `ScaLAPACK`. You can use[Intel® Fortran Compiler](https://www.intel.com/content/www/us/en/developer/tools/oneapi/fortran-compiler.html) [GFortran](https://gcc.gnu.org/fortran/).
2436
- [BLAS](http://www.netlib.org/blas/). You can use [OpenBLAS](https://www.openblas.net/).
2537
- [LAPACK](http://www.netlib.org/lapack/).
2638
- [ScaLAPACK](http://www.netlib.org/scalapack/).
27-
- [FFTW](http://www.fftw.org/).
28-
- [ELPA](https://elpa.mpcdf.mpg.de/).
39+
- [FFTW3](http://www.fftw.org/).
40+
- [ELPA](https://elpa.mpcdf.mpg.de/) >= 2017.
2941
- [CEREAL](https://uscilab.github.io/cereal/).
3042

43+
These packages can be installed with popular package management system, such as `apt` and `yum`:
44+
45+
```bash
46+
sudo apt update && sudo apt install -y libopenblas-dev liblapack-dev libscalapack-mpi-dev libelpa-dev libfftw3-dev libcereal-dev libxc-dev g++ make cmake bc git
47+
```
48+
49+
> Please double-check the installed version of ELPA!
50+
3151
Alternatively, you can choose [Intel® oneAPI toolkit](https://software.intel.com/content/www/us/en/develop/tools/oneapi/commercial-base-hpc.html) (former Parallel Studio) as toolchain. The [Intel® oneAPI Base Toolkit](https://software.intel.com/content/www/us/en/develop/tools/oneapi/all-toolkits.html#base-kit) contains Intel® oneAPI Math Kernel Library (aka `MKL`), including `BLAS`, `LAPACK`, `ScaLAPACK` and `FFTW3`, - this means that no Fortran compiler required anymore. The [Intel® oneAPI HPC Toolkit](https://software.intel.com/content/www/us/en/develop/tools/oneapi/all-toolkits.html#hpc-kit) contains Intel® MPI Library, and C++ compiler(including MPI compiler). Please noted that building `elpa` with a different MPI library may cause conflict between MPI libraries. Don't forget to [set environment variables](https://software.intel.com/content/www/us/en/develop/documentation/get-started-with-intel-oneapi-render-linux/top/configure-your-system.html) before you start! `cmake` will use Intel MKL if the environment variable `MKLROOT` is set.
3252

3353
If you have trouble building requirements, our Dockerfiles in root path offer a reference, or read the section below to use a pre-built container.
34-
[back to top](#download-and-install)
3554

36-
### Container Deployment
55+
And of course, a copy of ABACUS source code is required:
3756

38-
We offer a pre-built docker image containing all the requirements - you only need to clone and compile `abacus` in the container. Please refer to our [Package Page](https://github.com/deepmodeling/abacus-develop/pkgs/container/abacus-development-kit).
57+
- Clone the whole repo with git: `git clone https://github.com/deepmodeling/abacus-develop.git`
58+
- Clone the minimum required part of repo: `git clone https://github.com/deepmodeling/abacus-develop.git --depth=1`
59+
- Download the latest source code without git: `wget https://github.com/deepmodeling/abacus-develop/archive/refs/heads/develop.zip`
60+
- Get the source code of a stable version [here](https://github.com/deepmodeling/abacus-develop/releases)
61+
- If you have connection issues accessing GitHub, please try out our official [Gitee repo](https://gitee.com/deepmodeling/abacus-develop/): replacing 'github.com' with 'gitee.com' works for all the links above. e.g. `git clone https://gitee.com/deepmodeling/abacus-develop.git`
3962

40-
The project is ready for VS Code development container. Please refer to [Developing inside a Container](https://code.visualstudio.com/docs/remote/containers#_quick-start-try-a-development-container). Choose `Open a Remote Window -> Clone a Repository in Container Volume` in VS Code command palette, and put the [git address](https://github.com/deepmodeling/abacus-develop.git) of `ABACUS` when prompted.
4163

42-
We also support [gitpod](https://www.gitpod.io/) to offer an ready-to-use online development environment.
43-
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/deepmodeling/abacus-develop)
64+
[back to top](#download-and-install)
4465

4566
### Build and install ABACUS with CMake
4667

0 commit comments

Comments
 (0)