Scripts for exploring the chemical space with spectral (NMR, IR) data. The complete report can be found in the release page.
- Python 3.x
- Dependent Libraries (See requirements.txt):
- GephiStreamer
- NumPy
- Pandas
- Gephi
You can install the dependencies by:
$ pip install -r requirements.txtIn Gephi, install a plugin called Graph Streaming.
Download or clone this repository.
The scripts work with Gephi. The main pipeline is as following:
-
In Gephi, keep a workspace open and set a name (e.g.
sample) for it. -
Start a stream server for that workspace. (Just right click
Master Serverunder theStreamingtab and start.) -
Run the scripts (visualize the sample):
$ export PYTHONPATH=./src # to import `chemspace` module.
$ python3 scripts/visualize_main.py ./data/sample/m150_nmr.p ./data/sample/m150_ir.p --gephi-workspace sampleIt is recommended to provide arguments to specify the cache files:
$ python3 scripts/visualize_main.py ./data/sample/m150_nmr.p ./data/sample/m150_ir.p --gephi-workspace sample \
--fingerprints-cache cache-sample.h5 --graph-cache cache-sample.p More usage information can be found by:
$ python3 scripts/visualize_main.py --help-
Under the
Layouttab in Gephi, chooseForceAtlas 2andRunwith the default parameters. Stop when the nodes in the graph are distributed in an equilibrium. -
Under the
Appearance-Nodes-Rankingtab, selectdand set expected colors. Go toPreview, andRefreshwith whatever parameters you want. It would also be better if the background is set to black or dark gray.
The Gephi file for the sample can be found in the release page.