A wrapper for xtb
Project description
Introduction
SCINE XTB Wrapper is a wrapper around xtb, it exports:
GFN0-xTB
GFN1-xTB (formerly GFN-xTB)
GFN2-xTB
GFN-FF
into the SCINE tool chain. Each method is represented by its own Calculator and the entire wrapper constitutes a SCINE module that can be loaded dynamically at runtime. For more information on these concepts see the Scine::Core repository.
License and Copyright Information
The SCINE XTB wrapper is distributed under the BSD 3-clause “New” or “Revised” License. For more license and copyright information, see the file LICENSE.txt in the repository.
Note: this license does not cover the original xtb source code. For the copyright information of the xtb code please follow the linked git submodule to the developers’ repository.
Installation and Usage
The wrapper can be built and installed using the following commands:
export INSTALL_PATH=<desired path> git submodule init git submodule update mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release -DSCINE_BUILD_PYTHON_BINDINGS=ON -DCMAKE_INSTALL_PREFIX=$INSTALL_PATH .. make -j<number of cores to use> make install
This will generate and install both the main xtb code and the wrapper in the form of the file xtb.module.so that can be used in SCINE.
In order to make XTB available to SCINE the following two environment variables need to be set:
export XTBPATH=$INSTALL_PATH/share/xtb export SCINE_MODULE_PATH=$SCINE_MODULE_PATH:$INSTALL_PATH/lib
Afterwards, SCINE programs such as ReaDuct will pick up XTB’s existence and it will be possible to request the implemented methods.
The SCINE XTB wrapper is also available via Python. The underlying SCINE module can be loaded and its implemented calculators accessed using the standard scine_utilities Python bindings. A minimal workflow could look like this:
import scine_utilities as su import scine_xtb_wrapper # Generate Structure structure = su.AtomCollection() structure.elements = [su.ElementType.H, su.ElementType.H] structure.positions = [[-0.7, 0, 0], [0.7, 0, 0]] # Get calculator calculator = su.core.get_calculator('GFN2', 'xtb') # Configure calculator calculator.structure = structure calculator.set_required_properties([su.Property.Energy, su.Property.Gradients]) # Calculate results = calculator.calculate() print(results.energy) print(results.gradients)
How to Cite
When publishing results obtained with the SCINE XTB wrapper, please cite the corresponding release as archived on Zenodo (DOI 10.5281/zenodo.5782861; please use the DOI of the respective release).
This wrapper should also not be mistaken for the actual xtb code it wraps. For the latter code and its citations, we refer you to the original xtb repository. There you will find the references of the actual methods used. They are listed in the README.md.
Support and Contact
In case you should encounter problems or bugs with the wrapper, please write a short message to scine@phys.chem.ethz.ch.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for scine_xtb_wrapper-2.0.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b316b1491244f95f87189fcf9105de14630e393d73b5c4350b24e5b5dcae327f |
|
MD5 | 5e811a2138bcc97b11e021ea40dcec53 |
|
BLAKE2b-256 | 6b423a464585fde796bede27caa025bd6e51dbb2ab733f85d61dc63d05d60e99 |
Hashes for scine_xtb_wrapper-2.0.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 46d6c18c5d5f06cccc2ee8f1db6cd868d7fed2b682e501546d2f26991ba9896f |
|
MD5 | 880e597be2cda07bfb25474c3e6b3764 |
|
BLAKE2b-256 | d9d21c7c4e9f42c2b1ca889e801d2fede0969b42b2885a670402a2468ef33979 |
Hashes for scine_xtb_wrapper-2.0.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 024874520fbe9a7580697fd08c2d29d2b5bcf18b703cd261b55988d34170542b |
|
MD5 | 06512d43ac8b26ef2284f427908b0a2d |
|
BLAKE2b-256 | a58ac29c1dbb4f786d41efd596498747939aca20c47cc049f2c2c8187d3ac268 |