Package: deepdrivemd
DeepDriveMD-F (DeepDriveMD-pipeline)DeepDriveMD-F: Deep-Learning Driven Adaptive Molecular Simulations (file-based continual learning loop)Details can be found in thedocumentation. For more information, please see ourwebsite.How to runRunning DeepDriveMD requires the use of virtual environment. At this point we distinguish different stage runs of DeepDriveMD using different virtual environments to alleviate package compatibility with associated dependencies across different stages.For instance, below is a list of Python versions used by different virtual environments:RCT env: Python 3.7.8OpenMM env: Python 3.7.9pytorch (AAE) env: Python 3.7.9keras-cvae (CVAE) & rapids-dbscan: Python 3.6.12SetupStage: molecular_dynamicsInstalldeepdrivemdinto a virtualenv with a Python virtual environment:python3 -m venv env
source env/bin/activate
pip install --upgrade pip setuptools wheel
pip install -e .Or with a Conda virtual environment:. ~/miniconda3/etc/profile.d/conda.sh
conda create -n deepdrivemd python=3.7.9
conda activate deepdrivemd
pip install --upgrade pip setuptools wheel
conda install scipy (this step is needed if a failure of installing scipy is observed)
pip install -e .Install OpenMM:by source code (for Linux ppc64le, e.g., Summit)https://gist.github.com/lee212/4bbfe520c8003fbb91929731b8ea8a1eby conda (for Linux x86_64, e.g., PSC Bridges)module load anaconda3
module load cuda/9.2
source /opt/packages/anaconda/anaconda3-5.2.0/etc/profile.d/conda.sh
conda install -c omnia/label/cuda92 openmmIn some places, DeepDriveMD relies on external libraries to configure MD simulations and import specific ML models.For MD, install themdtoolspackage found here:https://github.com/braceal/MD-toolsgit clone https://github.com/braceal/MD-tools.git
pip install .For ML (specifically the AAE model), install themoleculespackage found here:https://github.com/braceal/molecules/tree/maingit clone https://github.com/braceal/molecules.git
pip install .Stage: machine_learningInstall thedeepdrivemdvirtual environment as above (deepdrivemdis needed in all the virtual environments since each task uses the DDMD_API to communicate with the outputs of other tasks).Install thekeras-CVAEmodel withrapidsai DBSCANpackage found here:https://www.ibm.com/docs/en/wmlce/1.6.2?topic=installing-mldl-frameworksconda config --prepend channels https://public.dhe.ibm.com/ibmdl/export/pub/software/server/ibm-ai/conda/
conda install powerai-rapidsInstall packagesscikit-learnandh5pyversion 2.10.0:conda install scikit-learn h5py=2.10.0Install thetensorflow-gpupackage (need to compile with CUDA 10.2.89, not compatible with CUDA 10.1.243 and CUDA 11.1.1 or higher versions):conda install tensorflow-gpuGenerating a YAML input spec:First, run this command to get asampleYAML config file:python -m deepdrivemd.configThis will write a file nameddeepdrivemd_template.yamlwhich should be adapted for the experiment at hand. You should configure themolecular_dynamics_stage,aggregation_stage,machine_learning_stage,model_selection_stageandagent_stagesections to use the appropriate run commands and environment setups.Running an experimentThen, launch an experiment with:python -m deepdrivemd.deepdrivemd -c <experiment_config.yaml>This experiment should be launchedNote on input dataThe input PDB and topology files should have the following structure:ls data/sys*

data/sys1:
comp.pdb comp.top

data/sys2:
comp.pdb comp.topWhere the topology files are optional and only used whenmolecular_dynamics_stage.task_config.solvent_typeis "explicit". Only one system directory is needed but an arbitrary number are supported. Also note that the system directory names are arbitrary. The path to thedatadirectory should be passed into the config viamolecular_dynamics_stage.initial_pdb_dir.DeepDriveMD-S (Streaming asynchronous execution with ADIOS)The streaming version of DeepDriveMD uses the adios2 package.adios2is installed with spack:spack install adios2 +python -mpiTo use adios2 in python, one needs to load the corresponding module, for example, withmodule load adios2orspack load adios2and to set upPYTHONPATHto the corresponding subdirectory of the adios2 installation:export PYTHONPATH=<ADIOS2_dir>/lib/python<version>/site-packages/:$PYTHONPATHTo make a small 30m, 12 simulation, 1 aggregator, test run of DeepDriveMD-S, cd intotest/and runmake run1To make a large 12h, 120 simulations, 10 aggregators run domake run2in DeepDriveMD-pipeline directory.To watch how one of the aggregation files grows, do, for examplemake watch1 d=3assuming that the experiment directory is../Outputs/3.To watch what happens in one of the simulation task directory, domake watch2 d=3To watch the log for task 0014 (for run1 it corresponds to the outlier search log), domake watch3 d=0014To clean after the run, domake clean d=3The configuration files for the run, includinggenerate.pythat is used to createconfig.yaml, adios xml files for SST streams between simulations and aggregators and for BP files between aggregators and the downstream two components, are in a subdirectory of
test/bba, for example,test1_stream(run1) andlassen-keras-dbscan_stream(run2). Yaml files are generated by running./generate.py > config.yamlor, if you prefer, you can editconfig.yamldirectly and not usegenerate.py.To use multiple input files, put the corresponding pdb files intocfg.initial_pdb_dir. The simulation sorts pdb files from this directory and picks up the one corresponding to its task id modulo the number of pdb files.ContributingPlease reportbugs,feature requests, orquestionsthrough theIssue Tracker.If you are looking to contribute, please seeCONTRIBUTING.md.LicenseDeepDriveMD has a MIT license, as seen in theLICENSEfile.MIT LicenseCopyright (c) 2021 DeepDriveMD-FPermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.