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 2
2
# OpenMM PyTorch Plugin
3
3
#----------------------------------------------------
4
4
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
+
5
8
CMAKE_MINIMUM_REQUIRED (VERSION 3.5 )
6
9
7
10
# 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)
70
70
ENDIF (APPLE )
71
71
72
72
INSTALL (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 )
77
73
78
74
SUBDIRS (tests )
Original file line number Diff line number Diff line change @@ -61,10 +61,6 @@ SET_TARGET_PROPERTIES(${SHARED_TARGET} PROPERTIES
61
61
LINK_FLAGS "${EXTRA_COMPILE_FLAGS} " )
62
62
63
63
INSTALL (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 )
68
64
69
65
SUBDIRS (tests )
70
66
Original file line number Diff line number Diff line change @@ -47,9 +47,5 @@ SET_TARGET_PROPERTIES(${SHARED_TARGET} PROPERTIES
47
47
LINK_FLAGS "${EXTRA_COMPILE_FLAGS} " )
48
48
49
49
INSTALL (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 )
54
50
55
51
SUBDIRS (tests )
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ add_custom_command(
12
12
-python -c++
13
13
-o "${WRAP_FILE} "
14
14
"-I${OPENMM_DIR} /include"
15
- ${torchincs}
15
+ ${torchincs}
16
16
"${CMAKE_CURRENT_SOURCE_DIR} /openmmtorch.i"
17
17
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR} /openmmtorch.i"
18
18
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR} "
Original file line number Diff line number Diff line change 2
2
import os
3
3
import platform
4
4
5
+ version = '@OPENMM_TORCH_VERSION@'
5
6
openmm_dir = '@OPENMM_DIR@'
6
7
torch_include_dirs = '@TORCH_INCLUDE_DIRS@' .split (';' )
7
8
nn_plugin_header_dir = '@NN_PLUGIN_HEADER_DIR@'
27
28
)
28
29
29
30
setup (name = 'openmmtorch' ,
30
- version = '1.0' ,
31
+ version = version ,
31
32
py_modules = ['openmmtorch' ],
32
33
ext_modules = [extension ],
34
+ install_requires = ['openmm' , 'torch' ]
33
35
)
You can’t perform that action at this time.
0 commit comments