# Gromacs patched with Libtorch

**URL:** <https://gromacs.bioexcel.eu/t/gromacs-patched-with-libtorch/12564>\
**Category:** User discussions\
**Tags:** installation-error\
**Created:** [August 22, 2025, 4:14pm UTC](https://gromacs.bioexcel.eu/t/gromacs-patched-with-libtorch/12564 "2025-08-22T16:14:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chops](https://avatars.discourse-cdn.com/v4/letter/c/e47774/32.png) [@Chops](https://gromacs.bioexcel.eu/u/Chops)\
**Post date:** [August 22, 2025, 4:14pm UTC](https://gromacs.bioexcel.eu/t/gromacs-patched-with-libtorch/12564/1 "2025-08-22T16:14:29Z")

</div>

GROMACS version: 2025.2  
GROMACS modification: Yes/No  
Hi all, I am trying to patch gromacs 2025.2 with libtorch 2.4.

When i run

```auto
cmake .. -DGMX_GPU=CUDA -DGMX_MPI=OFF -DGMX_BUILD_OWN_FFTW=ON -DTorch_DIR=/opt/libtorch/share/cmake/Torch/ -DCMAKE_INSTALL_PREFIX=/usr/bin:/opt/

```

I get the error

```auto
CMake Error at /usr/lib64/python2.7/site-packages/cmake/data/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find Python (missing: Python_INCLUDE_DIRS Python_LIBRARIES Development Development.Module Development.Embed) (found version "2.7.18")Call Stack (most recent call first): /usr/lib64/python2.7/site-packages/cmake/data/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE) /usr/lib64/python2.7/site-packages/cmake/data/share/cmake-3.28/Modules/FindPython.cmake:616 (find_package_handle_standard_args) src/gromacs/applied_forces/nnpot/CMakeLists.txt:49 (find_package)`

```

I have python 2.7 and python 3.6 in `/usr/bin`but that’s not making it work.

I installed cmake 3.28.4 with pip2 `pip2 install cmake`.

Thank you for your help !

---

<div class="post-metadata">

**Author:** ![hess](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hess/32/416_2.png) [@hess](https://gromacs.bioexcel.eu/u/hess)\
**Post date:** [August 29, 2025, 7:47am UTC](https://gromacs.bioexcel.eu/t/gromacs-patched-with-libtorch/12564/2 "2025-08-29T07:47:08Z")

</div>

It is the python library, not the binary, that cannot be found. You need to have the python 3 library install directory in your linker path.
