grimme-lab / MindlessGen

Mindless molecule generator in a Python package.
Apache License 2.0
10 stars 2 forks source link

Mindless Molecule Generator

CI

Apache-2.0

Python Versions

mindlessgen is a Python-based program for semi-automated generation of "mindless" small molecules, as described here. The rule-based algorithm places atoms randomly in coordinate space and applies several optimization, fragment detection, and sanity check steps. The program is mainly controlled via a TOML configuration file, see below for details.

One-page overview

One-pager overview

Installation

[!IMPORTANT] xtb (see here) has to be installed on your system, either via conda-forge, as a release binary, or compiled from source. If post-processing with DFT is desired, also orca (see here) has to be available.

Non-development purposes

You can install the project in an existing virtual environment (provided for example by the package managers conda or mamba (see also here and here)). With mamba, a matching Python environment can be set up and activated as follows:

mamba create -n mindlessgen python=3.12
mamba activate mindlessgen

Afterwards, the package can be installed by downloading the package from PyPi:

pip install mindlessgen

This command installs the latest release version of mindlessgen.

Alternatively, it can be installed from the latest source code via cloning the repository:

git clone https://github.com/grimme-lab/MindlessGen.git # or the analogous SSH link
pip install .

Both installation methods work in principle also without a virtual environment, but it is strongly recommended to use one to avoid conflicts with other packages.

Development purposes

For working on the code of mindlessgen, the following setup is recommended:

mamba create -n mindlessgen python=3.12
mamba activate mindlessgen
git clone {link to the MindlessGen repository}
pip install -e '.[dev]'

Thereby, all necessary development tools (e.g., ruff, mypy, tox, pytest, and pre-commit) are installed. Before making changes to the code, activate the pre-commit hooks via:

pre-commit install

Before pushing a commit, run the optional tests, which depend on external dependencies like xtb, via

pytest -vv --optional

Further information on how to contribute to this project can also be found in the contribution guidelines.

Usage

[!WARNING] mindlessgen may still be subject to API changes.

mindlessgen can be executed after installation in the desired environment via:

mindlessgen -h

This command displays all command line options in the terminal. In addition, all commands are accessible via the TOML configuration file. The template configuration file in the root directory of the repository contains comprehensive explanations for each of the available configuration keys. If the path is not specified with -c/--config, mindlessgen.toml will be searched in the following locations, in order:

  1. Current working directory ($CWD)
  2. Home directory ($USER/)

The active configuration can be printed using --print-config.

Citation

When using the program for academic purposes, please cite:

J. Chem. Theory Comput. 2009, 5, 4, 993–1003

or in BibTeX format:

@article{doi:10.1021/ct800511q,
author = {Korth, Martin and Grimme, Stefan},
title = {“Mindless” DFT Benchmarking},
journal = {Journal of Chemical Theory and Computation},
volume = {5},
number = {4},
pages = {993-1003},
year = {2009},
doi = {10.1021/ct800511q},
note ={PMID: 26609608},
URL = {https://doi.org/10.1021/ct800511q},
eprint = {https://doi.org/10.1021/ct800511q}
}

Acknowdledgements

T. Gasevic for creating an initial GitHub migration of the code and making important adjustments to the workflow. S. Grimme and M. Korth for the original code written in Fortran associated to the publication in J. Chem. Theory Comput..