Tblite is a lightweight Python interface to the tblite C++ library, providing fast and efficient tight-binding calculations for quantum chemistry and materials science. It allows users to perform energy, force, and other property calculations for molecular systems. The current version is 0.5.0, and it maintains a regular release cadence, with API changes detailed in release notes.
pip install tblite numpyVerified import paths — ran on the pinned version, not inferred.
Initializes a `Calculator` for a specified tight-binding method, defines a simple H2 molecule, and performs an energy and force calculation, accessing results from the returned dictionary. Also shows an example with an explicit charge.
Update your code to access results via dictionary keys: `result = calc.calculate(...); energy = result['energy']`. Check the documentation for available keys.
Ensure the `method` string exactly matches one of the supported methods listed in the tblite documentation. Common methods include 'GFN1-xTB', 'GFN2-xTB', 'GFN-FF'.
Convert your list of positions to a NumPy array before passing it to `calc.calculate`: `positions = np.array([[x1, y1, z1], ...])`.