-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
meta.yaml
133 lines (125 loc) · 4.31 KB
/
meta.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
{% set name = "openmm-torch" %}
{% set version = "1.4" %}
# see github.com/conda-forge/conda-forge.github.io/issues/1059 for naming discussion
{% set torch_proc_type = "cuda" if cuda_compiler_version != "None" else "cpu" %}
{% if cuda_compiler_version in (None, "None", True, False) %}
{% set cuda_major = 0 %}
{% else %}
{% set cuda_major = environ.get("cuda_compiler_version", "11.8").split(".")[0] | int %}
{% endif %}
package:
name: {{ name|lower }}
version: {{ version }}
source:
url: https://github.com/openmm/{{ name }}/archive/v{{ version }}.tar.gz
sha256: c8270d08ae13a0af7050997964447236d6c93eb611b89e1de9c4ca3b3a4aaab5
patches:
- 0001-Fix-paths.patch
- 0002-Cpp17.patch
- 0003-setup-py-macos.patch
build:
number: 6
string: cuda{{ cuda_compiler_version | replace('.', '') }}py{{ CONDA_PY }}h{{ PKG_HASH }}_{{ PKG_BUILDNUM }} # [cuda_compiler_version != "None"]
string: cpu_py{{ CONDA_PY }}h{{ PKG_HASH }}_{{ PKG_BUILDNUM }} # [cuda_compiler_version == "None"]
skip: true # [win]
skip: true # [aarch64 and cuda_compiler_version not in (undefined, 'None')]
requirements:
build:
- python # [build_platform != target_platform]
- cross-python_{{ target_platform }} # [build_platform != target_platform]
- numpy >=1.19 # [build_platform != target_platform]
- swig # [build_platform != target_platform]
- pytorch # [build_platform != target_platform]
- pytorch =*={{ torch_proc_type }}* # [build_platform != target_platform]
- openmm >=8.0.0 # [build_platform != target_platform]
- {{ compiler('c') }}
- {{ stdlib("c") }}
- {{ compiler('cxx') }}
- {{ compiler('cuda') }} # [cuda_compiler_version not in (undefined, 'None')]
- {{ cdt('mesa-libgl-devel') }} # [linux]
{% if cuda_major >= 12 %}
- libcufft-dev
- cuda-driver-dev
- cuda-cudart-dev
- cuda-nvrtc-dev
- cuda-nvtx-dev
- cuda-nvml-dev
- libcublas-dev
- libcurand-dev
{% endif %}
- cuda-version {{ cuda_compiler_version }} # [cuda_compiler_version not in (undefined, 'None')]
- cmake
- make
host:
- python
- setuptools
- pip
- swig
- openmm >=8.0.0
- ocl-icd # [linux]
- khronos-opencl-icd-loader # [osx]
- pytorch =*={{ torch_proc_type }}*
run:
- python
- {{ pin_compatible('openmm', max_pin='x.x') }}
- ocl-icd # [linux]
- ocl-icd-system # [linux]
- khronos-opencl-icd-loader # [osx]
- ocl_icd_wrapper_apple # [osx]
run_constrained:
# 2022/02/05 hmaarrfk
# While conda packaging seems to allow us to specify
# constraints on the same package in different lines
# the resulting package doesn't have the ability to
# be specified in multiples lines
# This makes it tricky to use run_exports
# we add the GPU constraint in the run_constrained
# to allow us to have "two" constraints on the
# running package
- pytorch =*={{ torch_proc_type }}*
test:
imports:
- openmmtorch
commands: |
cd ${CONDA_PREFIX}/share/{{ name }}/tests
ls -al
set +e
summary=""
exitcode=0
for f in Test*; do
if [[ $f == *Cuda* || $f == *OpenCL* ]]; then
continue
fi
echo "Running $f..."
./${f}
thisexitcode=$?
summary+="\n${f}: "
if [[ $thisexitcode == 0 ]]; then summary+="OK"; else summary+="FAILED"; fi
((exitcode+=$thisexitcode))
done
echo "-------"
echo "Summary"
echo "-------"
echo -e "${summary}"
exit $exitcode
about:
home: https://github.com/openmm/openmm-torch
license: MIT
license_family: MIT
license_file: README.md
summary: OpenMM plugin to define forces with neural networks
description: |
This is a plugin for OpenMM that allows neural networks to be
used for defining forces. It is implemented with PyTorch.
To use it, you create a PyTorch model that takes particle
positions as input and produces energy as output. This plugin
uses the model to apply forces to particles during a simulation.
doc_url: https://github.com/openmm/openmm-torch
dev_url: https://github.com/openmm/openmm-torch
extra:
recipe-maintainers:
- raimis
- jaimergp
- peastman
- mikemhenry
- RaulPPelaez