Skip to content

Application of Large Language Models (LLM) for computational materials science

Notifications You must be signed in to change notification settings

giuseppefisicaro/LangSim

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Run Calculations with a Large Language Model

Binder Open-with-Voila Docker

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/LangSim.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 file.

Prerequisites:

git clone https://github.com/jan-janssen/LangSim
cd LangSim
conda env create -f environment.yml --name LangSim

Via Docker Container

We build a docker container on every commit to the main branch. You can pull the container from the Docker Hub using:

docker run -p 8866:8866 ltalirz/langsim

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

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.

Webbased interface

The webbased interface can be started using voila:

voila 7_voila.ipynb

This opens a small application in the webbrowser: voila application

Contributors

About

Application of Large Language Models (LLM) for computational materials science

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 98.3%
  • Python 1.7%