Install OpenMM without Conda

The functionality of OpenMM will (eventually) include everything that one would need to run modern molecular simulation.
POST REPLY
User avatar
Jarunan Panyasantisuk
Posts: 3
Joined: Tue Nov 16, 2021 7:09 am

Install OpenMM without Conda

Post by Jarunan Panyasantisuk » Tue Nov 16, 2021 7:17 am

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

User avatar
Emilio Galllicchio
Posts: 13
Joined: Fri Feb 24, 2012 11:49 am

Re: Install OpenMM without Conda

Post by Emilio Galllicchio » Tue Nov 16, 2021 8:14 am

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.

User avatar
Peter Eastman
Posts: 2562
Joined: Thu Aug 09, 2007 1:25 pm

Re: Install OpenMM without Conda

Post by Peter Eastman » Tue Nov 16, 2021 9:47 am

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.

User avatar
Jarunan Panyasantisuk
Posts: 3
Joined: Tue Nov 16, 2021 7:09 am

Re: Install OpenMM without Conda

Post by Jarunan Panyasantisuk » Wed Nov 17, 2021 7:25 am

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?

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'
Here are the compilation and installation commands:

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

User avatar
Peter Eastman
Posts: 2562
Joined: Thu Aug 09, 2007 1:25 pm

Re: Install OpenMM without Conda

Post by Peter Eastman » Wed Nov 17, 2021 9:42 am

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.

User avatar
Jarunan Panyasantisuk
Posts: 3
Joined: Tue Nov 16, 2021 7:09 am

Re: Install OpenMM without Conda

Post by Jarunan Panyasantisuk » Thu Nov 18, 2021 12:31 am

It's clear now. Thank you for your quick response!

Best regards,
Jarunan

POST REPLY