Expose an AiiDA database according to the OPTiMaDe specification.
Optimade API implementation for AiiDA
The server is based on the test server "template" used in the
Indeed, the filter grammar and parser and
pydantic models from
optimade-python-tools are used directly here.
Lastly, the server utilizes the FastAPI concept of routers, which means each endpoint can be "setup" several times, allowing multiple base URLs and more flexibility.
Environment where AiiDA is installed.
AiiDA database containing
StructureData nodes, since these are the only AiiDA nodes that are currently exposed with this API (under the
Note: At the moment,
aiida-optimadeworks most optimally with an AiiDA database using the SQLAlchemy backend.
git clone https://github.com/Materials-Consortia/optimade-python-tools pip install -e optimade-python-tools/ git clone https://github.com/aiidateam/aiida-optimade pip install -e aiida-optimade/
Running the server locally
# specify AiiDA profile (will use default otherwise) export AIIDA_PROFILE=optimade sh run.sh
Running via docker
docker-compose -f profiles/docker-compose.yml up --build
Stop by using
docker-compose -f profiles/docker-compose.yml down
Q: Why create an individual
config.json file instead of just mounting an existing
.aiida directory and using that directly?
A: This, currently, wouldn't work because the
REPOSITORY_URI needs to point to the right path inside the container, not on the host. Furthermore, storing all configurations in the same file can be fragile.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size aiida-optimade-0.2.0.tar.gz (27.2 kB)||File type Source||Python version None||Upload date||Hashes View hashes|