Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
eimrek committed Jan 10, 2024
1 parent 3ab4552 commit b802ff4
Showing 1 changed file with 25 additions and 15 deletions.
40 changes: 25 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,39 @@
<span style="padding: 1em">
<img height="70px" align="center" src="https://matsci.org/uploads/default/original/2X/b/bd2f59b3bf14fb046b74538750699d7da4c19ac1.svg">
</span>
<span style="padding: 1em">
<img height="70px" align="center" src="https://raw.githubusercontent.com/materialscloud-org/discover-mc3d-react/main/public/mcloud_spinner.svg">
</span>
</div>


# <div align="center">archive-optimade-integration</div>
# <div align="center">optimade-maker</div>

Code and data related to the integration of the Materials Cloud Archive (MCA) and OPTIMADE.
The aim is to provide a way for MCA users to create archives that can ingested
and hosted as [OPTIMADE APIs](https://optimade.org), enabling enhanced data discoverability and
explorability.
Code for making [OPTIMADE APIs](https://optimade.org) from various formats of structural data (e.g. an archive of CIF files).

This prototype repository contains two Python packages that work towards this
aim, as well as example scripts for deployment.
This repository contains the following Python packages that work towards this
aim:

- `mc_optimade`: defines a config file format for annotating archives and registered the desired OPTIMADE entries, and a workflow for ingesting them and converting into OPTIMADE types using pre-existing parsers (e.g., ASE for structures). The archive is converted into an intermediate [OPTIMADE JSON Lines](https://github.com/Materials-Consortia/OPTIMADE/issues/471#issuecomment-1589274856) format that can be ingested into a database and used to serve a full OPTIMADE API.
- `optimade_launch`: provides a platform for launching an OPTIMADE API server
- `src/mc_optimade`: defines a config file format for annotating archives and registered the desired OPTIMADE entries, and a workflow for ingesting them and converting into OPTIMADE types using pre-existing parsers (e.g., ASE for structures). The archive is converted into an intermediate [OPTIMADE JSON Lines](https://github.com/Materials-Consortia/OPTIMADE/issues/471) format that can be ingested into a database and used to serve a full OPTIMADE API.
- `src/optimade_launch`: provides a platform for launching an OPTIMADE API server
from such a JSON lines file. It does so using the
[`optimade-python-tools`](https://github.com/Materials-Consortia/optimade-python-tools/)
reference server implementation.
- `mcloud_implementation`: A set of tools and configuration used to deploy the
"archive watcher" and associated scrapers for MCA.

## Usage

To generate an [OPTIMADE JSON Lines](https://github.com/Materials-Consortia/OPTIMADE/issues/471) file, the structural data needs to be accompanied by an `optimade.yaml` config file. A minimal example for a zip archive (`structures.zip`) of cif files is the following:

```
entries:
- entry_type: structures
entry_paths:
- file: structures.zip
matches:
- structures/cifs/*.cif
```

Run `optimake .` in the folder containing `structures.zip` and `optimade.yaml` to generate the jsonl file.

See `src/mc_optimade/examples` for other supported formats and corresponding `optimade.yaml` config files.


## Relevant links

Expand All @@ -34,7 +44,7 @@ reference server implementation.

## Contributors

This prototype was created at the Paul Scherrer Institute, Switzerland in the week of
Initial prototype was created at the Paul Scherrer Institute, Switzerland in the week of
12th-16th June 2023.

Authors (alphabetical):
Expand Down

0 comments on commit b802ff4

Please sign in to comment.