NOTES on installing OPENMM in a *virtualenv* instead of a Conda env OpenMM project URL: https://openmm.org/ What is it? OpenMM is a nice python toolkit for molecular dynamics. They provide installation via Conda. But regular old virtualenvs usually "just work" and have many advantages. Advantages of virtualenv: it's not Conda! Hence these rough notes. They should provide a high-level guide to getting openmm in a virtualenv. we'll have to compile from source http://docs.openmm.org/latest/userguide/library/02_compiling.html#compiling-openmm-from-source-code but there are some modifications to make this work with a pip virtualenv rather than conda don't worry, it's not too hard. * FIRST: make sure to activate the environment before doing anything else! (> source bin/activate) * Make a src/ folder for the environment, in your virtualenv's root dir. * Download source for openmm from https://github.com/openmm/openmm/releases * extract into src/ folder * will need cmake and ccmake, these can be installed through apt if don't already have * Download doxygen https://www.doxygen.nl/download.html * extract into src/ folder * find the already compiled doxygen executable in bin/, run pwd to take note of the path to it * something like: /home/me/env_root/src/doxygen-1.10.0/bin/doxygen * you'll need swig. fortunately, it can be obtained via pypi package * https://pypi.org/project/swig/ * > pip install swig * run and take note for future use: > which swig * you'll also need cython * > pip install Cython --install-option="--no-cython-compile" * We'll have to pick a destination for openmm. Start from virtualenv root dir * > mkdir builds * > cd builds * > mkdir openmm * > cd openmm * run pwd, and take note of the result, this is our destination path * something like: /home/me/env_root/builds/openmm * okay, now you can (from the downloaded openmm folder) run the given instructions for build from source * > mkdir build * > cd build * > ccmake .. * Great! But we'll need to fix some ccmake variables first! * first we've got to pick the install location * set CMAKE_INSTALL_PREFIX to the destination path created above * set DOXYGEN_EXECUTABLE to the location we found above * set SWIG_EXECUTABLE to $(which swig) * if you can't see any ccmake variables? * first try toggling to advanced mode by pressing [t] * otherwise, seems like maybe [c] and having errors produced and then retrying works??? * if we want CUDA, it's probably good to check that the appropriate variables are set (eg. path) * now we can proceed with the rest of the installation: press [g] to generate * a makefile should have been generated, run it0: > make * then install: > make install * then install python bindings: > make PythonInstall