11 Commits

Author SHA1 Message Date
Stefan Doerr
d1861af768 Fix windows build (#164)
* added NOMINMAX flag for Windows builds

* fix link paths for Windows conda

* add C++ 17 standard to the python library compilation as well

* Revert "add C++ 17 standard to the python library compilation as well"

This reverts commit c69b68a073.

* fix the c++17 flag for Windows

* modify setup.py to fix issues for Windows

* change setup.py again

* fix for dll detection on Windows

* handle at feedstock

* windows cuda fixes

* undo CUDA patches which were not working

* try to manually point the linker to cuda.lib

* make the string raw
2025-02-19 11:52:09 -08:00
Peter Eastman
9ef733c071 Changes for PyPI wheels (#161)
* Changes needed for wheels

* Remove version pin

* Update version number

* Set version number in CMake

* Store version number in CMake cache

* Fixed typo
2024-11-11 15:41:08 -08:00
Peter Eastman
5510c23811 Add pytorch lib dir to rpath (#158) 2024-11-05 15:37:17 -08:00
Peter Eastman
d4476435f5 Attempts at fixing CI (#144)
* Try to fix CI on Linux

* Don't install POCL on Mac

* Don't install khronos-opencl-icd-loader

* Update OpenMM version

* Updated tested versions

* Fixed version number

* Install correct packages for CUDA 12

* Debugging

* Debugging

* Debugging

* Debugging

* Debugging

* Debugging

* Debugging

* Debugging

* Debugging

* Debugging

* Debugging

* Debugging

* Debugging

* Try different method of installing CUDA

* Try not installing CUDA packages from conda

* Debugging

* Debugging

* Debugging

* Debugging

* Debugging

* Don't build OpenCL on Mac

* Don't try to run tests that can't run correctly

* Update C++ version and minimum macOS version

* Debugging

* Debugging

* Debugging

* Debugging

* Debugging

* Debugging

* Fixed working directory for tests

* Fixes to testing

* Try using PyTorch 2.3

* Try using PyTorch 2.2

* Switch back to PyTorch 2.1
2024-05-27 09:26:16 -07:00
Peter Eastman
4fe23f6869 Use setuptools instead of distutils (#123) 2023-10-03 09:21:43 -07:00
Raul
769302afd3 Add a constructor to TorchForce that takes a torch::jit::Module (#97)
* Add version number as a member to TorchForceProxy

* Encode the model file contents when serializing TorchForce

* Add tests for new TorchForce serialization

* Fix test not finding Python executable

* Format include directives correctly

* Hardcode TorchForceProxy version number

* Fix formatting issues

* Move Python serialization test to the correct place

* Make function encodeFromFileName static

* Update serialization python test to correctly remove temporary files after executing

* Use the base64 encoding capabilities of openssl to serialize model file

* Update TorchForce serializer

* Add a constructor to TorchForce that takes a torch::jit::Module.
 TorchForce(string fileName) is implemented by delegating to the new
 constructor.
 Update serialization test accordingly to compare the module file name
 and the module itself.

* Remove unnecessary include

* Change i_file to file in TorchForce constructor

* Add swig typemaps to new TorchForce constructor

* Add setup.py as a dependency for the PythonInstall CMake rule

* Fix swig out typemap for torch::jit::Module
 Now it is possible to call getModule() on a TorchForce object from
 Python, which will return a module of the same type as, for instance, torch.jit.load()

* Remove commented line in CMakeLists.txt

* Remove unnecessary dependency in setup.py

* Add more tests for new constructor

* Add some comments for the new constructor

* Updates to TorchForce serialization

* Use hex encoding instead of base64 for serialization.
SSL no longer a direct dependency.

* Remove unnecessary header

* Update Python serialization test

* Minor changes

* Improve temporary path handling in python serialization tests

* More informative exception when failing to serialize TorchForce

* Remove unnecessary check in TorchForce serialization

* Changes to C++ serialization tests

* Changes to C++ serialization tests
2023-02-10 14:58:03 -08:00
Peter Eastman
84f7d884ec Add PyTorch lib directory to library path (#72) 2022-03-07 13:18:57 -08:00
peastman
ca3499ce2a Renamed class and namespace 2020-01-09 14:30:54 -08:00
peastman
996982054c Added functions for casting 2020-01-09 11:38:50 -08:00
Peter Eastman
fe4ebb5d87 Removed some obsolete code from build scripts 2019-10-22 14:59:27 -07:00
Peter Eastman
81e5775b54 Converted openmm-nn plugin to PyTorch 2019-09-27 11:18:47 -07:00