This repository contains the source code of MolAR, an app for chemistry in augmented reaility.
When using MolAR in research, please cite
Sukolsak Sakshuwong, Hayley Weir, Umberto Raucci, and Todd J. Martínez , "Bringing chemical structures to life with augmented reality, machine learning, and quantum chemistry", J. Chem. Phys. 156, 204801 (2022)
MolAR has 2 components:
- iOS app
- web server: mediates between the iOS app and cloud services
Requirements: Python, pip, Mathpix account, AWS account (for Amazon Rekognition), Google Cloud account (for Google Cloud Vision API), and TeraChem Cloud account.
-
cd server
-
pip install httpx boto3 google-cloud-vision tccloud fastapi uvicorn
-
To use the chemical structure recognition feature, create a Mathpix account and set the following environment variables:
MATHPIX_APP_ID
MATHPIX_APP_KEY
-
To use the object recognition feature, follow the instructions on Getting started with Amazon Rekognition, then set the following environment variables:
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
Then follow the instructions on Google Cloud: Setup the Vision API, and put service-account-file.json in the current folder.
-
To use the quantum computation feature, contact the Martinez group to get a TeraChem Cloud account. Then set the following environment variables:
TCCLOUD_USER
TCCLOUD_PWD
-
uvicorn main:app --reload --host 0.0.0.0 --port 8080
Requirements: macOS Big Sur or later, Xcode 12 or later.
cd ios/MolAR
cp Config.swift.example Config.swift
- Edit Config.swift, set the web server address. Then save.
- Open the project in Xcode and run.