Skip to content

Commit

Permalink
CREST 3.0 pre-release (crest-lab#250)
Browse files Browse the repository at this point in the history
Long needed update of the main branch.

Signed-off-by: Philipp Pracht <pp555@cam.ac.uk>
Co-authored-by: Pit Steinbach <steinbach@pc.rwth-aachen.de>
Co-authored-by: GereonFeldmann <126183817+GereonFeldmann@users.noreply.github.com>
Co-authored-by: Christoph Bannwarth <bannwarth@pc.rwth-aachen.de>
Co-authored-by: Felix Zeller <95427480+zellerf@users.noreply.github.com>
Co-authored-by: Christoph Plett <82893466+cplett@users.noreply.github.com>
  • Loading branch information
6 people committed Jan 20, 2024
1 parent 02da018 commit c54b4ac
Show file tree
Hide file tree
Showing 244 changed files with 60,376 additions and 28,541 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
python-version: 3.x

Expand All @@ -54,7 +54,14 @@ jobs:
printenv >> $GITHUB_ENV
- name: Install meson
run: pip3 install meson==0.60.1 ninja
run: pip3 install meson==0.63.3 ninja

- name: Git Sumbodules (including tblite patch)
run: |
git submodule update --init
cd subprojects/tblite
git apply ../packagefiles/tblite/tblite_patch.patch
cd ../../
- name: Configure meson build
run: meson setup ${{ env.BUILD_DIR }} --prefix=/
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: "Close stale issues and PRs"

on:
schedule:
# Every day at 00:00
- cron: "0 0 * * *"
workflow_dispatch:

jobs:
stale:
runs-on: ubuntu-latest

steps:
- uses: actions/stale@v9.0.0
with:
stale-issue-message: 'This issue had no activity for **6 months**. It will be closed in **1 week** unless there is some new activity.'
stale-issue-label: 'stale'
exempt-issue-labels: 'bug,enhancement'
stale-pr-message: 'This pull request had no activity for **6 months**. It will be closed in **1 week** unless there is some new activity.'
stale-pr-label: 'stale'
days-before-stale: 180
days-before-close: 7
operations-per-run: 20
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ build_majestix
build_commands
_build*
src/crest
bin/
22 changes: 22 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[submodule "subprojects/gfn0"]
path = subprojects/gfn0
url = https://github.com/pprcht/gfn0.git
branch = main
[submodule "subprojects/toml-f"]
path = subprojects/toml-f
url = https://github.com/toml-f/toml-f.git
branch = main
[submodule "subprojects/gfnff"]
path = subprojects/gfnff
url = https://github.com/pprcht/gfnff.git
branch = master
[submodule "subprojects/tblite"]
path = subprojects/tblite
# url = https://github.com/tblite/tblite.git
# branch = main
url = https://github.com/pprcht/tblite.git
branch = ompleak
[submodule "subprojects/lwoniom"]
path = subprojects/lwoniom
url = https://github.com/crest-lab/lwoniom
branch = main
98 changes: 87 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,32 @@ cmake_minimum_required(VERSION 3.14)
project(
"crest"
LANGUAGES "Fortran" "C"
VERSION "2.12.0"
VERSION "3.0"
)
set(SOVERSION "pre")

# Follow GNU conventions for installing directories
include(GNUInstallDirs)

# General configuration information
set(exe-deps)
set(libs)
add_subdirectory("config")


#
# Libraries
#

# OpenMP dependency
if(NOT TARGET OpenMP::OpenMP_Fortran)
if(NOT TARGET OpenMP::OpenMP_Fortran AND WITH_OpenMP)
find_package(OpenMP REQUIRED)
list(
APPEND exe-deps
APPEND libs
OpenMP::OpenMP_Fortran
)
endif()

# BLAS and LAPACK
if(NOT TARGET BLAS::BLAS)
find_package(BLAS REQUIRED)
if(NOT TARGET BLAS::BLAS AND BLAS_FOUND)
Expand All @@ -52,32 +59,101 @@ if(NOT TARGET LAPACK::LAPACK)
endif()
endif()
list(
APPEND exe-deps
APPEND libs
LAPACK::LAPACK
BLAS::BLAS
)

# General configuration information
# tblite
if(WITH_TBLITE)
find_package("tblite" REQUIRED)
add_definitions(-DWITH_TBLITE)
list(
APPEND libs
tblite::tblite
)
endif()


# toml-f
if(WITH_TOMLF)
find_package("toml-f" REQUIRED)
add_definitions(-DWITH_TOMLF)
list(
APPEND libs
toml-f::toml-f
)
endif()


# GFN0-xTB
if(WITH_GFN0)
find_package("gfn0" REQUIRED)
add_definitions(-DWITH_GFN0)
list(
APPEND libs
gfn0::gfn0
)
endif()


# GFN-FF
if(WITH_GFNFF)
find_package("gfnff" REQUIRED)
add_definitions(-DWITH_GFNFF)
list(
APPEND libs
gfnff::gfnff
)
endif()

# XHCFF
if(WITH_XHCFF)
find_package("xhcff" REQUIRED)
add_definitions(-DWITH_XHCFF)
list(
APPEND libs
xhcff::xhcff
)
endif()




#
# CREST sources
#
set(prog)
set(srcs)
add_subdirectory("src")


#
# Executables
#
add_executable(
"${PROJECT_NAME}-exe"
${PROJECT_NAME}-exe
"${srcs}" "${prog}"
)
set_target_properties(
"${PROJECT_NAME}-exe"
${PROJECT_NAME}-exe
PROPERTIES
Fortran_MODULE_DIRECTORY ${PROJECT_BINARY_DIR}/include
RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}
OUTPUT_NAME "${PROJECT_NAME}"
Fortran_MODULE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/include"
)
target_link_libraries(
"${PROJECT_NAME}-exe"
${PROJECT_NAME}-exe
PRIVATE
"${exe-deps}"
"${libs}"
)

get_target_property(OUT ${PROJECT_NAME}-exe LINK_LIBRARIES)
message(STATUS ${OUT})

#
# Binary installing option
#
install(
TARGETS
"${PROJECT_NAME}-exe"
Expand Down
100 changes: 70 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,81 @@
# Conformer-Rotamer Ensemble Sampling Tool
# CREST

[![Latest Version](https://img.shields.io/github/v/release/crest-lab/crest)](https://github.com/crest-lab/crest/releases/latest)
[![DOI](https://img.shields.io/badge/DOI-10.1039%2Fc9cp06869d%20-blue)](http://dx.doi.org/10.1039/c9cp06869d)
![example workflow](https://github.com/crest-lab/crest/actions/workflows/build.yml/badge.svg)
[![License: LGPL v3](https://img.shields.io/badge/License-LGPL_v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0)
[![Github Downloads All Releases](https://img.shields.io/github/downloads/crest-lab/crest/total)](https://github.com/crest-lab/crest/releases)

This is the offical repository of the CREST program developed by the Grimme group in Bonn.

CREST is an extension to the [`xtb`](https://github.com/grimme-lab/xtb) program.
It functions as an IO based OMP scheduler (*i.e.*, calculations are
performed by the `xtb` program) and tool for the creation and analysation of
structure ensembles.
CREST (originally abbreviated from ***C***onformer-***R***otamer ***E***nsemble ***S***ampling ***T***ool) is a program for the automated exploration of the low-energy molecular chemical space.
It functions as an OMP scheduler for calculations at with efficient force-field and semiempirical quantum mechanical methods such as xTB, and provides
a variety capabilities for creation and analysis of structure ensembles.

<div align="center">
<img src="./assets/crest.png" alt="CREST" width="200">
<img src="./assets/newtoc.png" alt="CREST" width="700">
</div>

---
**NOTE: This is the 3.0 pre-release. Please report any bugs or issues ASAP. The program can be switched back to its previous behaviour via the `--legacy` option.**

---


## Documentation

The CREST documentation with installation instructions and application examples is hosted at <https://crest-lab.github.io/crest-docs/>.
The CREST documentation with installation instructions and application examples is hosted at <https://crest-lab.github.io/crest-docs/>.


## Installation quick guide

For any installation make sure that you have correctly installed and sourced the [`xtb`](https://github.com/grimme-lab/xtb) program before attempting any calculations with CREST.
**While `xtb` is technically not needed for the primary runtypes of CREST versions >3.0 thanks to an integration of [`tblite`](https://github.com/tblite/tblite), some functionalities, like QCG, still require it!**

There are multiple possible ways of installing CREST.
For building the program from source we recommend the Intel `ifort` and `icc` compilers.
For building the program from source we recommend the Intel `ifort` and `icc` compilers (tested with the 2021 version).

Detailed build instructions can be found at <https://crest-lab.github.io/crest-docs/page/installation>.


### Precompiled binaries

To use the statically linked binaries (Intel compilers)
that can be found at the [release page](https://github.com/crest-lab/crest/releases),
of this repository.
The most recent program version is automatically build (`meson`/`ifort`) from the main branch and can be found at the [**continous release page**](https://github.com/crest-lab/crest/releases/tag/latest).
Simply unpack the binary and add it to your *PATH* variable.
```bash
unzip crest.zip
```
The program should be directly executable in most cases.
or
```bash
tar -xf crest-latest.tar.xz
```
The program should be directly executable.

### Tested builds
Working and tested builds of CREST (mostly on Ubuntu 20.04 LTS):

| Build System | Compiler | Linear Algebra Backend | Build type | Status |
|--------------|----------|------------------------|:--------------:|:----------:|
| CMake | GNU (gcc 10.3.0) | [OpenBLAS](https://github.com/xianyi/OpenBLAS) (with OpenMP) | dynamic ||
| CMake | GNU (gcc 10.3.0) | [MKL shared (oneAPI 2023.1)](https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl.html) | dynamic ||
| Meson | [Intel (`ifort`/`icc` 2021.9.0)](https://www.intel.com/content/www/us/en/developer/tools/oneapi/toolkits.html) | [MKL static (oneAPI 2023.1)](https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl.html) | static ||
| Meson | [Intel (`ifort` 2021.9.0/`icx` 2023.1.0)](https://www.intel.com/content/www/us/en/developer/tools/oneapi/toolkits.html) | [MKL static (oneAPI 2023.1)](https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl.html) | static ||



Generally, subprojects should be initialized for the *default* build options, which can be done by
```bash
git submodule init
git submodule update
```
For more information about builds including subprojects see [here](./subprojects/README.md).

Some basic build instructions can be found in the following dropdown tabs:

### Meson
<details open>
<summary><h4><code>meson</code> build</h4></summary>
<!-- blank line to recover markdown format-->

For the setup an configuration of meson see also the [meson setup](https://github.com/grimme-lab/xtb/blob/master/meson/README.adoc) page hosted at the `xtb` repository.
The chain of commands to build CREST with meson is:
Expand All @@ -51,35 +86,36 @@ meson setup _build --prefix=$PWD/_dist
meson install -C _build
```

When attempting to build with `gfortran` and `gcc`, add `-Dla_backend=mkl` to the meson setup command. Tested with version 10.2 of the GNU compilers.
The `meson` build of CREST is mainly focused on and tested with the Intel `ifort`/`icc` compilers.
When using newer versions of Intel's oneAPI, replacing `icc` with `icx` should work. Please refrain from using `ifx` instead of `ifort`, however.
When attempting to build with `gfortran` and `gcc`, add `-Dla_backend=mkl` to the meson setup command. Compatibility with the GNU compilers might be limited. We recommend the CMake build (see below) in this instance.

By default the `meson` build will create a **statically** linked binary.
</details>

### Cmake
<details>
<summary><h4><code>CMake</code> build</h4></summary>
<!-- blank line to recover markdown format-->

For the setup of Cmake see also the [Cmake setup](https://github.com/grimme-lab/xtb/blob/master/cmake/README.adoc) page hosted at the `xtb` repository.
For the setup of CMake see also the [CMake setup](https://github.com/grimme-lab/xtb/blob/master/cmake/README.adoc) page hosted at the `xtb` repository.
Building CREST with CMake works with the following chain of commands:

```bash
export FC=ifort CC=icc
export FC=gfortran CC=gcc
cmake -B _build -DCMAKE_BUILD_TYPE=Release
make -C _build
```

and to build the CREST binary

and then to build the CREST binary
```bash
make -C _build
```

### Building via `make`

In the `src` directory a `Makefile` can be found to build a statically linked binary. Modify the makefile to your requirements and build the program via
```bash
make
```
The CMake build of CREST is focused on and tested with the GNU `gfortran`/`gcc` compilers. The Intel compilers could technically be used as well, but in our experience the respective build is more fragile than its static `meson` counterpart.

By default the `CMake` build will create a **dynamically** linked binary.
</details>

### Conda
<details>
<summary><h4>Conda build</h4></summary>
<!-- blank line to recover markdown format-->

A [conda-forge](https://github.com/conda-forge) feedstock is maintained at <https://github.com/conda-forge/crest-feedstock>.

Expand All @@ -96,11 +132,13 @@ Once the `conda-forge` channel has been enabled, CREST can be installed with `co
conda install crest
```

The confa-forge distribution is based on a CMake/`gfortran` build.
</details>


---

## Citations
### Citations

1. P. Pracht, F. Bohle, S. Grimme, *Phys. Chem. Chem. Phys.*, **2020**, 22, 7169-7192.
DOI: [10.1039/C9CP06869D](https://dx.doi.org/10.1039/C9CP06869D)
Expand All @@ -117,7 +155,9 @@ conda install crest
5. S. Spicher, C. Plett, P. Pracht, A. Hansen, S. Grimme, *J. Chem. Theory Comput.*, **2022**,
*18*, 3174-3189. DOI: [10.1021/acs.jctc.2c00239](https://dx.doi.org/10.1021/acs.jctc.2c00239)

## License
6. P. Pracht, C. Bannwarth, *J. Chem. Theory Comput.*, **2022**, *18 (10)*, 6370-6385. DOI: [10.1021/acs.jctc.2c00578](https://dx.doi.org/10.1021/acs.jctc.2c00578)

### License

CREST is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Expand Down
Binary file added assets/newtoc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit c54b4ac

Please sign in to comment.