sMolTalk is a proof-of-concept that uses OpenAI's GPT-3.5 to generate 3dmol.js code based on natural language input.
It was created by Jakub Lála and Sean Warren as a part of the LLM Hackathon in Chemistry.
A demo can be found in a twitter thread here.
npm install
..env
file in the directory and add your Open API KEY as OPENAI_API_KEY=<OPENAI_API_KEY>
node app.js
.http://localhost:3000
in your web browser.Note that this implementation is heavily limited by prompt leakage, as GPT-3.5 does not contain much 3dmol.js documentation in its training data. A more reasonable proof-of-concept example would be the use of GPT-4 for generating commands for PyMOL, similar to this implementation. The balance between learning from training data and from few-shot examples is very delicate and it's likely that a reliable model would require both some training data input, as well as in-context learning with augmented retrieval and some few-shot examples to understand the formatting requirements.