Skip to main content

Python bindings for KFReader, a library from the ADF computational chemistry package

Project description

kfreader-cffi is a Python package for reading binary result files produced by the Amsterdam Density Functional (ADF) program suite (http://scm.com). Instead of kf.py, this package does not require working ADF installation.

It uses CFFI to interface with the original C library KFReader.

Installation

Note that kfreader-cffi currently is only tested under Python 3.x on Ubuntu

First we need to install some prerequisites:

sudo apt-get update
sudo apt-get install gcc make cmake python3-dev libffi-dev

Then to install the package, simply:

pip install kfreader-cffi

Or for development:

git clone https://github.com/mstolyarchuk/kfreader-cffi
pip install -e kfreader-cffi

Shared library libkfreader.so will be automatically built from C source files provided in /lib directory during the installation process (see Makefile for details).

Now you are ready to go!

Getting started

Before attempting to use this package, you might find the official documentation on TAPE21 useful.

Usage

>>> from kfreader import KFReader

>>> kfr = KFReader('file.t21')
>>> kfr.get_data('General', 'termination status')
'NORMAL TERMINATION'

>>> kfr.close()

Acknowledgments

Many thanks to Alexei Yakovlev and all the other developers (http://scm.com) of the original C routines. This package would not exist without their work.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for kfreader-cffi, version 0.2.1
Filename, size File type Python version Upload date Hashes
Filename, size kfreader-cffi-0.2.1.tar.gz (3.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page