This is an old revision of the document!
OpenMM Python Virtual Environment
This page documents the creation of a Python virtual environment (virtualenv) containing the OpenMM software on the Caviness HPC system1). It assumes that the user is adding the software to the workgroup storage.
Prepare Workgroup Directory
Prepare to add software in the standard sub-directories of the workgroup storage:
[user@login01 ~]$ workgroup -g my_workgroup [(my_workgroup:user)@login01 ~]$ mkdir --mode=2775 --parent ${WORKDIR}/sw/openmm [(my_workgroup:user)@login01 ~]$ mkdir --mode=2775 --parent ${WORKDIR}/sw/valet
These commands create any missing directories. All directories created will have group-write and -inherit permissions.
Create OpenMM Virtualenv
The Python distribution will form the basis for the anaconda virtualenv, so add it to the environment:
[(my_workgroup:user)@login01 ~]$ vpkg_require anaconda/2024.02 Adding package `anaconda/2024.02` to your environment
The virtual environment is first populated with all packages that do not require mpi4py. Any packages requiring mpi4py must be installed after we build and install our local copy of mpi4py in the virtual environment. In this example, neither Numpy nor Scipy require mpi4py.
The two channel options are present to ensure only the default Anaconda channels are consulted – otherwise the command could still pick packages from the Intel channel, for example, which would still have the binary compatibility issues!
$ conda create --prefix ${HOME}/conda-envs/my-sci-app/20201102 --channel defaults --override-channels python'=>3.7' numpy scipy Solving environment: done : Proceed ([y]/n)? y : Preparing transaction: done Verifying transaction: done Executing transaction: done # # To activate this environment, use: # > source activate /home/1001/conda-envs/my-sci-app/20201102 # # To deactivate an active environment, use: # > source deactivate #