Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into feat/ipy-magic
Browse files Browse the repository at this point in the history
  • Loading branch information
ltalirz committed May 9, 2024
2 parents 3e6a4f8 + 7e6c8d7 commit f7e68d4
Show file tree
Hide file tree
Showing 14 changed files with 1,876 additions and 512 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/build.yml
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
20 changes: 20 additions & 0 deletions .github/workflows/push.yml
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 }}
446 changes: 42 additions & 404 deletions 5_multiple_simulation_codes_jj.ipynb

Large diffs are not rendered by default.

389 changes: 301 additions & 88 deletions 7_voila.ipynb

Large diffs are not rendered by default.

381 changes: 381 additions & 0 deletions 8_RDF.ipynb

Large diffs are not rendered by default.

67 changes: 63 additions & 4 deletions README.md
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 added data/Er_bulk_md.dcd
Binary file not shown.
Loading

0 comments on commit f7e68d4

Please sign in to comment.