Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
technical:recipes:openmm [2024-07-29 14:09] – [Create OpenMM Virtualenv] bkang | technical:recipes:openmm [2024-07-29 14:50] (current) – [VALET Package Definition] bkang | ||
---|---|---|---|
Line 15: | Line 15: | ||
These commands create any missing directories. | These commands create any missing directories. | ||
- | ===== Create | + | ===== Create Virtualenv ===== |
The Python distribution will form the basis for the anaconda virtualenv, so add it to the environment: | The Python distribution will form the basis for the anaconda virtualenv, so add it to the environment: | ||
Line 50: | Line 50: | ||
</ | </ | ||
+ | |||
+ | Before building and installing OpenMM the environment needs to be activated: | ||
+ | |||
+ | <code bash> | ||
+ | $ conda activate $WORKDIR/ | ||
+ | (/ | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== Building OpenMM ===== | ||
+ | |||
+ | With the new virtual environment activated, we can now build OpenMM. | ||
+ | |||
+ | <code base> | ||
+ | (/ | ||
+ | Solving environment: | ||
+ | : | ||
+ | Proceed ([y]/n)? y | ||
+ | : | ||
+ | Preparing transaction: | ||
+ | Verifying transaction: | ||
+ | Executing transaction: | ||
+ | |||
+ | done | ||
+ | </ | ||
+ | |||
+ | ===== VALET Package Definition ===== | ||
+ | |||
+ | The new virtual environment can easily be added to your login shell and job runtime environments using VALET. | ||
+ | Assuming the workgroup does //not// already have a OpenMM VALET package definition, the following text: | ||
+ | |||
+ | <file openmm.vpkg_yaml> | ||
+ | openmm: | ||
+ | prefix: / | ||
+ | description: | ||
+ | flags: | ||
+ | - no-standard-paths | ||
+ | actions: | ||
+ | - action: source | ||
+ | script: | ||
+ | sh: anaconda-activate-2020.sh | ||
+ | order: failure-first | ||
+ | success: 0 | ||
+ | versions: | ||
+ | " | ||
+ | description: | ||
+ | dependencies: | ||
+ | - anaconda/ | ||
+ | </ | ||
+ | |||
+ | would be added to '' | ||
+ | |||
+ | ===== Using the Virtual Environment ===== | ||
+ | |||
+ | The versions of the virtual environment declared in the VALET package are listed using the '' | ||
+ | |||
+ | <code bash> | ||
+ | $ vpkg_versions openmm | ||
+ | |||
+ | Available versions in package (* = default version): | ||
+ | |||
+ | [/ | ||
+ | openmm | ||
+ | * 20240726 | ||
+ | </ | ||
+ | |||
+ | You can import openmm, activating the virtual environment is accomplished using the '' | ||
+ | |||
+ | <code bash> | ||
+ | $ vpkg_require openmm/ | ||
+ | Adding dependency `anaconda/ | ||
+ | Adding package `openmm/ | ||
+ | (/ | ||
+ | ~/ | ||
+ | Python 3.12.4 | packaged by conda-forge | (main, Jun 17 2024, 10:23:07) [GCC 12.3.0] on linux | ||
+ | Type " | ||
+ | >>> | ||
+ | >>> | ||
+ | </ |