Metadata-Version: 2.4
Name: asi4py
Version: 1.4.2
Summary: A Python wrapper for Atomic Simulation Interface API
Author-email: Pavel Stishenko <pstishenko@gmail.com>, Gabriel Bramley <BramleyG@cardiff.ac.uk>
License: MIT License
        
        Copyright (c) 2022 Pavel V Stishenko, Andrew Logsdail, Reinhard Maurer, 
        Volker Blum, Mariana Rossi, Ben Hourahine, Scott Woodley, Thomas Keal
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://gitlab.com/pvst/asi
Project-URL: Bug Tracker, https://gitlab.com/pvst/asi/-/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: ase==3.24.0
Requires-Dist: scalapack4py==0.1.1
Dynamic: license-file

# Atomic Similation Interface (ASI) API

Atomic Simulation Interface (ASI) is a native C-style API that includes functions for export and import of data structures that are used in electronic structure calculations and for classical molecular dynamics simulations. ASI aims to be a uniform, generic and efficient interface for connecting various computational chemistry and materials science codes in multiscale simulation workflows, such as QM/MM, QM/ML, QM/QM. ASI specifies functions, data types and calling conventions for export and import of density matrices, overlap and Hamiltonian matrices, electrostatic potential, atomic coordinates, charges, total energy and forces. 

## ASI API specification

ASI API is specified as a C header file [`asi.h`][1]. Codes implementing ASI API must provide linkable library with definitions of functions from [`asi.h`][1]. Depending on particular usage of the implementaions, some functions can be ommited or implemented as stubs, if they are not going to used. To use Python ASI wrapper it is necessary to have all functions from `asi.h` defined, but of course stub definitions can be used.

[**ASI API specification**][1].

[1]: https://pvst.gitlab.io/asi/asi_8h.html

## Supported in:

* [DFTB+](https://dftbplus.org/): [in separate branch](https://github.com/PavelStishenko/dftbplus/tree/ASI_v1.3).
* [FHI-aims](https://fhi-aims.org/): in the main branch.


## Building

### FHI-aims

FHI-aims has embedded support of ASI API. Just build latest version of FHI-aims as a shared library and use with your code.


### DFTB+

1. Download and build DFTB+ from [the branch with ASI API](https://github.com/PavelStishenko/dftbplus/tree/ASI_v1.3) with shared library support.

2. Set environment variables `DFTBP_INCLUDE` and `DFTBP_LIB_DIR` to folders with DFTB+ C-headers and libraries.

3. Optionally export environment variables `INSTALL_PREFIX` and `BUILD_PATH` to set installation and building locations.

4. Run `make && make install` from the root of the working copy of this repository. 

5. The shared library implementing ASI API for DFTB+ will be in `${INSTALL_PREFIX}/lib`.

## Testing

Use `Makefile` in `tests` folder to build native tests. Set environment variables in the header of `tests/Makefile` to link with proper ASI API implementaions.

To run tests go to `tests/testcases` and run `run_dftbp_tests.sh` or `run_aims_tests.sh` to run test.

## Usage

See `tests/src` for examples of usage in native code.

See `tests/python` for examples of usage in Python scripts.


