Software and hardware control of AI-EDISON. The version-specific repository for the paper is available in Zenodo here. From that version, this repository has been updated from three perspectives below, but no relevant codes/files used in the work have been changed:
- We corrected some typo errors and updated multiple README.md files as well as statements of license/restrictions for a clearer guidance;
- We have added some additional contents which include: a missing license of DrDAQ driver locally to this repository (the preivous hyperlink was not valid); the source codes to simulate the target spectra for the experimental optimization in the paper.
- We updated several unused/invalid links, scripts and functions (e.g., several links in requirement.txt and the "dense_to_sparse" function (which contains a variable error but was never used) in dda.py) to avoid potential ambiguity.
Please refer to this repository for general guidance and license information.
The full bill of materials to construct the robot are available here.
The following software are required to control the robot:
- Python >= 3.6 (Linux / Windows)
- Arduino Command Handler
- Arduino Command Tools
- pySerial 3.4
- SerialLabware
- pycont
- commanduino
- CommanduinoLabware
- InorganicClusterDiscovery
- XDL (with its gitlab link here) (Note we used XDL 1 in this work. Specifically, XDL 1.6.0 was used to generate the digital signatures of the six AuNPs.)
- SeaBreeze
- PicoTech
- ModularWheelPlatform
- Nanobot
Go to the corresponidng folders of ModularWheelPlatform and Nanobot, and use "pip install ." to install these two packages. In ModularWheelPlatform, we used DrDAQ to measure the pH. In Nanobot, the code is based on SeaBreeze from Ocean Optics to control the spectrometers. For the usage of UV-Vis spectrum, the integration time is set (either 0.01 or 0.02 s) to avoid spectral saturation.
The MAP-Elites algorithm was described in the manuscript and supplementary information. An example of exploring the multiple-peak systems in chemical sapce 2 with pH control is available here.
The original codes to simulate the target spectra for Au nanorods/octahedra for the experimental optimisation are here. See below for more information about the simulation engine PyDScat-GPU.
The codes to generate syntehsis/reaction/hardware graph, and control the robot are available here.
The codes to generate the unique digital signatures using XDL are available here.
- Python >= 3.6 (Linux / Windows)
- numpy
- matplotlib
- Tensorflow >= 2.0
- pathlib
- fresnel
- Mathematica >= 12.0
PyDScat-GPU is developed for efficient scaterring simulations with discrete-dipole approximation method. One example was given below, and see here for more details and examples.
import os
import json
import pathlib
import numpy as np
from dda import DDA
# GPU Device Config
os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID"
os.environ["CUDA_VISIBLE_DEVICES"]="3"
current_folder_path = pathlib.Path().absolute()
config = {'gpu_device': '/GPU:0',
'dipole_length': 1,
'min_wavelength': 0.4,
'max_wavelength': 0.8,
'num_wavelengths': 41,
'ref_medium': 1.333,
'rotation_steps': 10,
'folder_path': None,
'calculate_electricField': True,
'lattice_constant': 0.41,
'ref_data': [str(current_folder_path) + '/Au_ref_index.csv',str(current_folder_path) + '/Ag_ref_index.csv'],
'metals': ["Au","Ag"],
'dipole_data': str(current_folder_path)+ '/dipole_list.csv',
"ratio":[1.0, 0.0],
"method":"homo",
"custom_ratio_path":None,
'atom_data':None,
'lattice_constant': None
}
config['folder_path'] = str(current_folder_path)
np_dda = DDA(config)
np_dda.run_DDA()
np_dda.plot_spectra()
np.savetxt("Results.csv",np.array(np_dda.C_cross_total)/np.pi/np_dda.c_rad**2,delimiter=",")
Both MAP-Elites and GS-LS algorithms were benchmarked in a simulated chemical space using superellipsoid as the shape descriptor. The code of creating the discrete dipoe representation of a superellipsoid is here. We created the set of dipoles by changing the (a,b,c,r,t) parameters of the createDipoles function in the mathematica notebook to approximate the specific geometry.
The codes to reproduce the results from the in silico exploration of two simulated chemical spaces are here.
The code to reproduce the results from the in silico optimisation is here.
The license aims to protect the design of the robot in this work for non-commercial usage only. For the codes used in this work, see here for the license information. However, if the licenses listed here are incompatible with the licenses of certain resources that parts of this work are based on, the original licenses of these resources should be used for the relevant parts of this work.
Copyright 2022 The Cronin Group, University of Glasgow.