|
2 | 2 | Overview |
3 | 3 | ======== |
4 | 4 |
|
5 | | -This OpenMM_ plugin is a laboratory for low-level code implementation. |
| 5 | +This `OpenMM`_ plugin provides Platform-agnostic Force classes. |
6 | 6 |
|
7 | | -Building the Plugin |
8 | | -=================== |
| 7 | +Installation and Usage |
| 8 | +====================== |
9 | 9 |
|
10 | | -This project uses CMake_ for its build system. To build it, follow these steps: |
| 10 | +OpenMM-CPP-Forces is available as a conda package on the `mdtools`_ channel. To install it, run: |
11 | 11 |
|
12 | | -#. Create a directory in which to build the plugin. |
13 | | -#. Run the CMake GUI or ccmake, specifying your new directory as the build directory and the top level directory of this project as the source directory. |
14 | | -#. Press "Configure". |
15 | | -#. Set OPENMM_DIR to point to the directory where OpenMM is installed. This is needed to locate the OpenMM header files and libraries. |
16 | | -#. Set CMAKE_INSTALL_PREFIX to the directory where the plugin should be installed. Usually, this will be the same as OPENMM_DIR, so the plugin will be added to your OpenMM installation. |
17 | | -#. If you plan to build the OpenCL platform, make sure that OPENCL_INCLUDE_DIR and OPENCL_LIBRARY are set correctly, and that PLUGIN_BUILD_OPENCL_LIB is selected. |
18 | | -#. If you plan to build the CUDA platform, make sure that CUDA_TOOLKIT_ROOT_DIR is set correctly and that PLUGIN_BUILD_CUDA_LIB is selected. |
19 | | -#. Press "Configure" again if necessary, then press "Generate". |
20 | | -#. Use the build system you selected to build and install the plugin. For example, if you selected Unix Makefiles, type `make install`. |
| 12 | +.. code-block:: bash |
21 | 13 |
|
22 | | -Python Wrapper |
23 | | -============== |
| 14 | + conda install -c conda-forge -c mdtools openmm-cpp-forces |
24 | 15 |
|
25 | | -As OpenMM_, this project uses SWIG_ to generate its Python API. SWIG takes an "interface |
26 | | -file", which is essentially a C++ header file with some extra annotations added, as its input. |
27 | | -It then generates a Python extension module exposing the C++ API in Python. |
| 16 | +Or: |
28 | 17 |
|
29 | | -To build and install the Python API, build the `PythonInstall` target, for example by typing |
30 | | -`make PythonInstall` (if you are installing into the system Python, you may need to use sudo). |
| 18 | +.. code-block:: bash |
31 | 19 |
|
32 | | -Test Cases |
33 | | -========== |
| 20 | + mamba install -c mdtools openmm-cpp-forces |
34 | 21 |
|
35 | | -To run the C++ test cases, build the "test" target, for example by typing `make test`. |
| 22 | +To use OpenMM-CPP-Forces in your own Python script or Jupyter notebook, simply import it as follows: |
36 | 23 |
|
37 | | -To run the Python test cases, build the "PythonTest" target by typing `make PythonTest`. |
| 24 | +.. code-block:: python |
38 | 25 |
|
| 26 | + import openmmcppforces |
39 | 27 |
|
40 | | -.. _CMake: http://www.cmake.org |
41 | | -.. _OpenMM: https://openmm.org |
42 | | -.. _SWIG: http://www.swig.org |
| 28 | +
|
| 29 | +.. _OpenMM: https://openmm.org |
| 30 | +.. _mdtools: https://anaconda.org/mdtools/openmm-cpp-forces |
0 commit comments