DeepCV is a computer code that implements our developed unsupervised machine learning called deep autoencoder neural network (DAENN) for learning low-dimensional collective variables (CVs) aka slow-mode reaction coordinates of a set of molecules for enhanced sampling.
Website: https://lubergroup.pages.uzh.ch/deepcv/
- Molecular features
- Internal coordinates
- SPRINT and eXtended SPRINT coordinates
- Dense autoencoder neural nets
- Single and multi-input simple and stacked autoencoder
- Avoid saturation
- GPU acceleration
- Learn CVs in expanded configurational space
- Customized loss functions with minimaxation technique
- Primary loss: main loss with regularization
- Secondary loss: Additional loss to be maximized to expand the CV space
- Self-directed expansion of configurational space
- Customized loss functions with minimaxation technique
- Generative model for generating data
- Generative adversarial networks (GANs)
- Variational autoencoder (future work)
- Can interface with PLUMED and CP2K
- Input file generator (GUI) for PLUMED and CP2K
- Analysis tools
- Feature importance
- Sampling convergence assessment
-
Python codes
cd deepcv/ pip install -r requirements.txt pip install .
-
C++ codes
cd deepcv/ export LIB_TF=/usr/local/tensorflow/ g++ -Wall -fPIC -o deepcv.o deepcv.cpp \ -O3 -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14 -fPIC \ -I${LIB_TF}/include/ -L${LIB_TF}/lib \ -ltensorflow -ltensorflow_cc -ltensorflow_framework g++ -shared -fPIC -o deepcv.so deepcv.o
or you can use
make
make CXXFLAGS="-std=c++14 -fPIC"
The following is an example command for training model of CVs for Diels-Alder reaction using features extracted from reactant trajectory. You can call DeepCV's DAENN via either main.py
API or deepcv_daenn
command (register entrypoint).
python main.py daenn -i input_ae_DA.json
or
deepcv_daenn -i input_ae_DA.json
- Python 3.6 or a newer version
- Use git control:
git clone https://gitlab.uzh.ch/lubergroup/deepcv.git
- Please write function docstring and comment for difficult-to-understand code
- Document modules and packages you are developing
- Format codes with Black
- Send pull-request to master with an explanation, for example, what you contribute, how it works, and usefulness
To install all dependencies packages of DeepCV, you can follow either following way:
-
All at once (for the users)
- Using PIP
pip install --upgrade pip
pip install -r requirements.txt
- Using Conda (recommended)
conda update --all -y
conda install --file requirements.txt
- Using PIP
-
Install packages separately (recommended for the developers)
- NumPy >= 1.22.2
- E.g.,
pip install --upgrade numpy==1.23.4
- E.g.,
- TensorFlow + Keras 2.10.0
pip install tensorflow
(CPU)conda install tensorflow-gpu
(+ CUDA & cuDNN)
- NVIDIA GPU and CUDA 10.1 (for GPU enabled)
- cuDNN v7.6.4 (September 27, 2019), for CUDA 10.1
- pydot (for
keras.utils.vis_utils.plot_model
)conda install pydot
- other important packages are listed in requirements.txt
- NumPy >= 1.22.2
-
DeepCV C++ makes use of JSON parser
- Variational autoencoder
- Improve neural network algorithm for large systems e.g. metal-oxide surface
- Improve code compatibility between TensorFlow, PLUMED, and CP2K
- Rangsiman Ketkaew ([email protected])
- Sandra Luber ([email protected])