@@ -33,27 +33,17 @@ RUN wget ftp://ftp.gromacs.org/gromacs/gromacs-${GMX_VERSION}.tar.gz && \
3333 tar xvf gromacs-${GMX_VERSION}.tar.gz && \
3434 rm gromacs-${GMX_VERSION}.tar.gz
3535
36- # Make a build dir in source dir.
36+ # Patch gmx with plumed and make build dir
3737WORKDIR /tmp/gromacs-${GMX_VERSION}
38+ RUN plumed patch -p -e gromacs-2024.3
3839RUN mkdir build
3940
4041# Build gromacs without mpi and without cuda.
4142WORKDIR /tmp/gromacs-${GMX_VERSION}/build
42- RUN cmake .. -DCMAKE_INSTALL_PREFIX=/opt/gromacs-${GMX_VERSION} \
43- -DGMX_THREAD_MPI=OFF -DGMX_BUILD_OWN_FFTW=ON -DGMX_OPENMP=ON \
44- -DGMXAPI=OFF -DCMAKE_BUILD_TYPE=Release
45- RUN make -j8
46-
47- # Patch gmx with plumed.
48- WORKDIR /tmp/gromacs-${GMX_VERSION}
49- RUN plumed patch -p -e gromacs-2024.3
43+ RUN cmake .. -DCMAKE_INSTALL_PREFIX=/opt/gromacs-${GMX_VERSION} -DGMX_BUILD_OWN_FFTW=ON -DGMX_OPENMP=ON -DGMXAPI=OFF -DCMAKE_BUILD_TYPE=Release
5044
51- # Recompile and install gromacs
52- WORKDIR /tmp/gromacs-${GMX_VERSION}/build
5345RUN make -j8
5446RUN make install
55- RUN rm -r /tmp/gromacs-${GMX_VERSION} && \
56- fix-permissions "/opt/gromacs-${GMX_VERSION}"
5747
5848# Cleanup and fix permissions.
5949RUN rm -r /tmp/gromacs-${GMX_VERSION}
@@ -65,4 +55,4 @@ ENV PATH=/opt/gromacs-${GMX_VERSION}/bin:$PATH
6555
6656# Switch back to USER aiida to avoid accidental container runs as root
6757USER ${SYSTEM_UID}
68- WORKDIR "${HOME}"
58+ WORKDIR "${HOME}"
0 commit comments