Skip to content

Commit b0d68ec

Browse files
committed
Update README.md
1 parent b15c7ab commit b0d68ec

File tree

1 file changed

+54
-2
lines changed

1 file changed

+54
-2
lines changed

README.md

+54-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,60 @@
22
# GFN0-xTB
33

44
This repository contains a standalone implementation of
5-
the GFN0-xTB method (<https://doi.org/10.26434/chemrxiv.8326202.v1>).
5+
the GFN0-xTB method (<https://doi.org/10.26434/chemrxiv.8326202.v1>),
6+
adapted from the [`xtb` code](https://github.com/grimme-lab/xtb).
67

78
The default CMake and meson builds compile a statically linked library (`libgfn0.a`) that can be linked in other projects.
89

9-
`main.f90` in `testprog/` demonstrates the in-code usage.
10+
[`main.f90`](testprog/main.f90) in [`testprog/`](testprog/) demonstrates the in-code usage.
11+
12+
13+
---
14+
15+
## Building the Project
16+
17+
Make sure you have the following dependencies installed:
18+
19+
- CMake and `make`, or meson and ninja build systems
20+
- Fortran and C compilers (e.g., `gfortran`/`gcc` or `ifort`/`icc`)
21+
22+
### Instructions
23+
24+
Follow these steps to build the project:
25+
26+
1. Create a build directory and navigate to it
27+
```bash
28+
mkdir _build
29+
cd _build
30+
```
31+
32+
2. Export the compilers (here for example `ifort`/`icc`) and depending on your chosen build system set up the build:
33+
- generate the build files using CMake:
34+
```bash
35+
FC=ifort CC=icc cmake ..
36+
```
37+
- generate the build files using meson:
38+
```bash
39+
FC=ifort CC=icc meson ..
40+
```
41+
I you wish to build the test-binary, add `-Dbuild_exe=true` to either the `cmake` or `meson` setup command.
42+
43+
44+
3. Depending on your chosen build system, build the project. If you have multiple cores/processors, you can speed up the build process by specifying the number of cores to use with the `-j` option. For example, to use 4 cores:
45+
- With CMake/`make`:
46+
```shell
47+
make -j4
48+
```
49+
- With meson/`ninja`:
50+
```shell
51+
ninja -j4
52+
```
53+
### Cleaning the Build
54+
55+
To clean the build files, simply delete the `build` directory:
56+
57+
```shell
58+
rm -rf _build
59+
```
60+
61+

0 commit comments

Comments
 (0)