featomic-torch 0.7.0__py3-none-macosx_11_0_arm64.whl → 0.7.1__py3-none-macosx_11_0_arm64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. featomic/torch/_build_versions.py +1 -1
  2. featomic/torch/torch-2.1/include/featomic/torch/autograd.hpp +1 -1
  3. featomic/torch/torch-2.1/include/featomic/torch/calculator.hpp +3 -3
  4. featomic/torch/torch-2.1/lib/cmake/featomic_torch/featomic_torch-config-version.cmake +3 -3
  5. featomic/torch/torch-2.1/lib/cmake/featomic_torch/featomic_torch-config.cmake +1 -1
  6. featomic/torch/torch-2.1/lib/cmake/featomic_torch/featomic_torch-targets.cmake +1 -1
  7. featomic/torch/torch-2.1/lib/libfeatomic_torch.dylib +0 -0
  8. featomic/torch/torch-2.2/include/featomic/torch/autograd.hpp +1 -1
  9. featomic/torch/torch-2.2/include/featomic/torch/calculator.hpp +3 -3
  10. featomic/torch/torch-2.2/lib/cmake/featomic_torch/featomic_torch-config-version.cmake +3 -3
  11. featomic/torch/torch-2.2/lib/cmake/featomic_torch/featomic_torch-config.cmake +1 -1
  12. featomic/torch/torch-2.2/lib/cmake/featomic_torch/featomic_torch-targets.cmake +1 -1
  13. featomic/torch/torch-2.2/lib/libfeatomic_torch.dylib +0 -0
  14. featomic/torch/torch-2.3/include/featomic/torch/autograd.hpp +1 -1
  15. featomic/torch/torch-2.3/include/featomic/torch/calculator.hpp +3 -3
  16. featomic/torch/torch-2.3/lib/cmake/featomic_torch/featomic_torch-config-version.cmake +3 -3
  17. featomic/torch/torch-2.3/lib/cmake/featomic_torch/featomic_torch-config.cmake +1 -1
  18. featomic/torch/torch-2.3/lib/cmake/featomic_torch/featomic_torch-targets.cmake +1 -1
  19. featomic/torch/torch-2.3/lib/libfeatomic_torch.dylib +0 -0
  20. featomic/torch/torch-2.4/include/featomic/torch/autograd.hpp +1 -1
  21. featomic/torch/torch-2.4/include/featomic/torch/calculator.hpp +3 -3
  22. featomic/torch/torch-2.4/lib/cmake/featomic_torch/featomic_torch-config-version.cmake +3 -3
  23. featomic/torch/torch-2.4/lib/cmake/featomic_torch/featomic_torch-config.cmake +1 -1
  24. featomic/torch/torch-2.4/lib/cmake/featomic_torch/featomic_torch-targets.cmake +1 -1
  25. featomic/torch/torch-2.4/lib/libfeatomic_torch.dylib +0 -0
  26. featomic/torch/torch-2.5/include/featomic/torch/autograd.hpp +1 -1
  27. featomic/torch/torch-2.5/include/featomic/torch/calculator.hpp +3 -3
  28. featomic/torch/torch-2.5/lib/cmake/featomic_torch/featomic_torch-config-version.cmake +3 -3
  29. featomic/torch/torch-2.5/lib/cmake/featomic_torch/featomic_torch-config.cmake +1 -1
  30. featomic/torch/torch-2.5/lib/cmake/featomic_torch/featomic_torch-targets.cmake +1 -1
  31. featomic/torch/torch-2.5/lib/libfeatomic_torch.dylib +0 -0
  32. featomic/torch/torch-2.6/include/featomic/torch/autograd.hpp +1 -1
  33. featomic/torch/torch-2.6/include/featomic/torch/calculator.hpp +3 -3
  34. featomic/torch/torch-2.6/lib/cmake/featomic_torch/featomic_torch-config-version.cmake +3 -3
  35. featomic/torch/torch-2.6/lib/cmake/featomic_torch/featomic_torch-config.cmake +1 -1
  36. featomic/torch/torch-2.6/lib/cmake/featomic_torch/featomic_torch-targets.cmake +1 -1
  37. featomic/torch/torch-2.6/lib/libfeatomic_torch.dylib +0 -0
  38. featomic/torch/torch-2.7/include/featomic/torch/autograd.hpp +1 -1
  39. featomic/torch/torch-2.7/include/featomic/torch/calculator.hpp +3 -3
  40. featomic/torch/torch-2.7/lib/cmake/featomic_torch/featomic_torch-config-version.cmake +3 -3
  41. featomic/torch/torch-2.7/lib/cmake/featomic_torch/featomic_torch-config.cmake +2 -2
  42. featomic/torch/torch-2.7/lib/cmake/featomic_torch/featomic_torch-targets.cmake +1 -1
  43. featomic/torch/torch-2.7/lib/libfeatomic_torch.dylib +0 -0
  44. featomic/torch/torch-2.8/include/featomic/torch/autograd.hpp +58 -0
  45. featomic/torch/torch-2.8/include/featomic/torch/calculator.hpp +134 -0
  46. featomic/torch/torch-2.8/include/featomic/torch/exports.h +43 -0
  47. featomic/torch/torch-2.8/include/featomic/torch/system.hpp +112 -0
  48. featomic/torch/torch-2.8/include/featomic/torch.hpp +10 -0
  49. featomic/torch/torch-2.8/lib/cmake/featomic_torch/featomic_torch-config-version.cmake +85 -0
  50. featomic/torch/torch-2.8/lib/cmake/featomic_torch/featomic_torch-config.cmake +32 -0
  51. featomic/torch/torch-2.8/lib/cmake/featomic_torch/featomic_torch-targets-release.cmake +19 -0
  52. featomic/torch/torch-2.8/lib/cmake/featomic_torch/featomic_torch-targets.cmake +108 -0
  53. featomic/torch/torch-2.8/lib/libfeatomic_torch.dylib +0 -0
  54. {featomic_torch-0.7.0.dist-info → featomic_torch-0.7.1.dist-info}/METADATA +5 -5
  55. {featomic_torch-0.7.0.dist-info → featomic_torch-0.7.1.dist-info}/RECORD +59 -49
  56. {featomic_torch-0.7.0.dist-info → featomic_torch-0.7.1.dist-info}/WHEEL +1 -1
  57. {featomic_torch-0.7.0.dist-info → featomic_torch-0.7.1.dist-info}/licenses/AUTHORS +0 -0
  58. {featomic_torch-0.7.0.dist-info → featomic_torch-0.7.1.dist-info}/licenses/LICENSE +0 -0
  59. {featomic_torch-0.7.0.dist-info → featomic_torch-0.7.1.dist-info}/top_level.txt +0 -0
@@ -2,4 +2,4 @@
2
2
 
3
3
 
4
4
  # version of featomic used when compiling this package
5
- BUILD_FEATOMIC_VERSION = '0.6.1'
5
+ BUILD_FEATOMIC_VERSION = '0.6.2'
@@ -41,7 +41,7 @@ public:
41
41
  torch::Tensor all_positions,
42
42
  torch::Tensor all_cells,
43
43
  torch::IValue systems_start,
44
- metatensor_torch::TorchTensorBlock block
44
+ metatensor_torch::TensorBlock block
45
45
  );
46
46
 
47
47
  /// Backward step: get the gradients of some quantity `A` w.r.t. the outputs
@@ -100,7 +100,7 @@ public:
100
100
  }
101
101
 
102
102
  /// Run a calculation for the given `systems` using the given options.
103
- metatensor_torch::TorchTensorMap compute(
103
+ metatensor_torch::TensorMap compute(
104
104
  std::vector<metatomic_torch::System> systems,
105
105
  TorchCalculatorOptions options = {}
106
106
  );
@@ -123,9 +123,9 @@ private:
123
123
  /// contain `"cell"` gradients.
124
124
  ///
125
125
  /// `forward_gradients` controls which gradients are left inside the TensorMap.
126
- metatensor_torch::TorchTensorMap FEATOMIC_TORCH_EXPORT register_autograd(
126
+ metatensor_torch::TensorMap FEATOMIC_TORCH_EXPORT register_autograd(
127
127
  std::vector<metatomic_torch::System> systems,
128
- metatensor_torch::TorchTensorMap precomputed,
128
+ metatensor_torch::TensorMap precomputed,
129
129
  std::vector<std::string> forward_gradients
130
130
  );
131
131
 
@@ -10,13 +10,13 @@
10
10
  # The variable CVF_VERSION must be set before calling configure_file().
11
11
 
12
12
 
13
- set(PACKAGE_VERSION "0.7.0")
13
+ set(PACKAGE_VERSION "0.7.1")
14
14
 
15
15
  if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
16
16
  set(PACKAGE_VERSION_COMPATIBLE FALSE)
17
17
  else()
18
18
 
19
- if("0.7.0" MATCHES "^([0-9]+)\\.([0-9]+)")
19
+ if("0.7.1" MATCHES "^([0-9]+)\\.([0-9]+)")
20
20
  set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}")
21
21
  set(CVF_VERSION_MINOR "${CMAKE_MATCH_2}")
22
22
 
@@ -27,7 +27,7 @@ else()
27
27
  string(REGEX REPLACE "^0+" "" CVF_VERSION_MINOR "${CVF_VERSION_MINOR}")
28
28
  endif()
29
29
  else()
30
- set(CVF_VERSION_MAJOR "0.7.0")
30
+ set(CVF_VERSION_MAJOR "0.7.1")
31
31
  set(CVF_VERSION_MINOR "")
32
32
  endif()
33
33
 
@@ -5,7 +5,7 @@ set(REQUIRED_FEATOMIC_VERSION 0.6)
5
5
  find_package(featomic ${REQUIRED_FEATOMIC_VERSION} CONFIG REQUIRED)
6
6
 
7
7
  # use the same version for metatensor_torch as the main CMakeLists.txt
8
- set(REQUIRED_METATENSOR_TORCH_VERSION 0.7.6)
8
+ set(REQUIRED_METATENSOR_TORCH_VERSION 0.8.0)
9
9
  find_package(metatensor_torch ${REQUIRED_METATENSOR_TORCH_VERSION} CONFIG REQUIRED)
10
10
 
11
11
  # use the same version for metatomic_torch as the main CMakeLists.txt
@@ -7,7 +7,7 @@ if(CMAKE_VERSION VERSION_LESS "2.8.12")
7
7
  message(FATAL_ERROR "CMake >= 2.8.12 required")
8
8
  endif()
9
9
  cmake_policy(PUSH)
10
- cmake_policy(VERSION 2.8.12...3.30)
10
+ cmake_policy(VERSION 2.8.12...3.31)
11
11
  #----------------------------------------------------------------
12
12
  # Generated CMake target import file.
13
13
  #----------------------------------------------------------------
@@ -41,7 +41,7 @@ public:
41
41
  torch::Tensor all_positions,
42
42
  torch::Tensor all_cells,
43
43
  torch::IValue systems_start,
44
- metatensor_torch::TorchTensorBlock block
44
+ metatensor_torch::TensorBlock block
45
45
  );
46
46
 
47
47
  /// Backward step: get the gradients of some quantity `A` w.r.t. the outputs
@@ -100,7 +100,7 @@ public:
100
100
  }
101
101
 
102
102
  /// Run a calculation for the given `systems` using the given options.
103
- metatensor_torch::TorchTensorMap compute(
103
+ metatensor_torch::TensorMap compute(
104
104
  std::vector<metatomic_torch::System> systems,
105
105
  TorchCalculatorOptions options = {}
106
106
  );
@@ -123,9 +123,9 @@ private:
123
123
  /// contain `"cell"` gradients.
124
124
  ///
125
125
  /// `forward_gradients` controls which gradients are left inside the TensorMap.
126
- metatensor_torch::TorchTensorMap FEATOMIC_TORCH_EXPORT register_autograd(
126
+ metatensor_torch::TensorMap FEATOMIC_TORCH_EXPORT register_autograd(
127
127
  std::vector<metatomic_torch::System> systems,
128
- metatensor_torch::TorchTensorMap precomputed,
128
+ metatensor_torch::TensorMap precomputed,
129
129
  std::vector<std::string> forward_gradients
130
130
  );
131
131
 
@@ -10,13 +10,13 @@
10
10
  # The variable CVF_VERSION must be set before calling configure_file().
11
11
 
12
12
 
13
- set(PACKAGE_VERSION "0.7.0")
13
+ set(PACKAGE_VERSION "0.7.1")
14
14
 
15
15
  if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
16
16
  set(PACKAGE_VERSION_COMPATIBLE FALSE)
17
17
  else()
18
18
 
19
- if("0.7.0" MATCHES "^([0-9]+)\\.([0-9]+)")
19
+ if("0.7.1" MATCHES "^([0-9]+)\\.([0-9]+)")
20
20
  set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}")
21
21
  set(CVF_VERSION_MINOR "${CMAKE_MATCH_2}")
22
22
 
@@ -27,7 +27,7 @@ else()
27
27
  string(REGEX REPLACE "^0+" "" CVF_VERSION_MINOR "${CVF_VERSION_MINOR}")
28
28
  endif()
29
29
  else()
30
- set(CVF_VERSION_MAJOR "0.7.0")
30
+ set(CVF_VERSION_MAJOR "0.7.1")
31
31
  set(CVF_VERSION_MINOR "")
32
32
  endif()
33
33
 
@@ -5,7 +5,7 @@ set(REQUIRED_FEATOMIC_VERSION 0.6)
5
5
  find_package(featomic ${REQUIRED_FEATOMIC_VERSION} CONFIG REQUIRED)
6
6
 
7
7
  # use the same version for metatensor_torch as the main CMakeLists.txt
8
- set(REQUIRED_METATENSOR_TORCH_VERSION 0.7.6)
8
+ set(REQUIRED_METATENSOR_TORCH_VERSION 0.8.0)
9
9
  find_package(metatensor_torch ${REQUIRED_METATENSOR_TORCH_VERSION} CONFIG REQUIRED)
10
10
 
11
11
  # use the same version for metatomic_torch as the main CMakeLists.txt
@@ -7,7 +7,7 @@ if(CMAKE_VERSION VERSION_LESS "2.8.12")
7
7
  message(FATAL_ERROR "CMake >= 2.8.12 required")
8
8
  endif()
9
9
  cmake_policy(PUSH)
10
- cmake_policy(VERSION 2.8.12...3.30)
10
+ cmake_policy(VERSION 2.8.12...3.31)
11
11
  #----------------------------------------------------------------
12
12
  # Generated CMake target import file.
13
13
  #----------------------------------------------------------------
@@ -41,7 +41,7 @@ public:
41
41
  torch::Tensor all_positions,
42
42
  torch::Tensor all_cells,
43
43
  torch::IValue systems_start,
44
- metatensor_torch::TorchTensorBlock block
44
+ metatensor_torch::TensorBlock block
45
45
  );
46
46
 
47
47
  /// Backward step: get the gradients of some quantity `A` w.r.t. the outputs
@@ -100,7 +100,7 @@ public:
100
100
  }
101
101
 
102
102
  /// Run a calculation for the given `systems` using the given options.
103
- metatensor_torch::TorchTensorMap compute(
103
+ metatensor_torch::TensorMap compute(
104
104
  std::vector<metatomic_torch::System> systems,
105
105
  TorchCalculatorOptions options = {}
106
106
  );
@@ -123,9 +123,9 @@ private:
123
123
  /// contain `"cell"` gradients.
124
124
  ///
125
125
  /// `forward_gradients` controls which gradients are left inside the TensorMap.
126
- metatensor_torch::TorchTensorMap FEATOMIC_TORCH_EXPORT register_autograd(
126
+ metatensor_torch::TensorMap FEATOMIC_TORCH_EXPORT register_autograd(
127
127
  std::vector<metatomic_torch::System> systems,
128
- metatensor_torch::TorchTensorMap precomputed,
128
+ metatensor_torch::TensorMap precomputed,
129
129
  std::vector<std::string> forward_gradients
130
130
  );
131
131
 
@@ -10,13 +10,13 @@
10
10
  # The variable CVF_VERSION must be set before calling configure_file().
11
11
 
12
12
 
13
- set(PACKAGE_VERSION "0.7.0")
13
+ set(PACKAGE_VERSION "0.7.1")
14
14
 
15
15
  if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
16
16
  set(PACKAGE_VERSION_COMPATIBLE FALSE)
17
17
  else()
18
18
 
19
- if("0.7.0" MATCHES "^([0-9]+)\\.([0-9]+)")
19
+ if("0.7.1" MATCHES "^([0-9]+)\\.([0-9]+)")
20
20
  set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}")
21
21
  set(CVF_VERSION_MINOR "${CMAKE_MATCH_2}")
22
22
 
@@ -27,7 +27,7 @@ else()
27
27
  string(REGEX REPLACE "^0+" "" CVF_VERSION_MINOR "${CVF_VERSION_MINOR}")
28
28
  endif()
29
29
  else()
30
- set(CVF_VERSION_MAJOR "0.7.0")
30
+ set(CVF_VERSION_MAJOR "0.7.1")
31
31
  set(CVF_VERSION_MINOR "")
32
32
  endif()
33
33
 
@@ -5,7 +5,7 @@ set(REQUIRED_FEATOMIC_VERSION 0.6)
5
5
  find_package(featomic ${REQUIRED_FEATOMIC_VERSION} CONFIG REQUIRED)
6
6
 
7
7
  # use the same version for metatensor_torch as the main CMakeLists.txt
8
- set(REQUIRED_METATENSOR_TORCH_VERSION 0.7.6)
8
+ set(REQUIRED_METATENSOR_TORCH_VERSION 0.8.0)
9
9
  find_package(metatensor_torch ${REQUIRED_METATENSOR_TORCH_VERSION} CONFIG REQUIRED)
10
10
 
11
11
  # use the same version for metatomic_torch as the main CMakeLists.txt
@@ -7,7 +7,7 @@ if(CMAKE_VERSION VERSION_LESS "2.8.12")
7
7
  message(FATAL_ERROR "CMake >= 2.8.12 required")
8
8
  endif()
9
9
  cmake_policy(PUSH)
10
- cmake_policy(VERSION 2.8.12...3.30)
10
+ cmake_policy(VERSION 2.8.12...3.31)
11
11
  #----------------------------------------------------------------
12
12
  # Generated CMake target import file.
13
13
  #----------------------------------------------------------------
@@ -41,7 +41,7 @@ public:
41
41
  torch::Tensor all_positions,
42
42
  torch::Tensor all_cells,
43
43
  torch::IValue systems_start,
44
- metatensor_torch::TorchTensorBlock block
44
+ metatensor_torch::TensorBlock block
45
45
  );
46
46
 
47
47
  /// Backward step: get the gradients of some quantity `A` w.r.t. the outputs
@@ -100,7 +100,7 @@ public:
100
100
  }
101
101
 
102
102
  /// Run a calculation for the given `systems` using the given options.
103
- metatensor_torch::TorchTensorMap compute(
103
+ metatensor_torch::TensorMap compute(
104
104
  std::vector<metatomic_torch::System> systems,
105
105
  TorchCalculatorOptions options = {}
106
106
  );
@@ -123,9 +123,9 @@ private:
123
123
  /// contain `"cell"` gradients.
124
124
  ///
125
125
  /// `forward_gradients` controls which gradients are left inside the TensorMap.
126
- metatensor_torch::TorchTensorMap FEATOMIC_TORCH_EXPORT register_autograd(
126
+ metatensor_torch::TensorMap FEATOMIC_TORCH_EXPORT register_autograd(
127
127
  std::vector<metatomic_torch::System> systems,
128
- metatensor_torch::TorchTensorMap precomputed,
128
+ metatensor_torch::TensorMap precomputed,
129
129
  std::vector<std::string> forward_gradients
130
130
  );
131
131
 
@@ -10,13 +10,13 @@
10
10
  # The variable CVF_VERSION must be set before calling configure_file().
11
11
 
12
12
 
13
- set(PACKAGE_VERSION "0.7.0")
13
+ set(PACKAGE_VERSION "0.7.1")
14
14
 
15
15
  if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
16
16
  set(PACKAGE_VERSION_COMPATIBLE FALSE)
17
17
  else()
18
18
 
19
- if("0.7.0" MATCHES "^([0-9]+)\\.([0-9]+)")
19
+ if("0.7.1" MATCHES "^([0-9]+)\\.([0-9]+)")
20
20
  set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}")
21
21
  set(CVF_VERSION_MINOR "${CMAKE_MATCH_2}")
22
22
 
@@ -27,7 +27,7 @@ else()
27
27
  string(REGEX REPLACE "^0+" "" CVF_VERSION_MINOR "${CVF_VERSION_MINOR}")
28
28
  endif()
29
29
  else()
30
- set(CVF_VERSION_MAJOR "0.7.0")
30
+ set(CVF_VERSION_MAJOR "0.7.1")
31
31
  set(CVF_VERSION_MINOR "")
32
32
  endif()
33
33
 
@@ -5,7 +5,7 @@ set(REQUIRED_FEATOMIC_VERSION 0.6)
5
5
  find_package(featomic ${REQUIRED_FEATOMIC_VERSION} CONFIG REQUIRED)
6
6
 
7
7
  # use the same version for metatensor_torch as the main CMakeLists.txt
8
- set(REQUIRED_METATENSOR_TORCH_VERSION 0.7.6)
8
+ set(REQUIRED_METATENSOR_TORCH_VERSION 0.8.0)
9
9
  find_package(metatensor_torch ${REQUIRED_METATENSOR_TORCH_VERSION} CONFIG REQUIRED)
10
10
 
11
11
  # use the same version for metatomic_torch as the main CMakeLists.txt
@@ -7,7 +7,7 @@ if(CMAKE_VERSION VERSION_LESS "2.8.12")
7
7
  message(FATAL_ERROR "CMake >= 2.8.12 required")
8
8
  endif()
9
9
  cmake_policy(PUSH)
10
- cmake_policy(VERSION 2.8.12...3.30)
10
+ cmake_policy(VERSION 2.8.12...3.31)
11
11
  #----------------------------------------------------------------
12
12
  # Generated CMake target import file.
13
13
  #----------------------------------------------------------------
@@ -41,7 +41,7 @@ public:
41
41
  torch::Tensor all_positions,
42
42
  torch::Tensor all_cells,
43
43
  torch::IValue systems_start,
44
- metatensor_torch::TorchTensorBlock block
44
+ metatensor_torch::TensorBlock block
45
45
  );
46
46
 
47
47
  /// Backward step: get the gradients of some quantity `A` w.r.t. the outputs
@@ -100,7 +100,7 @@ public:
100
100
  }
101
101
 
102
102
  /// Run a calculation for the given `systems` using the given options.
103
- metatensor_torch::TorchTensorMap compute(
103
+ metatensor_torch::TensorMap compute(
104
104
  std::vector<metatomic_torch::System> systems,
105
105
  TorchCalculatorOptions options = {}
106
106
  );
@@ -123,9 +123,9 @@ private:
123
123
  /// contain `"cell"` gradients.
124
124
  ///
125
125
  /// `forward_gradients` controls which gradients are left inside the TensorMap.
126
- metatensor_torch::TorchTensorMap FEATOMIC_TORCH_EXPORT register_autograd(
126
+ metatensor_torch::TensorMap FEATOMIC_TORCH_EXPORT register_autograd(
127
127
  std::vector<metatomic_torch::System> systems,
128
- metatensor_torch::TorchTensorMap precomputed,
128
+ metatensor_torch::TensorMap precomputed,
129
129
  std::vector<std::string> forward_gradients
130
130
  );
131
131
 
@@ -10,13 +10,13 @@
10
10
  # The variable CVF_VERSION must be set before calling configure_file().
11
11
 
12
12
 
13
- set(PACKAGE_VERSION "0.7.0")
13
+ set(PACKAGE_VERSION "0.7.1")
14
14
 
15
15
  if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
16
16
  set(PACKAGE_VERSION_COMPATIBLE FALSE)
17
17
  else()
18
18
 
19
- if("0.7.0" MATCHES "^([0-9]+)\\.([0-9]+)")
19
+ if("0.7.1" MATCHES "^([0-9]+)\\.([0-9]+)")
20
20
  set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}")
21
21
  set(CVF_VERSION_MINOR "${CMAKE_MATCH_2}")
22
22
 
@@ -27,7 +27,7 @@ else()
27
27
  string(REGEX REPLACE "^0+" "" CVF_VERSION_MINOR "${CVF_VERSION_MINOR}")
28
28
  endif()
29
29
  else()
30
- set(CVF_VERSION_MAJOR "0.7.0")
30
+ set(CVF_VERSION_MAJOR "0.7.1")
31
31
  set(CVF_VERSION_MINOR "")
32
32
  endif()
33
33
 
@@ -5,7 +5,7 @@ set(REQUIRED_FEATOMIC_VERSION 0.6)
5
5
  find_package(featomic ${REQUIRED_FEATOMIC_VERSION} CONFIG REQUIRED)
6
6
 
7
7
  # use the same version for metatensor_torch as the main CMakeLists.txt
8
- set(REQUIRED_METATENSOR_TORCH_VERSION 0.7.6)
8
+ set(REQUIRED_METATENSOR_TORCH_VERSION 0.8.0)
9
9
  find_package(metatensor_torch ${REQUIRED_METATENSOR_TORCH_VERSION} CONFIG REQUIRED)
10
10
 
11
11
  # use the same version for metatomic_torch as the main CMakeLists.txt
@@ -7,7 +7,7 @@ if(CMAKE_VERSION VERSION_LESS "2.8.12")
7
7
  message(FATAL_ERROR "CMake >= 2.8.12 required")
8
8
  endif()
9
9
  cmake_policy(PUSH)
10
- cmake_policy(VERSION 2.8.12...3.30)
10
+ cmake_policy(VERSION 2.8.12...3.31)
11
11
  #----------------------------------------------------------------
12
12
  # Generated CMake target import file.
13
13
  #----------------------------------------------------------------
@@ -41,7 +41,7 @@ public:
41
41
  torch::Tensor all_positions,
42
42
  torch::Tensor all_cells,
43
43
  torch::IValue systems_start,
44
- metatensor_torch::TorchTensorBlock block
44
+ metatensor_torch::TensorBlock block
45
45
  );
46
46
 
47
47
  /// Backward step: get the gradients of some quantity `A` w.r.t. the outputs
@@ -100,7 +100,7 @@ public:
100
100
  }
101
101
 
102
102
  /// Run a calculation for the given `systems` using the given options.
103
- metatensor_torch::TorchTensorMap compute(
103
+ metatensor_torch::TensorMap compute(
104
104
  std::vector<metatomic_torch::System> systems,
105
105
  TorchCalculatorOptions options = {}
106
106
  );
@@ -123,9 +123,9 @@ private:
123
123
  /// contain `"cell"` gradients.
124
124
  ///
125
125
  /// `forward_gradients` controls which gradients are left inside the TensorMap.
126
- metatensor_torch::TorchTensorMap FEATOMIC_TORCH_EXPORT register_autograd(
126
+ metatensor_torch::TensorMap FEATOMIC_TORCH_EXPORT register_autograd(
127
127
  std::vector<metatomic_torch::System> systems,
128
- metatensor_torch::TorchTensorMap precomputed,
128
+ metatensor_torch::TensorMap precomputed,
129
129
  std::vector<std::string> forward_gradients
130
130
  );
131
131
 
@@ -10,13 +10,13 @@
10
10
  # The variable CVF_VERSION must be set before calling configure_file().
11
11
 
12
12
 
13
- set(PACKAGE_VERSION "0.7.0")
13
+ set(PACKAGE_VERSION "0.7.1")
14
14
 
15
15
  if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
16
16
  set(PACKAGE_VERSION_COMPATIBLE FALSE)
17
17
  else()
18
18
 
19
- if("0.7.0" MATCHES "^([0-9]+)\\.([0-9]+)")
19
+ if("0.7.1" MATCHES "^([0-9]+)\\.([0-9]+)")
20
20
  set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}")
21
21
  set(CVF_VERSION_MINOR "${CMAKE_MATCH_2}")
22
22
 
@@ -27,7 +27,7 @@ else()
27
27
  string(REGEX REPLACE "^0+" "" CVF_VERSION_MINOR "${CVF_VERSION_MINOR}")
28
28
  endif()
29
29
  else()
30
- set(CVF_VERSION_MAJOR "0.7.0")
30
+ set(CVF_VERSION_MAJOR "0.7.1")
31
31
  set(CVF_VERSION_MINOR "")
32
32
  endif()
33
33
 
@@ -5,7 +5,7 @@ set(REQUIRED_FEATOMIC_VERSION 0.6)
5
5
  find_package(featomic ${REQUIRED_FEATOMIC_VERSION} CONFIG REQUIRED)
6
6
 
7
7
  # use the same version for metatensor_torch as the main CMakeLists.txt
8
- set(REQUIRED_METATENSOR_TORCH_VERSION 0.7.6)
8
+ set(REQUIRED_METATENSOR_TORCH_VERSION 0.8.0)
9
9
  find_package(metatensor_torch ${REQUIRED_METATENSOR_TORCH_VERSION} CONFIG REQUIRED)
10
10
 
11
11
  # use the same version for metatomic_torch as the main CMakeLists.txt
@@ -7,7 +7,7 @@ if(CMAKE_VERSION VERSION_LESS "2.8.12")
7
7
  message(FATAL_ERROR "CMake >= 2.8.12 required")
8
8
  endif()
9
9
  cmake_policy(PUSH)
10
- cmake_policy(VERSION 2.8.12...3.30)
10
+ cmake_policy(VERSION 2.8.12...3.31)
11
11
  #----------------------------------------------------------------
12
12
  # Generated CMake target import file.
13
13
  #----------------------------------------------------------------
@@ -41,7 +41,7 @@ public:
41
41
  torch::Tensor all_positions,
42
42
  torch::Tensor all_cells,
43
43
  torch::IValue systems_start,
44
- metatensor_torch::TorchTensorBlock block
44
+ metatensor_torch::TensorBlock block
45
45
  );
46
46
 
47
47
  /// Backward step: get the gradients of some quantity `A` w.r.t. the outputs
@@ -100,7 +100,7 @@ public:
100
100
  }
101
101
 
102
102
  /// Run a calculation for the given `systems` using the given options.
103
- metatensor_torch::TorchTensorMap compute(
103
+ metatensor_torch::TensorMap compute(
104
104
  std::vector<metatomic_torch::System> systems,
105
105
  TorchCalculatorOptions options = {}
106
106
  );
@@ -123,9 +123,9 @@ private:
123
123
  /// contain `"cell"` gradients.
124
124
  ///
125
125
  /// `forward_gradients` controls which gradients are left inside the TensorMap.
126
- metatensor_torch::TorchTensorMap FEATOMIC_TORCH_EXPORT register_autograd(
126
+ metatensor_torch::TensorMap FEATOMIC_TORCH_EXPORT register_autograd(
127
127
  std::vector<metatomic_torch::System> systems,
128
- metatensor_torch::TorchTensorMap precomputed,
128
+ metatensor_torch::TensorMap precomputed,
129
129
  std::vector<std::string> forward_gradients
130
130
  );
131
131
 
@@ -10,13 +10,13 @@
10
10
  # The variable CVF_VERSION must be set before calling configure_file().
11
11
 
12
12
 
13
- set(PACKAGE_VERSION "0.7.0")
13
+ set(PACKAGE_VERSION "0.7.1")
14
14
 
15
15
  if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
16
16
  set(PACKAGE_VERSION_COMPATIBLE FALSE)
17
17
  else()
18
18
 
19
- if("0.7.0" MATCHES "^([0-9]+)\\.([0-9]+)")
19
+ if("0.7.1" MATCHES "^([0-9]+)\\.([0-9]+)")
20
20
  set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}")
21
21
  set(CVF_VERSION_MINOR "${CMAKE_MATCH_2}")
22
22
 
@@ -27,7 +27,7 @@ else()
27
27
  string(REGEX REPLACE "^0+" "" CVF_VERSION_MINOR "${CVF_VERSION_MINOR}")
28
28
  endif()
29
29
  else()
30
- set(CVF_VERSION_MAJOR "0.7.0")
30
+ set(CVF_VERSION_MAJOR "0.7.1")
31
31
  set(CVF_VERSION_MINOR "")
32
32
  endif()
33
33
 
@@ -5,7 +5,7 @@ set(REQUIRED_FEATOMIC_VERSION 0.6)
5
5
  find_package(featomic ${REQUIRED_FEATOMIC_VERSION} CONFIG REQUIRED)
6
6
 
7
7
  # use the same version for metatensor_torch as the main CMakeLists.txt
8
- set(REQUIRED_METATENSOR_TORCH_VERSION 0.7.6)
8
+ set(REQUIRED_METATENSOR_TORCH_VERSION 0.8.0)
9
9
  find_package(metatensor_torch ${REQUIRED_METATENSOR_TORCH_VERSION} CONFIG REQUIRED)
10
10
 
11
11
  # use the same version for metatomic_torch as the main CMakeLists.txt
@@ -14,7 +14,7 @@ find_package(metatomic_torch ${REQUIRED_METATOMIC_TORCH_VERSION} CONFIG REQUIRED
14
14
 
15
15
  # We can only load metatensorfeatomic_torch with the same minor version of Torch
16
16
  # that was used to compile it (and is stored in BUILD_TORCH_VERSION)
17
- set(BUILD_TORCH_VERSION 2.7.0)
17
+ set(BUILD_TORCH_VERSION 2.7.1)
18
18
  set(BUILD_TORCH_MAJOR 2)
19
19
  set(BUILD_TORCH_MINOR 7)
20
20
 
@@ -7,7 +7,7 @@ if(CMAKE_VERSION VERSION_LESS "2.8.12")
7
7
  message(FATAL_ERROR "CMake >= 2.8.12 required")
8
8
  endif()
9
9
  cmake_policy(PUSH)
10
- cmake_policy(VERSION 2.8.12...3.30)
10
+ cmake_policy(VERSION 2.8.12...3.31)
11
11
  #----------------------------------------------------------------
12
12
  # Generated CMake target import file.
13
13
  #----------------------------------------------------------------
@@ -0,0 +1,58 @@
1
+ // IWYU pragma: private; include "featomic/torch.hpp"
2
+
3
+ #ifndef FEATOMIC_TORCH_AUTOGRAD_HPP
4
+ #define FEATOMIC_TORCH_AUTOGRAD_HPP
5
+
6
+ #include <ATen/core/ivalue.h>
7
+ #include <torch/autograd.h>
8
+
9
+ #include <metatensor/torch.hpp>
10
+
11
+ #include "featomic/torch/exports.h"
12
+
13
+ namespace featomic_torch {
14
+
15
+ /// Custom torch::autograd::Function integrating featomic with torch autograd.
16
+ ///
17
+ /// This is a bit more complex than your typical autograd because there is some
18
+ /// impedance mismatch between featomic and torch. Most of it should be taken
19
+ /// care of by the `compute` function below.
20
+ class FEATOMIC_TORCH_EXPORT FeatomicAutograd: public torch::autograd::Function<FeatomicAutograd> {
21
+ public:
22
+ /// Register a pseudo node in Torch's computational graph going from
23
+ /// `all_positions` and `all_cell` to the values in `block`; using the
24
+ /// pre-computed gradients in `block`.
25
+ ///
26
+ /// If `all_positions.requires_grad` is True, `block` must have a
27
+ /// `"positions"` gradient; and `systems_start` should contain the index of
28
+ /// the first atom of each system in `all_positions`.
29
+ ///
30
+ /// If `all_cells.requires_grad` is True, `block` must have a `"cell"`
31
+ /// gradient, and the block samples must contain a `"stucture"` dimension.
32
+ ///
33
+ /// This function returns a vector with one element corresponding to
34
+ /// `block.values`, which should be left unused. It is only there to make
35
+ /// sure torch registers a `grad_fn` for the tensors stored inside the
36
+ /// TensorBlock (the values in the TensorBlock are references to the ones
37
+ /// returned by this function, so when a `grad_fn` is added to one, it is
38
+ /// also added to the other).
39
+ static std::vector<torch::Tensor> forward(
40
+ torch::autograd::AutogradContext *ctx,
41
+ torch::Tensor all_positions,
42
+ torch::Tensor all_cells,
43
+ torch::IValue systems_start,
44
+ metatensor_torch::TensorBlock block
45
+ );
46
+
47
+ /// Backward step: get the gradients of some quantity `A` w.r.t. the outputs
48
+ /// of `forward`; and compute the gradients of the same quantity `A` w.r.t.
49
+ /// the inputs of `forward` (i.e. cell and positions).
50
+ static std::vector<torch::Tensor> backward(
51
+ torch::autograd::AutogradContext *ctx,
52
+ std::vector<torch::Tensor> grad_outputs
53
+ );
54
+ };
55
+
56
+ }
57
+
58
+ #endif