[DFTB-Plus-User] How to use as a library

Ben Hourahine benjamin.hourahine at strath.ac.uk
Sun Apr 28 22:40:35 CEST 2019

Hello Michael,

the 19.1 release (in the next few weeks) will have examples of calling
the API.

You can check the pre-release candidate out at the moment on the master
branch at


with some examples in C and Fortran that use the library in the
test/api/mm/testers directory and some information in the manual.

This covers examples where forces are returned to an external driving code.

You can also use an iPi style socked interface to the code (see examples
in the





On 26/04/2019 21:04, Michael Lamparski wrote:
> Hello all.
> I would like to use DFTB+ to compute forces for another code.  But I
> am a bit confused about how DFTB+ can be used as a library:
> On the one hand:
> * The DFTB+ website front page claims you can "embed it into your own
> academic or commercial simulation package as a library."
> * DFTB+ is licensed under the Lesser GPL, something that only makes
> sense for libraries.
> On the other hand, searching the entire source tree for the word
> "api", "lib", "public", "build", "install", "include", "high" (as in
> "high-level") or any other reasonable term I can think of brings up no
> documentation for how to use it as a library.
> I see that the source code is structured into directories whose names
> begin with `lib_`, but I don't see a way to produce something tangible
> from them that I can link against from another language. (e.g. an
> `.so` file)  Any clues?
> ---
> Michael
> _______________________________________________
> DFTB-Plus-User mailing list
> DFTB-Plus-User at mailman.zfn.uni-bremen.de
> https://mailman.zfn.uni-bremen.de/cgi-bin/mailman/listinfo/dftb-plus-user

        Dr.  B.  Hourahine,  Senior  lecturer
            SUPA, Department  of  Physics,
             University  of  Strathclyde,
              John  Anderson  Building,
          107 Rottenrow, Glasgow G4 0NG, UK.                    
  +44 141 548 2325, benjamin.hourahine at strath.ac.uk

The  Department is  a partner  in SUPA,  the Scottish
            Universities Physics Alliance

The University  of Strathclyde  is a  charitable body,
       registered in Scotland, number SC015263

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.zfn.uni-bremen.de/pipermail/dftb-plus-user/attachments/20190428/ef6000b2/attachment.html>

More information about the DFTB-Plus-User mailing list