Git Product home page Git Product logo

dftbplus-sys's Introduction

dtfbplus-sys

Generates Rust bindings for the C interface of DFTB+, a package implementing the Density Functional-based Tight Binding method.

Usage

dftbplus-sys is not yet published on crates.io.

You must use a git dependency:

[dependencies]
dftbplus-sys = { git = "https://github.com/ExpHP/dftbplus-sys", tag = "v0.0.2" }

Some assembly may be required!

dftbplus-sys currently always links to a system installation of libdftb+. You need to build DFTB+ with some specific flags to make this work!

Please see Installing DFTB+ for dftbplus-sys for more information.

Docs

See api/mm/dftbplus.h in the DFTB+ source tree. This is the file that bindings will be generated to.

If you just want to see the rust signatures for the bindings, you can also generate those yourself:

git clone https://github.com/ExpHP/dftbplus-sys
cd dftbplus-sys
cargo doc --open

Configuration

There are currently no environment vars or cargo features for configuring dftbplus-sys.

Does it work?

For an easier time diagnosing building/linking issues, you can clone this repo and try running the link-test example. It should create an empty file named link-test.out.

$ git clone https://github.com/ExpHP/dftbplus-sys
$ cd dftbplus-sys
$ cargo run --example=link-test || echo "failure!"
$ ls -l link-test.out
.rw-r--r-- 0 lampam 30 Apr 10:34 link-test.out

Be sure to try this using the environment variables and --features that you plan to enable in your own project.

License

The Rust crate dftbplus-sys is licensed under either the MIT license or the Apache License (Version 2.0), at your option.

DFTB+ is free software licensed under the GNU Lesser GPL v3.0. Its source code is available at https://github.com/dftbplus/dftbplus.

Please notice that the license of DFTB+ contains terms that apply to any code that uses dtfbplus-sys to link to DFTB+. Please see the file LICENSE-LGPL for more details.

Release notes

See Release notes.

Citations

For DFTB+:

  • B. Aradi, B. Hourahine, and Th. Frauenheim. DFTB+, a sparse matrix-based implementation of the DFTB method, J. Phys. Chem. A, 111 5678 (2007).

dftbplus-sys's People

Contributors

exphp avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

colin-daniels

dftbplus-sys's Issues

Expose API_VERSION somehow

The text file (DFTB+ source root)/api/mm/API_VERSION contains a version number for the API. This number adheres to semantic versioning, and would be nice to expose somehow.

Maybe it could go in the pkgconfig file? In that case however, I'd like to have DFTB+ upstream generate the .pc file so that the variable can have an "official" name.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.