technical:recipes:openmm

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
technical:recipes:openmm [2024-07-29 14:16] – [Create Virtualenv] bkangtechnical:recipes:openmm [2024-07-29 14:50] (current) – [VALET Package Definition] bkang
Line 58: Line 58:
 </code> </code>
  
 +
 +===== Building OpenMM =====
 +
 +With the new virtual environment activated, we can now build OpenMM.
 +
 +<code base>
 +(/work/it_css/sw/openmm/20240726)$ conda install -c conda-forge openmm
 +Solving environment: done
 +    :
 +Proceed ([y]/n)? y
 +    :
 +Preparing transaction: done                                                     
 +Verifying transaction: done                                                     
 +Executing transaction: \ By downloading and using the CUDA Toolkit conda packages, you accept the terms and conditions of the CUDA End User License Agreement (EULA): https://docs.nvidia.com/cuda/eula/index.html
 +
 +done
 +</code>
 +
 +===== 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: /work/my_workgroup/sw/openmm
 +    description: openmm within a conda virtualenv
 +    flags:
 +        - no-standard-paths
 +    actions:
 +        - action: source
 +          script:
 +              sh: anaconda-activate-2020.sh
 +          order: failure-first
 +          success: 0
 +    versions:
 +          "20240726":
 +              description: environment built July 26, 2024
 +              dependencies:
 +                  - anaconda/2024.02
 +</file>
 +
 +would be added to ''${WORKDIR}/sw/valet/openmm.vpkg_yaml''.
 +
 +===== Using the Virtual Environment =====
 +
 +The versions of the virtual environment declared in the VALET package are listed using the ''vpkg_versions'' command:
 +
 +<code bash>
 +$ vpkg_versions openmm
 +
 +Available versions in package (* = default version):
 +
 +[/work/it_css/sw/valet/openmm.vpkg_yaml]
 +openmm      openmm within a conda virtualenv
 +* 20240726  environment built July 26, 2024
 +</code>
 +
 +You can import openmm, activating the virtual environment is accomplished using the ''vpkg_require'' command (in your login shell or inside job scripts):
 +
 +<code bash>
 +$ vpkg_require openmm/20240726
 +Adding dependency `anaconda/2024.02` to your environment
 +Adding package `openmm/20240726` to your environment
 +(/work/it_css/sw/openmm/20240726)$ python
 +~/conda-envs/my-sci-app/20201102/bin/python3
 +Python 3.12.4 | packaged by conda-forge | (main, Jun 17 2024, 10:23:07) [GCC 12.3.0] on linux
 +Type "help", "copyright", "credits" or "license" for more information.
 +>>> import openmm as mm
 +>>>
 +</code>
  • technical/recipes/openmm.1722276969.txt.gz
  • Last modified: 2024-07-29 14:16
  • by bkang