-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into feat/ipy-magic
- Loading branch information
Showing
14 changed files
with
1,876 additions
and
512 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: build | ||
on: [push] | ||
|
||
jobs: | ||
# build docker container | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: checkout files in repo | ||
uses: actions/checkout@main | ||
|
||
- name: update jupyter dependencies with repo2docker | ||
uses: jupyterhub/repo2docker-action@master | ||
with: | ||
DOCKER_USERNAME: ltalirz | ||
NO_PUSH: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: push | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
# push to Dockerhub | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: checkout files in repo | ||
uses: actions/checkout@main | ||
|
||
- name: update jupyter dependencies with repo2docker | ||
uses: jupyterhub/repo2docker-action@master | ||
with: | ||
DOCKER_USERNAME: ltalirz | ||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,76 @@ | ||
# Run Calculations with an Large Language Model | ||
# Run Calculations with a Large Language Model | ||
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/jan-janssen/comp-mat-sci-llm/HEAD) | ||
[![Open-with-Voila](https://img.shields.io/badge/Open%20with-Voila-4eafa0.svg)](https://mybinder.org/v2/gh/jan-janssen/comp-mat-sci-llm/main?urlpath=/voila/render/7_voila.ipynb) | ||
[![Docker](https://img.shields.io/badge/docker-%230db7ed.svg?style=for-the-badge&logo=docker&logoColor=white)](https://hub.docker.com/r/ltalirz/comp-mat-sci-llm) | ||
|
||
The computational chemistry and computational materials science community have both developed a great number of | ||
simulation tools. Still these tools typically require either rather cryptic input files or at least a fundamental | ||
programming experience in a language like Python to control them. Furthermore, many questions are only answered in the | ||
documentation, like: | ||
* Which physical units does the code use? | ||
* Which inputs match to which variables in the equations in the paper? | ||
* ... | ||
|
||
We address this challenge by developing a Large Language Model (LLM) extension which provides LLM agents to couple the | ||
LLM to scientific simulation codes and calculate physical properties from a natural language interface. | ||
|
||
## Installation | ||
### Via pip | ||
While our package is not yet available on the Python Package Index, you can install it directly using: | ||
``` | ||
pip install git+https://github.com/jan-janssen/comp-mat-sci-llm.git | ||
``` | ||
The pip package includes optional dependencies for the `mace` model and the `jupyter` integration. | ||
|
||
### Via conda | ||
As the conda package is not yet available on Anaconda.org still you can clone the repository and install the | ||
dependencies directly from conda using the [environment.yml](environment.yml) file. | ||
|
||
## Set up environment for local development | ||
Prerequisites: | ||
- [git](https://git-scm.com/) | ||
- [conda](https://docs.conda.io/en/latest/miniconda.html) | ||
|
||
|
||
```bash | ||
```bash | ||
git clone https://github.com/jan-janssen/comp-mat-sci-llm | ||
cd comp-mat-sci-llm | ||
conda env create -f environment.yml --name comp-mat-sci-llm | ||
``` | ||
|
||
### As Docker Container | ||
Work in Progress | ||
|
||
## Using the package | ||
The package currently provides two interfaces, one for python / jupyter users to query the large language model directly | ||
from a python environment and a second web based interface. | ||
|
||
### Python Interface | ||
```python | ||
import os | ||
from llm_compmat import dialog_python | ||
|
||
dialog_python(OPENAI_API_KEY=os.getenv("OPENAI_API_KEY", None)) | ||
``` | ||
Here the `OPENAI_API_KEY` environment variable referrers to your [OpenAI API token](https://help.openai.com/en/articles/4936850-where-do-i-find-my-openai-api-key). | ||
|
||
### Webbased interface | ||
The webbased interface can be started using [voila](https://voila.readthedocs.io): | ||
``` | ||
voila 7_voila.ipynb | ||
``` | ||
This opens a small application in the webbrowser: | ||
![voila application](docs/images/voila_screenshot.png) | ||
|
||
## Contributors | ||
* [Yuan Chiang](https://github.com/chiang-yuan) | ||
* [Giuseppe Fisicaro](https://github.com/giuseppefisicaro) | ||
* [Jan Janssen](https://github.com/jan-janssen) | ||
* [Greg Juhasz](https://github.com/gjuhasz) | ||
* [Sarom Leang](https://github.com/saromleang) | ||
* [Bernadette Mohr](https://github.com/Bernadette-Mohr) | ||
* [Utkarsh Pratiush](https://github.com/utkarshp1161) | ||
* [Francesco Ricci](https://github.com/fraricci) | ||
* [Leopold Talirz](https://github.com/ltalirz) | ||
* [Pablo Andres Unzueta](https://github.com/pablo-unzueta) | ||
* [Trung Vo](https://github.com/btrungvo) | ||
* [Gabriel Vogel](https://github.com/GaVogel) | ||
* [Luke Zondagh](https://github.com/Luke-Zondagh) |
Binary file not shown.
Oops, something went wrong.