Dear all,
I would like to install OpenMM on our server as a Python module without using Conda. What are dependencies for OpenMM? Is there a way to use "pip install" or "python" commands for installation?
Thank you and best regards,
Jarunan
Install OpenMM without Conda
- Emilio Galllicchio
- Posts: 14
- Joined: Fri Feb 24, 2012 11:49 am
Re: Install OpenMM without Conda
To install the OpenMM libraries without Conda we like to have:
set(PYTHON_SETUP_COMMAND "install --prefix=${CMAKE_INSTALL_PREFIX}")
in wrappers/python/CMakeLists.txt instead of the default, which I think is
set(PYTHON_SETUP_COMMAND "install --root=\$ENV{DESTDIR}/")
That way the python wrappers are installed under the same folder as the OpenMM libraries. I am not sure it is the best way to do it, but it works for us.
set(PYTHON_SETUP_COMMAND "install --prefix=${CMAKE_INSTALL_PREFIX}")
in wrappers/python/CMakeLists.txt instead of the default, which I think is
set(PYTHON_SETUP_COMMAND "install --root=\$ENV{DESTDIR}/")
That way the python wrappers are installed under the same folder as the OpenMM libraries. I am not sure it is the best way to do it, but it works for us.
- Peter Eastman
- Posts: 2593
- Joined: Thu Aug 09, 2007 1:25 pm
Re: Install OpenMM without Conda
The conda packages are the only precompiled versions, but you can compile from source. See the documentation at http://docs.openmm.org/development/user ... iling.html.
- Jarunan Panyasantisuk
- Posts: 3
- Joined: Tue Nov 16, 2021 7:09 am
Re: Install OpenMM without Conda
Thank you very much for both replies. I followed the instruction in the link http://docs.openmm.org/development/user ... iling.html to install openmm 7.5.1 to be used with AlphaFold. However, only `import simtk.openmm` works, not `import openmm`. Is this what to expect?
Here are the compilation and installation commands:
Code: Select all
$ python
Python 3.8.5 (default, Oct 6 2020, 10:04:29)
[GCC 6.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import simtk.openmm
>>> import openmm
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'openmm'
Code: Select all
$ source /cluster/apps/alphafold/venv_alphafold/bin/activate
(venv_alphafold)$ cmake -DCMAKE_INSTALL_PREFIX=/cluster/apps/alphafold/openmm/7.5.1 -DPYTHON_EXECUTABLE=/cluster/apps/alphafold/venv_alphafold/bin/python ..
(venv_alphafold)$ make -j4
(venv_alphafold)$ make install
(venv_alphafold)$ make PythonInstall
- Peter Eastman
- Posts: 2593
- Joined: Thu Aug 09, 2007 1:25 pm
Re: Install OpenMM without Conda
Yes, that's correct. The simplified namespace was introduced in 7.6. You can still "import simtk.openmm" in 7.6. It will just show a deprecation warning.
- Jarunan Panyasantisuk
- Posts: 3
- Joined: Tue Nov 16, 2021 7:09 am
Re: Install OpenMM without Conda
It's clear now. Thank you for your quick response!
Best regards,
Jarunan
Best regards,
Jarunan