worm2d 0.2.8__tar.gz

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 (214) hide show
  1. worm2d-0.2.8/.github/workflows/ci-make.yml +87 -0
  2. worm2d-0.2.8/.github/workflows/python-publish.yml +90 -0
  3. worm2d-0.2.8/.gitignore +129 -0
  4. worm2d-0.2.8/CMakeLists.txt +317 -0
  5. worm2d-0.2.8/LICENSE +21 -0
  6. worm2d-0.2.8/PKG-INFO +22 -0
  7. worm2d-0.2.8/README.md +4 -0
  8. worm2d-0.2.8/pyproject.toml +31 -0
  9. worm2d-0.2.8/src/cpp/CE_orientation/CTRNN.cpp +304 -0
  10. worm2d-0.2.8/src/cpp/CE_orientation/CTRNN.h +115 -0
  11. worm2d-0.2.8/src/cpp/CE_orientation/TSearch.cpp +1212 -0
  12. worm2d-0.2.8/src/cpp/CE_orientation/TSearch.h +208 -0
  13. worm2d-0.2.8/src/cpp/CE_orientation/VectorMatrix.h +468 -0
  14. worm2d-0.2.8/src/cpp/CE_orientation/WormAgent.cpp +297 -0
  15. worm2d-0.2.8/src/cpp/CE_orientation/WormAgent.h +80 -0
  16. worm2d-0.2.8/src/cpp/CE_orientation/main.cpp +406 -0
  17. worm2d-0.2.8/src/cpp/CE_orientation/random.cpp +208 -0
  18. worm2d-0.2.8/src/cpp/CE_orientation/random.h +77 -0
  19. worm2d-0.2.8/src/cpp/Mainvars.h +32 -0
  20. worm2d-0.2.8/src/cpp/Muscles.cpp +37 -0
  21. worm2d-0.2.8/src/cpp/Muscles.h +53 -0
  22. worm2d-0.2.8/src/cpp/NervousSystem.cpp +325 -0
  23. worm2d-0.2.8/src/cpp/NervousSystem.h +93 -0
  24. worm2d-0.2.8/src/cpp/RoyalSociety2018/Muscles.cpp +37 -0
  25. worm2d-0.2.8/src/cpp/RoyalSociety2018/Muscles.h +37 -0
  26. worm2d-0.2.8/src/cpp/RoyalSociety2018/NervousSystem.cpp +297 -0
  27. worm2d-0.2.8/src/cpp/RoyalSociety2018/NervousSystem.h +87 -0
  28. worm2d-0.2.8/src/cpp/RoyalSociety2018/StretchReceptor.cpp +71 -0
  29. worm2d-0.2.8/src/cpp/RoyalSociety2018/StretchReceptor.h +48 -0
  30. worm2d-0.2.8/src/cpp/RoyalSociety2018/TSearch.cpp +1004 -0
  31. worm2d-0.2.8/src/cpp/RoyalSociety2018/TSearch.h +206 -0
  32. worm2d-0.2.8/src/cpp/RoyalSociety2018/VectorMatrix.h +466 -0
  33. worm2d-0.2.8/src/cpp/RoyalSociety2018/Worm.cpp +502 -0
  34. worm2d-0.2.8/src/cpp/RoyalSociety2018/Worm.h +92 -0
  35. worm2d-0.2.8/src/cpp/RoyalSociety2018/WormBody.cpp +371 -0
  36. worm2d-0.2.8/src/cpp/RoyalSociety2018/WormBody.h +162 -0
  37. worm2d-0.2.8/src/cpp/RoyalSociety2018/jsonUtils.cpp +411 -0
  38. worm2d-0.2.8/src/cpp/RoyalSociety2018/jsonUtils.h +21 -0
  39. worm2d-0.2.8/src/cpp/RoyalSociety2018/main.cpp +457 -0
  40. worm2d-0.2.8/src/cpp/RoyalSociety2018/random.cpp +208 -0
  41. worm2d-0.2.8/src/cpp/RoyalSociety2018/random.h +76 -0
  42. worm2d-0.2.8/src/cpp/RoyalSociety2018/test.sh +6 -0
  43. worm2d-0.2.8/src/cpp/StretchReceptor.cpp +135 -0
  44. worm2d-0.2.8/src/cpp/StretchReceptor.h +50 -0
  45. worm2d-0.2.8/src/cpp/TSearch.cpp +1027 -0
  46. worm2d-0.2.8/src/cpp/TSearch.h +228 -0
  47. worm2d-0.2.8/src/cpp/TSearch_gp.cpp +437 -0
  48. worm2d-0.2.8/src/cpp/TSearch_gp.h +278 -0
  49. worm2d-0.2.8/src/cpp/TSearch_gp2.cpp +881 -0
  50. worm2d-0.2.8/src/cpp/TSearch_gp2.h +296 -0
  51. worm2d-0.2.8/src/cpp/TSearch_orig.cpp +1027 -0
  52. worm2d-0.2.8/src/cpp/TSearch_orig.h +215 -0
  53. worm2d-0.2.8/src/cpp/VectorMatrix.h +511 -0
  54. worm2d-0.2.8/src/cpp/VectorMatrix11.h +256 -0
  55. worm2d-0.2.8/src/cpp/VectorMatrix17.h +389 -0
  56. worm2d-0.2.8/src/cpp/VectorMatrix_orig.h +501 -0
  57. worm2d-0.2.8/src/cpp/Worm.cpp +752 -0
  58. worm2d-0.2.8/src/cpp/Worm.h +111 -0
  59. worm2d-0.2.8/src/cpp/Worm2D/CTRNN.cpp +306 -0
  60. worm2d-0.2.8/src/cpp/Worm2D/CTRNN.h +116 -0
  61. worm2d-0.2.8/src/cpp/Worm2D/Evolution.cpp +1018 -0
  62. worm2d-0.2.8/src/cpp/Worm2D/Evolution.h +1820 -0
  63. worm2d-0.2.8/src/cpp/Worm2D/Evolution21.cpp +590 -0
  64. worm2d-0.2.8/src/cpp/Worm2D/Evolution21.h +60 -0
  65. worm2d-0.2.8/src/cpp/Worm2D/EvolutionCE.cpp +345 -0
  66. worm2d-0.2.8/src/cpp/Worm2D/EvolutionCE.h +52 -0
  67. worm2d-0.2.8/src/cpp/Worm2D/EvolutionCO.cpp +334 -0
  68. worm2d-0.2.8/src/cpp/Worm2D/EvolutionCO.h +117 -0
  69. worm2d-0.2.8/src/cpp/Worm2D/EvolutionRS18.cpp +453 -0
  70. worm2d-0.2.8/src/cpp/Worm2D/EvolutionRS18.h +76 -0
  71. worm2d-0.2.8/src/cpp/Worm2D/Evolvable.cpp +325 -0
  72. worm2d-0.2.8/src/cpp/Worm2D/Evolvable.h +564 -0
  73. worm2d-0.2.8/src/cpp/Worm2D/NSToMuscles.cpp +60 -0
  74. worm2d-0.2.8/src/cpp/Worm2D/NSToMuscles.h +28 -0
  75. worm2d-0.2.8/src/cpp/Worm2D/Segment21.cpp +94 -0
  76. worm2d-0.2.8/src/cpp/Worm2D/Segment21.h +42 -0
  77. worm2d-0.2.8/src/cpp/Worm2D/Simulation.cpp +32 -0
  78. worm2d-0.2.8/src/cpp/Worm2D/Simulation.h +47 -0
  79. worm2d-0.2.8/src/cpp/Worm2D/StretchReceptor.cpp +911 -0
  80. worm2d-0.2.8/src/cpp/Worm2D/StretchReceptor.h +309 -0
  81. worm2d-0.2.8/src/cpp/Worm2D/StretchReceptor18.cpp +94 -0
  82. worm2d-0.2.8/src/cpp/Worm2D/StretchReceptor18.h +59 -0
  83. worm2d-0.2.8/src/cpp/Worm2D/StretchReceptorCE.cpp +264 -0
  84. worm2d-0.2.8/src/cpp/Worm2D/StretchReceptorCE.h +58 -0
  85. worm2d-0.2.8/src/cpp/Worm2D/TSearchCO.cpp +1216 -0
  86. worm2d-0.2.8/src/cpp/Worm2D/TSearchCO.h +212 -0
  87. worm2d-0.2.8/src/cpp/Worm2D/VectorMatrixCO.h +473 -0
  88. worm2d-0.2.8/src/cpp/Worm2D/Worm21.cpp +569 -0
  89. worm2d-0.2.8/src/cpp/Worm2D/Worm21.h +94 -0
  90. worm2d-0.2.8/src/cpp/Worm2D/Worm2D.cpp +2877 -0
  91. worm2d-0.2.8/src/cpp/Worm2D/Worm2D.h +1051 -0
  92. worm2d-0.2.8/src/cpp/Worm2D/Worm2D21.cpp +489 -0
  93. worm2d-0.2.8/src/cpp/Worm2D/Worm2D21.h +156 -0
  94. worm2d-0.2.8/src/cpp/Worm2D/Worm2DCE.cpp +1849 -0
  95. worm2d-0.2.8/src/cpp/Worm2D/Worm2DCE.h +310 -0
  96. worm2d-0.2.8/src/cpp/Worm2D/Worm2DSR.cpp +2671 -0
  97. worm2d-0.2.8/src/cpp/Worm2D/Worm2DSR.h +297 -0
  98. worm2d-0.2.8/src/cpp/Worm2D/Worm2Dmods.cpp +1217 -0
  99. worm2d-0.2.8/src/cpp/Worm2D/Worm2Dmods.h +544 -0
  100. worm2d-0.2.8/src/cpp/Worm2D/WormAgent.cpp +750 -0
  101. worm2d-0.2.8/src/cpp/Worm2D/WormAgent.h +173 -0
  102. worm2d-0.2.8/src/cpp/Worm2D/WormRS18.cpp +1464 -0
  103. worm2d-0.2.8/src/cpp/Worm2D/WormRS18.h +165 -0
  104. worm2d-0.2.8/src/cpp/Worm2D/jsonUtils.cpp +1800 -0
  105. worm2d-0.2.8/src/cpp/Worm2D/jsonUtils.h +582 -0
  106. worm2d-0.2.8/src/cpp/Worm2D/main.cpp +312 -0
  107. worm2d-0.2.8/src/cpp/Worm2D/main_osc.cpp +517 -0
  108. worm2d-0.2.8/src/cpp/WormBody.cpp +371 -0
  109. worm2d-0.2.8/src/cpp/WormBody.h +170 -0
  110. worm2d-0.2.8/src/cpp/argUtils.cpp +118 -0
  111. worm2d-0.2.8/src/cpp/argUtils.h +73 -0
  112. worm2d-0.2.8/src/cpp/jsonUtils.cpp +1084 -0
  113. worm2d-0.2.8/src/cpp/jsonUtils.h +77 -0
  114. worm2d-0.2.8/src/cpp/main.cpp +402 -0
  115. worm2d-0.2.8/src/cpp/network2021/Muscles.cpp +37 -0
  116. worm2d-0.2.8/src/cpp/network2021/Muscles.h +36 -0
  117. worm2d-0.2.8/src/cpp/network2021/NervousSystem.cpp +303 -0
  118. worm2d-0.2.8/src/cpp/network2021/NervousSystem.h +87 -0
  119. worm2d-0.2.8/src/cpp/network2021/Segment.cpp +94 -0
  120. worm2d-0.2.8/src/cpp/network2021/Segment.h +42 -0
  121. worm2d-0.2.8/src/cpp/network2021/TSearch.cpp +996 -0
  122. worm2d-0.2.8/src/cpp/network2021/TSearch.h +208 -0
  123. worm2d-0.2.8/src/cpp/network2021/VectorMatrix.h +466 -0
  124. worm2d-0.2.8/src/cpp/network2021/Worm.cpp +356 -0
  125. worm2d-0.2.8/src/cpp/network2021/Worm.h +84 -0
  126. worm2d-0.2.8/src/cpp/network2021/WormBody.cpp +371 -0
  127. worm2d-0.2.8/src/cpp/network2021/WormBody.h +162 -0
  128. worm2d-0.2.8/src/cpp/network2021/main.cpp +488 -0
  129. worm2d-0.2.8/src/cpp/network2021/random.cpp +208 -0
  130. worm2d-0.2.8/src/cpp/network2021/random.h +76 -0
  131. worm2d-0.2.8/src/cpp/neuromlLocal/NSBaseForW2D.h +31 -0
  132. worm2d-0.2.8/src/cpp/neuromlLocal/NervousSystemBase.h +39 -0
  133. worm2d-0.2.8/src/cpp/neuromlLocal/c302ForW2D.cpp +123 -0
  134. worm2d-0.2.8/src/cpp/neuromlLocal/c302ForW2D.h +76 -0
  135. worm2d-0.2.8/src/cpp/neuromlLocal/c302NervousSystem.cpp +63 -0
  136. worm2d-0.2.8/src/cpp/neuromlLocal/c302NervousSystem.h +51 -0
  137. worm2d-0.2.8/src/cpp/neuromlLocal/neuroml_utils.h +16 -0
  138. worm2d-0.2.8/src/cpp/neuromlLocal/owINeuronSimulator.h +87 -0
  139. worm2d-0.2.8/src/cpp/neuromlLocal/owSignalSimulator.cpp +219 -0
  140. worm2d-0.2.8/src/cpp/neuromlLocal/owSignalSimulator.h +65 -0
  141. worm2d-0.2.8/src/cpp/neuromlLocal/owSignalSimulatorForWorm2D.cpp +310 -0
  142. worm2d-0.2.8/src/cpp/neuromlLocal/owSignalSimulatorForWorm2D.h +29 -0
  143. worm2d-0.2.8/src/cpp/nlohmann/json.hpp +24765 -0
  144. worm2d-0.2.8/src/cpp/random.cpp +161 -0
  145. worm2d-0.2.8/src/cpp/random.h +67 -0
  146. worm2d-0.2.8/src/cpp/random_gp.cpp +161 -0
  147. worm2d-0.2.8/src/cpp/random_gp.h +67 -0
  148. worm2d-0.2.8/src/cpp/random_orig.cpp +208 -0
  149. worm2d-0.2.8/src/cpp/random_orig.h +80 -0
  150. worm2d-0.2.8/src/cpp/tests.cpp +99 -0
  151. worm2d-0.2.8/src/cpp/tests2.cpp +76 -0
  152. worm2d-0.2.8/src/cpp/utils.cpp +56 -0
  153. worm2d-0.2.8/src/cpp/utils.h +246 -0
  154. worm2d-0.2.8/src/worm2d/F2_fig_behavior.py +275 -0
  155. worm2d-0.2.8/src/worm2d/W2Djson_utils.py +332 -0
  156. worm2d-0.2.8/src/worm2d/__init__.py +8 -0
  157. worm2d-0.2.8/src/worm2d/analyse_runs.py +62 -0
  158. worm2d-0.2.8/src/worm2d/helper_funcs.py +3011 -0
  159. worm2d-0.2.8/src/worm2d/load_data.py +2656 -0
  160. worm2d-0.2.8/src/worm2d/neuromlLocal/.test.21w2d.mep +7 -0
  161. worm2d-0.2.8/src/worm2d/neuromlLocal/.test.21w2d.nrn.omt +16 -0
  162. worm2d-0.2.8/src/worm2d/neuromlLocal/.test.21w2d.omt +16 -0
  163. worm2d-0.2.8/src/worm2d/neuromlLocal/.test.w2d.mep +13 -0
  164. worm2d-0.2.8/src/worm2d/neuromlLocal/.test.w2d.nrn.omt +39 -0
  165. worm2d-0.2.8/src/worm2d/neuromlLocal/.test.w2d.omt +39 -0
  166. worm2d-0.2.8/src/worm2d/neuromlLocal/__init__.py +0 -0
  167. worm2d-0.2.8/src/worm2d/neuromlLocal/build_network.py +710 -0
  168. worm2d-0.2.8/src/worm2d/neuromlLocal/cell_W2Dosc.xml +60 -0
  169. worm2d-0.2.8/src/worm2d/neuromlLocal/cell_syn_W2D.xml +103 -0
  170. worm2d-0.2.8/src/worm2d/neuromlLocal/clean.sh +6 -0
  171. worm2d-0.2.8/src/worm2d/neuromlLocal/create_new_lems_file.py +257 -0
  172. worm2d-0.2.8/src/worm2d/neuromlLocal/main_sim.py +483 -0
  173. worm2d-0.2.8/src/worm2d/neuromlLocal/musc_W2D.xml +70 -0
  174. worm2d-0.2.8/src/worm2d/neuromlLocal/musc_X.xml +68 -0
  175. worm2d-0.2.8/src/worm2d/neuromlLocal/musc_X_cells.xml +4 -0
  176. worm2d-0.2.8/src/worm2d/neuromlLocal/regenerate.py +72 -0
  177. worm2d-0.2.8/src/worm2d/neuromlLocal/regenerate.sh +18 -0
  178. worm2d-0.2.8/src/worm2d/neuromlLocal/regenerate_21.sh +18 -0
  179. worm2d-0.2.8/src/worm2d/neuromlLocal/regenerate_all.py +50 -0
  180. worm2d-0.2.8/src/worm2d/neuromlLocal/run_izq_sims.py +101 -0
  181. worm2d-0.2.8/src/worm2d/neuromlLocal/run_osc_sim.py +55 -0
  182. worm2d-0.2.8/src/worm2d/neuromlLocal/run_osc_sim_21.py +55 -0
  183. worm2d-0.2.8/src/worm2d/neuromlLocal/syn_W2D.xml +37 -0
  184. worm2d-0.2.8/src/worm2d/neuromlLocal/testc302SigSim/Makefile +61 -0
  185. worm2d-0.2.8/src/worm2d/neuromlLocal/testc302SigSim/test.sh +8 -0
  186. worm2d-0.2.8/src/worm2d/neuromlLocal/testc302SigSim/testc302NervousSystem.cpp +52 -0
  187. worm2d-0.2.8/src/worm2d/neuromlLocal/utils.py +1086 -0
  188. worm2d-0.2.8/src/worm2d/osc21alldemo.py +98 -0
  189. worm2d-0.2.8/src/worm2d/regenerate_folder.py +31 -0
  190. worm2d-0.2.8/src/worm2d/runExp.py +39 -0
  191. worm2d-0.2.8/src/worm2d/runExpW2DSR.py +60 -0
  192. worm2d-0.2.8/src/worm2d/runExpW2Dosc.py +54 -0
  193. worm2d-0.2.8/src/worm2d/run_izq_sims.py +123 -0
  194. worm2d-0.2.8/src/worm2d/run_izq_sims_W2D21.py +137 -0
  195. worm2d-0.2.8/src/worm2d/run_main.py +1285 -0
  196. worm2d-0.2.8/src/worm2d/run_osc_sim.py +100 -0
  197. worm2d-0.2.8/src/worm2d/run_osc_sim_21.py +100 -0
  198. worm2d-0.2.8/src/worm2d/run_osc_sim_21all.py +100 -0
  199. worm2d-0.2.8/src/worm2d/viz.py +8 -0
  200. worm2d-0.2.8/test_all.sh +76 -0
  201. worm2d-0.2.8/tests/.test.example.mep +9 -0
  202. worm2d-0.2.8/tests/.test.example.omt +18 -0
  203. worm2d-0.2.8/tests/test.py +9 -0
  204. worm2d-0.2.8/tests/test_files/Makefile +33 -0
  205. worm2d-0.2.8/tests/test_files/TestPy.py +11 -0
  206. worm2d-0.2.8/tests/test_files/modelspec_api/test.sh +9 -0
  207. worm2d-0.2.8/tests/test_files/modelspec_api/worm2D_modelspec.py +105 -0
  208. worm2d-0.2.8/tests/test_files/modelspec_api/worm2d_example.json +11 -0
  209. worm2d-0.2.8/tests/test_files/modelspec_api/worm2d_example.yaml +6 -0
  210. worm2d-0.2.8/tests/test_files/modelspec_api/worm2d_spec.md +105 -0
  211. worm2d-0.2.8/tests/test_files/simple.sh +1 -0
  212. worm2d-0.2.8/tests/test_files/t.c +10 -0
  213. worm2d-0.2.8/tests/test_files/test.sh +6 -0
  214. worm2d-0.2.8/tests/test_files/test_py_cpp.cpp +33 -0
@@ -0,0 +1,87 @@
1
+ name: C/C++ CI
2
+
3
+ on:
4
+ push:
5
+ branches: [ "main", "development", "experimental", "test*", "feat*", "bug*" ]
6
+ pull_request:
7
+ branches: [ "main", "development", "experimental", "test*", "feat*", "bug*" ]
8
+
9
+ jobs:
10
+ build:
11
+
12
+ runs-on: ${{ matrix.runs-on }}
13
+ strategy:
14
+ fail-fast: false
15
+ matrix:
16
+ runs-on: [ubuntu-22.04, ubuntu-latest, macos-latest, macos-14 ]
17
+ python-version: [ "3.10", "3.12" ] # Note: 3.14 causes issues with Neuron 8.2.7
18
+
19
+ steps:
20
+ - uses: actions/checkout@v6
21
+
22
+ - name: Set up Python ${{ matrix.python-version }}
23
+ uses: actions/setup-python@v6
24
+ with:
25
+ python-version: ${{ matrix.python-version }}
26
+
27
+ - name: C++ info
28
+ run: g++ -v
29
+
30
+ - name: Install graphviz
31
+ uses: ts-graphviz/setup-graphviz@v2
32
+ with:
33
+ # Skip to run brew update command on macOS.
34
+ macos-skip-brew-update: 'true' # default false
35
+
36
+ - name: Install dependencies (Ubuntu)
37
+ run: sudo apt-get install -y tree graphviz openjdk-11-jdk cmake
38
+ if: ${{ contains(matrix.runs-on, 'ubuntu') }}
39
+
40
+ - name: Install dependencies (macOS)
41
+ run: brew install tree cmake
42
+ if: ${{ contains(matrix.runs-on, 'macos') }}
43
+
44
+ - name: Build and install worm2d package (with C++ binaries)
45
+ env:
46
+ CMAKE_BUILD_PARALLEL_LEVEL: 4
47
+ run: |
48
+
49
+ pip install setuptools==80 # needed for Neuron on py >=3.12
50
+
51
+ pip install -e .[dev] -v
52
+
53
+ - name: Run C++ unit tests
54
+ run: |
55
+ cmake -B build -DCMAKE_BUILD_TYPE=Release
56
+ cmake --build build --target worm2d_tests worm2d_tests2
57
+ ./build/tests
58
+
59
+ - name: Test C++/Python interactions
60
+ run: |
61
+ cd tests/test_files
62
+ ./test.sh
63
+ cd modelspec_api
64
+ ./test.sh
65
+
66
+ - name: Test Python command line script
67
+ run: |
68
+ python -m worm2d.run_main -R 1233 -p 6 --doEvol --outputFolderName exampleRun2 # Note: small population of 6 for quick runtime
69
+
70
+ - name: Test using test_all.sh
71
+ run: |
72
+ pip list
73
+
74
+ pip install scikit_build_core # Needed for building C++ extensions with scikit-build & --no-build-isolation
75
+
76
+ export NEURON_HOME=$pythonLocation
77
+ env
78
+
79
+ ./test_all.sh
80
+
81
+
82
+
83
+ - name: list generated files
84
+ run: |
85
+ ls -alth
86
+ tree
87
+ pip list
@@ -0,0 +1,90 @@
1
+ name: Upload Python Package
2
+
3
+ on:
4
+ push:
5
+ release:
6
+ types: [published]
7
+
8
+ jobs:
9
+ build_wheels:
10
+ runs-on: ubuntu-latest
11
+
12
+ steps:
13
+ - uses: actions/checkout@v7
14
+
15
+ - name: Build wheels
16
+ uses: pypa/cibuildwheel@v4.1.0
17
+ env:
18
+ CIBW_BUILD: cp39-* cp310-* cp311-* cp312-* cp313-*
19
+ CIBW_ARCHS_LINUX: x86_64
20
+ CIBW_BEFORE_ALL_LINUX: |
21
+ set -e
22
+ if command -v dnf >/dev/null 2>&1; then
23
+ dnf install -y cmake python3-devel
24
+ dnf install -y java-11-openjdk-devel graphviz tree || true
25
+ elif command -v yum >/dev/null 2>&1; then
26
+ yum install -y cmake python3-devel
27
+ yum install -y java-11-openjdk-devel graphviz tree || true
28
+ elif command -v apt-get >/dev/null 2>&1; then
29
+ apt-get update && apt-get install -y cmake python3-dev
30
+ apt-get install -y openjdk-11-jdk graphviz tree || true
31
+ elif command -v apk >/dev/null 2>&1; then
32
+ apk add --no-cache cmake python3-dev
33
+ apk add --no-cache openjdk11 graphviz tree || true
34
+ else
35
+ echo "No supported package manager found!" >&2
36
+ exit 1
37
+ fi
38
+
39
+ CIBW_BEFORE_BUILD_LINUX: |
40
+ set -e
41
+ python -m pip install --upgrade pip setuptools wheel cmake
42
+
43
+ - uses: actions/upload-artifact@v7
44
+ with:
45
+ name: wheels
46
+ path: ./wheelhouse/*.whl
47
+
48
+ build_sdist:
49
+ runs-on: ubuntu-latest
50
+
51
+ steps:
52
+ - uses: actions/checkout@v7
53
+
54
+ - name: Set up Python
55
+ uses: actions/setup-python@v6
56
+ with:
57
+ python-version: '3.x'
58
+
59
+ - name: Install dependencies
60
+ run: |
61
+ python -m pip install --upgrade pip
62
+ pip install build
63
+
64
+ - name: Install system dependencies (Ubuntu)
65
+ run: sudo apt-get install -y tree graphviz openjdk-11-jdk cmake
66
+
67
+ - name: Build sdist
68
+ run: python -m build --sdist
69
+
70
+ - uses: actions/upload-artifact@v7
71
+ with:
72
+ name: sdist
73
+ path: dist/*.tar.gz
74
+
75
+ publish:
76
+ if: github.event_name == 'release'
77
+ needs: [build_wheels, build_sdist]
78
+ runs-on: ubuntu-latest
79
+ permissions:
80
+ id-token: write
81
+
82
+ steps:
83
+ - uses: actions/download-artifact@v8
84
+ with:
85
+ pattern: "*"
86
+ path: dist/
87
+ merge-multiple: true
88
+
89
+ - name: Publish package
90
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,129 @@
1
+ *.o
2
+ /build/
3
+ /dist/
4
+ /src/worm2d/bin/
5
+ *.egg-info/
6
+ /main
7
+ /act.dat
8
+ /best.gen.dat
9
+ /body.dat
10
+ /curv.dat
11
+ /fitness.dat
12
+ /phenotype.dat
13
+ /seed.dat
14
+ /__pycache__
15
+ /testExample
16
+ /nv.dat
17
+ /nv2.dat
18
+ /phenotype2.dat
19
+ /w_verb.dat
20
+ /test_output/*.dat
21
+ /neuromlLocal/*.dat
22
+ /neuromlLocal/report.txt
23
+ /test_files/test_py_cpp
24
+ /neuromlLocal/__pycache__
25
+ /neuromlLocal/*.mod
26
+ /neuromlLocal/arm64
27
+ *_nrn.py
28
+ /neuromlLocal/*.gv
29
+ /neuromlLocal/Worm2DNet.gv.png
30
+ /neuromlLocal/x86_64
31
+ /neuromlLocal/testc302NervousSystem
32
+ /arm64
33
+ /x86_64
34
+ /report.txt
35
+ /exampleRun_nml
36
+ /*.dat
37
+ /exampleRun2
38
+ /neuromlLocal/testc302SigSim/*.dat
39
+ /neuromlLocal/testc302SigSim/arm64
40
+ /neuromlLocal/testc302SigSim/x86_64
41
+ /neuromlLocal/testc302SigSim/report.txt
42
+ /neuromlLocal/testc302SigSim/testc302NervousSystem
43
+ /RoyalSociety2018/*.dat
44
+ /RoyalSociety2018/main
45
+ /Worm2D/main
46
+ /network2021/main
47
+ /experiments/izq_runs_nets/*/*.gv
48
+ /experiments/izq_runs_nets/*/*.pdf
49
+ /experiments/izq_runs_nets_nml/*/*.gv
50
+ /experiments/izq_runs_nets_nml/*/*.pdf
51
+ /*/*.gv
52
+ /*/*.pdf
53
+ .DS_Store
54
+ /CE_orientation/main
55
+ /Worm2D/main_osc
56
+ /checkoutexp.sh
57
+ /.ipynb_checkpoints
58
+ /RoyalSociety2018/testRS18/ExampleActivity.png
59
+ /RoyalSociety2018/testRS18/Motion.png
60
+ /RoyalSociety2018/testRS18/Orient.png
61
+ /RoyalSociety2018/testRS18/act.dat
62
+ /RoyalSociety2018/testRS18/best.gen.dat
63
+ /RoyalSociety2018/testRS18/body.dat
64
+ /RoyalSociety2018/testRS18/body_mm.dat
65
+ /RoyalSociety2018/testRS18/curv.dat
66
+ /RoyalSociety2018/testRS18/curv_t.dat
67
+ /RoyalSociety2018/testRS18/fitness.dat
68
+ /RoyalSociety2018/testRS18/output.wcon
69
+ /RoyalSociety2018/testRS18/params.dat
70
+ /RoyalSociety2018/testRS18/seed.dat
71
+ /RoyalSociety2018/testRS18/speed.dat
72
+ /RoyalSociety2018/testRS18/worm_data.json
73
+ /experiments/izq_runs*
74
+
75
+ /ex*/Orient.png
76
+ /ex*/*.dat
77
+ /ex*/*.json
78
+ /ex*/*.cpt
79
+ /ex*/Evo*.png
80
+ /ex*/Fit*.png
81
+ /ex*/LEM*.png
82
+ /ex*/Motion.png
83
+ /ex*/beha*.png
84
+ /ex*/Worm*.png
85
+ /ex*/*.mod
86
+ /ex*/*.nml
87
+ /ex*/*.xml
88
+ /ex*/*.wcon
89
+
90
+
91
+ /experiments/*/*.dat
92
+ /experiments/*/*.json
93
+ /experiments/*/*.mod
94
+ /experiments/*/*.nml
95
+ /experiments/*/*.xml
96
+ /experiments/*/Fit*.png
97
+ /experiments/*/Mot*.png
98
+ /experiments/*/Or*.png
99
+ /experiments/*/Ev*.png
100
+ /experiments/*/LE*.png
101
+ /experiments/*/Wo*.png
102
+ /experiments/*/*.cpt
103
+ /experiments/*/*.gv
104
+ /experiments/*/beha*
105
+ /experiments/*/*.wcon
106
+
107
+ /testruns/*/*.dat
108
+ /testruns/*/*.json
109
+ /testruns/*/Ev*.png
110
+ /testruns/*/Fit*.png
111
+ /testruns/*/Mot*.png
112
+ /testruns/*/Or*.png
113
+ /testruns/*/Wor*.png
114
+ /testruns/*/LE*.png
115
+ /testruns/*/beh*.*
116
+ /testruns/*/*.mod
117
+ /testruns/*/*.*ml
118
+ /testruns/*/*.gv
119
+ /testruns/*/*.cpt
120
+ /testruns/*/*.wcon
121
+ /RoyalSociety2018/testRS18_2
122
+ /docs
123
+ /notebooks
124
+ __pycache__
125
+ /src/worm2d/neuromlLocal/testc302SigSim/arm64
126
+ /src/worm2d/neuromlLocal/testc302SigSim/x86_64
127
+ /src/worm2d/neuromlLocal/testc302SigSim/*.dat
128
+ /src/worm2d/neuromlLocal/testc302SigSim/testc302NervousSystem
129
+ /src/worm2d/neuromlLocal/testc302SigSim/report.txt
@@ -0,0 +1,317 @@
1
+ cmake_minimum_required(VERSION 3.17)
2
+ project(worm2d CXX)
3
+
4
+ set(CMAKE_CXX_STANDARD 11)
5
+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
6
+
7
+ # ---------------------------------------------------------------------------
8
+ # Extract package version from pyproject.toml so W2D_VERSION stays in sync
9
+ # ---------------------------------------------------------------------------
10
+ file(READ "${CMAKE_SOURCE_DIR}/pyproject.toml" _PYPROJECT_CONTENTS)
11
+ string(REGEX MATCH "version = \"([0-9]+\\.[0-9]+\\.[0-9]+)\"" _ "${_PYPROJECT_CONTENTS}")
12
+ if(CMAKE_MATCH_1)
13
+ set(W2D_VERSION_STR "v${CMAKE_MATCH_1}")
14
+ else()
15
+ set(W2D_VERSION_STR "v0.0.0")
16
+ message(WARNING "[worm2d] Could not extract version from pyproject.toml; defaulting to v0.0.0")
17
+ endif()
18
+ message(STATUS "[worm2d] Package version: ${W2D_VERSION_STR}")
19
+ add_compile_definitions(W2D_VERSION_FROM_CMAKE="${W2D_VERSION_STR}")
20
+
21
+ # ---------------------------------------------------------------------------
22
+ # Find Python (for embedding)
23
+ # ---------------------------------------------------------------------------
24
+ find_package(Python3 REQUIRED COMPONENTS Interpreter Development.Module)
25
+
26
+ # ---------------------------------------------------------------------------
27
+ # Python embedding support (optional — manylinux containers have no libpython)
28
+ # When OFF, the NeuroML/doNML mode is unavailable but all other functionality
29
+ # builds and runs normally.
30
+ # ---------------------------------------------------------------------------
31
+ option(PYTHON_EMBEDDING "Build C++ executables with Python embedding (required for doNML/NeuroML mode)" ON)
32
+
33
+ if(PYTHON_EMBEDDING)
34
+ find_package(Python3 OPTIONAL_COMPONENTS Development.Embed)
35
+ if(Python3_Development.Embed_FOUND)
36
+ message(STATUS "[worm2d] Python embedding: enabled")
37
+ else()
38
+ message(WARNING "[worm2d] Python3 Development.Embed not found — disabling Python embedding (doNML mode unavailable)")
39
+ set(PYTHON_EMBEDDING OFF)
40
+ endif()
41
+ endif()
42
+
43
+ if(NOT PYTHON_EMBEDDING)
44
+ message(STATUS "[worm2d] Python embedding: disabled")
45
+ add_compile_definitions(WORM2D_NO_PYTHON_EMBEDDING)
46
+ endif()
47
+
48
+ # ---------------------------------------------------------------------------
49
+ # Derive a reliable Python library directory for rpath embedding.
50
+ # FindPython3 may leave Python3_LIBRARY_DIRS empty in conda/venv environments;
51
+ # fall back to extracting the directory from the full library path or the
52
+ # interpreter location so that @rpath/libpython resolves at runtime on macOS.
53
+ # ---------------------------------------------------------------------------
54
+ if(PYTHON_EMBEDDING)
55
+ if(Python3_LIBRARY_DIRS)
56
+ set(PYTHON_LIB_RPATH ${Python3_LIBRARY_DIRS})
57
+ elseif(Python3_LIBRARIES)
58
+ list(GET Python3_LIBRARIES 0 _py_first_lib)
59
+ get_filename_component(PYTHON_LIB_RPATH "${_py_first_lib}" DIRECTORY)
60
+ else()
61
+ get_filename_component(_py_bin_dir "${Python3_EXECUTABLE}" DIRECTORY)
62
+ get_filename_component(PYTHON_LIB_RPATH "${_py_bin_dir}/../lib" ABSOLUTE)
63
+ endif()
64
+ message(STATUS "[worm2d] Python library rpath: ${PYTHON_LIB_RPATH}")
65
+ else()
66
+ set(PYTHON_LIB_RPATH "")
67
+ endif()
68
+
69
+ # ---------------------------------------------------------------------------
70
+ # nlohmann_json — bundled header-only library
71
+ # ---------------------------------------------------------------------------
72
+ set(NLOHMANN_JSON_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/cpp")
73
+
74
+ # ---------------------------------------------------------------------------
75
+ # Common compiler flags
76
+ # ---------------------------------------------------------------------------
77
+ add_compile_options(-O3 -flto)
78
+
79
+ # ---------------------------------------------------------------------------
80
+ # Shared include directories used by multiple targets
81
+ # ---------------------------------------------------------------------------
82
+ set(CPP_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/cpp)
83
+
84
+ # ---------------------------------------------------------------------------
85
+ # Helper macro: build a binary and install it into worm2d/bin/<subdir>
86
+ # ---------------------------------------------------------------------------
87
+ macro(add_worm_binary TARGET_NAME SUBDIR)
88
+ # Remaining args are source files
89
+ set(SRCS ${ARGN})
90
+ if("${SUBDIR}" STREQUAL "")
91
+ set(_w2d_bin_path "bin/main")
92
+ else()
93
+ set(_w2d_bin_path "bin/${SUBDIR}/main")
94
+ endif()
95
+ message(STATUS "[worm2d] Configuring C++ binary: ${_w2d_bin_path}")
96
+ add_executable(${TARGET_NAME} ${SRCS})
97
+ # Ninja uses a flat build dir — give each target its own subdir to avoid
98
+ # "multiple rules generate main" when several targets share OUTPUT_NAME main.
99
+ if("${SUBDIR}" STREQUAL "")
100
+ set_target_properties(${TARGET_NAME} PROPERTIES
101
+ RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
102
+ else()
103
+ set_target_properties(${TARGET_NAME} PROPERTIES
104
+ RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/${SUBDIR})
105
+ endif()
106
+ add_custom_command(TARGET ${TARGET_NAME} PRE_LINK
107
+ COMMAND ${CMAKE_COMMAND} -E echo "[worm2d] Linking ${_w2d_bin_path} ..."
108
+ VERBATIM
109
+ )
110
+ target_compile_options(${TARGET_NAME} PRIVATE -fPIE)
111
+ target_include_directories(${TARGET_NAME} PRIVATE
112
+ ${CPP_DIR}
113
+ ${CPP_DIR}/Worm2D
114
+ ${Python3_INCLUDE_DIRS}
115
+ ${NLOHMANN_JSON_INCLUDE_DIR}
116
+ /opt/homebrew/include
117
+ )
118
+ if(PYTHON_EMBEDDING)
119
+ target_link_libraries(${TARGET_NAME} PRIVATE
120
+ Python3::Python
121
+ Threads::Threads
122
+ ${CMAKE_DL_LIBS}
123
+ )
124
+ # Use CMake's INSTALL_RPATH so the rpath survives install_name_tool rewriting
125
+ # at install time (raw -Wl,-rpath linker flags are stripped by CMake on macOS).
126
+ if(APPLE)
127
+ set_target_properties(${TARGET_NAME} PROPERTIES
128
+ INSTALL_RPATH "@loader_path;${PYTHON_LIB_RPATH}"
129
+ BUILD_WITH_INSTALL_RPATH TRUE
130
+ )
131
+ else()
132
+ set_target_properties(${TARGET_NAME} PROPERTIES
133
+ INSTALL_RPATH "${PYTHON_LIB_RPATH}"
134
+ BUILD_WITH_INSTALL_RPATH TRUE
135
+ )
136
+ endif()
137
+ target_link_directories(${TARGET_NAME} PRIVATE
138
+ /opt/homebrew/lib
139
+ ${PYTHON_LIB_RPATH}
140
+ )
141
+ else()
142
+ target_link_libraries(${TARGET_NAME} PRIVATE
143
+ Threads::Threads
144
+ ${CMAKE_DL_LIBS}
145
+ )
146
+ target_link_directories(${TARGET_NAME} PRIVATE
147
+ /opt/homebrew/lib
148
+ )
149
+ endif()
150
+ install(TARGETS ${TARGET_NAME}
151
+ RUNTIME DESTINATION worm2d/bin/${SUBDIR}
152
+ )
153
+ endmacro()
154
+
155
+ find_package(Threads REQUIRED)
156
+
157
+ # ---------------------------------------------------------------------------
158
+ # Core shared sources (used by both main and Worm2D targets)
159
+ # ---------------------------------------------------------------------------
160
+ set(CORE_SRCS
161
+ ${CPP_DIR}/Worm.cpp
162
+ ${CPP_DIR}/WormBody.cpp
163
+ ${CPP_DIR}/NervousSystem.cpp
164
+ ${CPP_DIR}/StretchReceptor.cpp
165
+ ${CPP_DIR}/Muscles.cpp
166
+ ${CPP_DIR}/TSearch.cpp
167
+ ${CPP_DIR}/random.cpp
168
+ ${CPP_DIR}/argUtils.cpp
169
+ ${CPP_DIR}/jsonUtils.cpp
170
+ ${CPP_DIR}/utils.cpp
171
+ ${CPP_DIR}/neuromlLocal/c302NervousSystem.cpp
172
+ ${CPP_DIR}/neuromlLocal/c302ForW2D.cpp
173
+ ${CPP_DIR}/neuromlLocal/owSignalSimulatorForWorm2D.cpp
174
+ ${CPP_DIR}/neuromlLocal/owSignalSimulator.cpp
175
+ )
176
+
177
+ # ---------------------------------------------------------------------------
178
+ # Top-level main binary → worm2d/bin/main
179
+ # ---------------------------------------------------------------------------
180
+ add_worm_binary(worm2d_main ""
181
+ ${CPP_DIR}/main.cpp
182
+ ${CORE_SRCS}
183
+ )
184
+ set_target_properties(worm2d_main PROPERTIES OUTPUT_NAME main)
185
+
186
+ # ---------------------------------------------------------------------------
187
+ # C++ unit tests (built separately, not installed)
188
+ # ---------------------------------------------------------------------------
189
+ add_executable(worm2d_tests
190
+ ${CPP_DIR}/tests.cpp
191
+ ${CPP_DIR}/NervousSystem.cpp
192
+ ${CPP_DIR}/random.cpp
193
+ )
194
+ target_include_directories(worm2d_tests PRIVATE ${CPP_DIR})
195
+ target_link_libraries(worm2d_tests PRIVATE Threads::Threads)
196
+ set_target_properties(worm2d_tests PROPERTIES OUTPUT_NAME tests)
197
+
198
+ add_executable(worm2d_tests2
199
+ ${CPP_DIR}/tests2.cpp
200
+ ${CPP_DIR}/NervousSystem.cpp
201
+ ${CPP_DIR}/random.cpp
202
+ ${CPP_DIR}/jsonUtils.cpp
203
+ ${CPP_DIR}/argUtils.cpp
204
+ )
205
+ target_include_directories(worm2d_tests2 PRIVATE
206
+ ${CPP_DIR}
207
+ ${Python3_INCLUDE_DIRS}
208
+ ${NLOHMANN_JSON_INCLUDE_DIR}
209
+ /opt/homebrew/include
210
+ )
211
+ target_link_libraries(worm2d_tests2 PRIVATE Threads::Threads ${CMAKE_DL_LIBS})
212
+ target_link_directories(worm2d_tests2 PRIVATE /opt/homebrew/lib)
213
+ set_target_properties(worm2d_tests2 PROPERTIES OUTPUT_NAME tests2)
214
+
215
+ # ---------------------------------------------------------------------------
216
+ # Worm2D shared sources
217
+ # ---------------------------------------------------------------------------
218
+ set(W2D_COMMON_SRCS
219
+ ${CPP_DIR}/Worm2D/Evolvable.cpp
220
+ ${CPP_DIR}/Worm2D/WormAgent.cpp
221
+ ${CPP_DIR}/Worm2D/Worm2DSR.cpp
222
+ ${CPP_DIR}/Worm2D/Simulation.cpp
223
+ ${CPP_DIR}/Worm2D/Worm2D21.cpp
224
+ ${CPP_DIR}/Worm2D/Worm2DCE.cpp
225
+ ${CPP_DIR}/Worm2D/WormRS18.cpp
226
+ ${CPP_DIR}/Worm2D/Worm21.cpp
227
+ ${CPP_DIR}/Worm2D/Segment21.cpp
228
+ ${CPP_DIR}/Worm2D/Worm2D.cpp
229
+ ${CPP_DIR}/Worm2D/Evolution21.cpp
230
+ ${CPP_DIR}/Worm2D/Evolution.cpp
231
+ ${CPP_DIR}/Worm2D/EvolutionCE.cpp
232
+ ${CPP_DIR}/Worm2D/EvolutionRS18.cpp
233
+ ${CPP_DIR}/Worm2D/StretchReceptor18.cpp
234
+ ${CPP_DIR}/Worm2D/StretchReceptorCE.cpp
235
+ ${CPP_DIR}/Worm2D/StretchReceptor.cpp
236
+ ${CPP_DIR}/Worm2D/TSearchCO.cpp
237
+ ${CPP_DIR}/Worm2D/NSToMuscles.cpp
238
+ ${CPP_DIR}/Worm2D/EvolutionCO.cpp
239
+ ${CPP_DIR}/Worm2D/Worm2Dmods.cpp
240
+ ${CPP_DIR}/Worm2D/jsonUtils.cpp
241
+ # shared core files referenced by Worm2D
242
+ ${CPP_DIR}/WormBody.cpp
243
+ ${CPP_DIR}/NervousSystem.cpp
244
+ ${CPP_DIR}/Muscles.cpp
245
+ ${CPP_DIR}/TSearch.cpp
246
+ ${CPP_DIR}/random.cpp
247
+ ${CPP_DIR}/utils.cpp
248
+ ${CPP_DIR}/neuromlLocal/c302ForW2D.cpp
249
+ ${CPP_DIR}/neuromlLocal/owSignalSimulatorForWorm2D.cpp
250
+ ${CPP_DIR}/neuromlLocal/owSignalSimulator.cpp
251
+ )
252
+
253
+ # Worm2D/main → worm2d/bin/Worm2D/main
254
+ add_worm_binary(worm2d_w2d_main "Worm2D"
255
+ ${CPP_DIR}/Worm2D/main.cpp
256
+ ${W2D_COMMON_SRCS}
257
+ )
258
+ set_target_properties(worm2d_w2d_main PROPERTIES OUTPUT_NAME main)
259
+
260
+ # Worm2D/main_osc → worm2d/bin/Worm2D/main_osc
261
+ add_worm_binary(worm2d_main_osc "Worm2D"
262
+ ${CPP_DIR}/Worm2D/main_osc.cpp
263
+ ${W2D_COMMON_SRCS}
264
+ )
265
+ set_target_properties(worm2d_main_osc PROPERTIES OUTPUT_NAME main_osc)
266
+
267
+ # ---------------------------------------------------------------------------
268
+ # RoyalSociety2018/main → worm2d/bin/RoyalSociety2018/main
269
+ # ---------------------------------------------------------------------------
270
+ set(RS18_DIR ${CPP_DIR}/RoyalSociety2018)
271
+ add_worm_binary(worm2d_rs18 "RoyalSociety2018"
272
+ ${RS18_DIR}/main.cpp
273
+ ${RS18_DIR}/Worm.cpp
274
+ ${RS18_DIR}/WormBody.cpp
275
+ ${RS18_DIR}/NervousSystem.cpp
276
+ ${RS18_DIR}/StretchReceptor.cpp
277
+ ${RS18_DIR}/Muscles.cpp
278
+ ${RS18_DIR}/TSearch.cpp
279
+ ${RS18_DIR}/random.cpp
280
+ ${RS18_DIR}/jsonUtils.cpp
281
+ ${CPP_DIR}/argUtils.cpp
282
+ )
283
+ target_include_directories(worm2d_rs18 BEFORE PRIVATE ${RS18_DIR})
284
+ set_target_properties(worm2d_rs18 PROPERTIES OUTPUT_NAME main)
285
+
286
+ # ---------------------------------------------------------------------------
287
+ # network2021/main → worm2d/bin/network2021/main
288
+ # ---------------------------------------------------------------------------
289
+ set(NET21_DIR ${CPP_DIR}/network2021)
290
+ add_worm_binary(worm2d_net21 "network2021"
291
+ ${NET21_DIR}/main.cpp
292
+ ${NET21_DIR}/Worm.cpp
293
+ ${NET21_DIR}/WormBody.cpp
294
+ ${NET21_DIR}/NervousSystem.cpp
295
+ ${NET21_DIR}/Segment.cpp
296
+ ${NET21_DIR}/Muscles.cpp
297
+ ${NET21_DIR}/TSearch.cpp
298
+ ${NET21_DIR}/random.cpp
299
+ ${CPP_DIR}/argUtils.cpp
300
+ )
301
+ target_include_directories(worm2d_net21 BEFORE PRIVATE ${NET21_DIR})
302
+ set_target_properties(worm2d_net21 PROPERTIES OUTPUT_NAME main)
303
+
304
+ # ---------------------------------------------------------------------------
305
+ # CE_orientation/main → worm2d/bin/CE_orientation/main
306
+ # ---------------------------------------------------------------------------
307
+ set(CEO_DIR ${CPP_DIR}/CE_orientation)
308
+ add_worm_binary(worm2d_ceo "CE_orientation"
309
+ ${CEO_DIR}/main.cpp
310
+ ${CEO_DIR}/CTRNN.cpp
311
+ ${CEO_DIR}/WormAgent.cpp
312
+ ${CEO_DIR}/TSearch.cpp
313
+ ${CEO_DIR}/random.cpp
314
+ ${CPP_DIR}/argUtils.cpp
315
+ )
316
+ target_include_directories(worm2d_ceo BEFORE PRIVATE ${CEO_DIR})
317
+ set_target_properties(worm2d_ceo PROPERTIES OUTPUT_NAME main)
worm2d-0.2.8/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 OpenWorm
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
worm2d-0.2.8/PKG-INFO ADDED
@@ -0,0 +1,22 @@
1
+ Metadata-Version: 2.2
2
+ Name: worm2d
3
+ Version: 0.2.8
4
+ Summary: Neuromechanical model of C. elegans locomotion
5
+ Requires-Python: >=3.10
6
+ Requires-Dist: numpy
7
+ Requires-Dist: matplotlib
8
+ Requires-Dist: scipy
9
+ Provides-Extra: neuroml
10
+ Requires-Dist: pyNeuroML; extra == "neuroml"
11
+ Requires-Dist: NEURON<9.0; extra == "neuroml"
12
+ Provides-Extra: dev
13
+ Requires-Dist: ruff; extra == "dev"
14
+ Requires-Dist: pytest; extra == "dev"
15
+ Requires-Dist: ipywidgets; extra == "dev"
16
+ Requires-Dist: OSBModelValidation; extra == "dev"
17
+ Requires-Dist: pyNeuroML; extra == "dev"
18
+ Requires-Dist: modelspec; extra == "dev"
19
+ Provides-Extra: all
20
+ Requires-Dist: worm2d[neuroml]; extra == "all"
21
+ Requires-Dist: worm2d[dev]; extra == "all"
22
+
worm2d-0.2.8/README.md ADDED
@@ -0,0 +1,4 @@
1
+ # Worm2D
2
+ Simulator of 2D worm body models
3
+
4
+ Work in progress. Latest verison of this code can be found here: https://github.com/openworm/CE_locomotion/tree/test_stable