File tree Expand file tree Collapse file tree 6 files changed +7
-14
lines changed
Expand file tree Collapse file tree 6 files changed +7
-14
lines changed Original file line number Diff line number Diff line change 22# OpenMM PyTorch Plugin
33#----------------------------------------------------
44
5+ # The version number is set here and copied to anywhere it is needed.
6+ SET (OPENMM_TORCH_VERSION 1.5 CACHE STRING "The version of OpenMM-Torch that will be built." FORCE)
7+
58CMAKE_MINIMUM_REQUIRED (VERSION 3.5)
69
710# We need to know where OpenMM is installed so we can access the headers and libraries.
Original file line number Diff line number Diff line change @@ -70,9 +70,5 @@ IF (APPLE)
7070ENDIF (APPLE )
7171
7272INSTALL (TARGETS ${SHARED_TARGET} DESTINATION ${CMAKE_INSTALL_PREFIX} /lib/plugins)
73- # Ensure that links to the main library will be resolved.
74- IF (APPLE )
75- INSTALL (CODE "EXECUTE_PROCESS(COMMAND install_name_tool -add_rpath @loader_path/.. ${CMAKE_INSTALL_PREFIX} /lib/plugins/lib${SHARED_TARGET} .dylib)" )
76- ENDIF (APPLE )
7773
7874SUBDIRS (tests)
Original file line number Diff line number Diff line change @@ -61,10 +61,6 @@ SET_TARGET_PROPERTIES(${SHARED_TARGET} PROPERTIES
6161 LINK_FLAGS "${EXTRA_COMPILE_FLAGS} " )
6262
6363INSTALL (TARGETS ${SHARED_TARGET} DESTINATION ${CMAKE_INSTALL_PREFIX} /lib/plugins)
64- # Ensure that links to the main library will be resolved.
65- IF (APPLE )
66- INSTALL (CODE "EXECUTE_PROCESS(COMMAND install_name_tool -add_rpath @loader_path/.. ${CMAKE_INSTALL_PREFIX} /lib/plugins/lib${SHARED_TARGET} .dylib)" )
67- ENDIF (APPLE )
6864
6965SUBDIRS (tests)
7066
Original file line number Diff line number Diff line change @@ -47,9 +47,5 @@ SET_TARGET_PROPERTIES(${SHARED_TARGET} PROPERTIES
4747 LINK_FLAGS "${EXTRA_COMPILE_FLAGS} " )
4848
4949INSTALL (TARGETS ${SHARED_TARGET} DESTINATION ${CMAKE_INSTALL_PREFIX} /lib/plugins)
50- # Ensure that links to the main library will be resolved.
51- IF (APPLE )
52- INSTALL (CODE "EXECUTE_PROCESS(COMMAND install_name_tool -add_rpath @loader_path/.. ${CMAKE_INSTALL_PREFIX} /lib/plugins/lib${SHARED_TARGET} .dylib)" )
53- ENDIF (APPLE )
5450
5551SUBDIRS (tests)
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ add_custom_command(
1212 -python -c++
1313 -o "${WRAP_FILE} "
1414 "-I${OPENMM_DIR} /include"
15- ${torchincs}
15+ ${torchincs}
1616 "${CMAKE_CURRENT_SOURCE_DIR} /openmmtorch.i"
1717 DEPENDS "${CMAKE_CURRENT_SOURCE_DIR} /openmmtorch.i"
1818 WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR} "
Original file line number Diff line number Diff line change 22import os
33import platform
44
5+ version = '@OPENMM_TORCH_VERSION@'
56openmm_dir = '@OPENMM_DIR@'
67torch_include_dirs = '@TORCH_INCLUDE_DIRS@' .split (';' )
78nn_plugin_header_dir = '@NN_PLUGIN_HEADER_DIR@'
2728 )
2829
2930setup (name = 'openmmtorch' ,
30- version = '1.0' ,
31+ version = version ,
3132 py_modules = ['openmmtorch' ],
3233 ext_modules = [extension ],
34+ install_requires = ['openmm' , 'torch' ]
3335 )
You can’t perform that action at this time.
0 commit comments