Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge development into master to do a release #142

Open
wants to merge 147 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
147 commits
Select commit Hold shift + click to select a range
422aa27
Update .openworm.yml
slarson Dec 19, 2016
3dd63a2
Update .openworm.yml
slarson Dec 19, 2016
728849e
Little reorganization of code in owOpenCLSolver and OwPysicFluidSimul…
Dec 22, 2016
194c34e
Merge pull request #13 from openworm/development
pgleeson Jan 13, 2017
522bd34
Add files via upload
a-palyanov Mar 2, 2017
c93d921
Merge pull request #14 from openworm/development
pgleeson Apr 10, 2017
4ace1e1
Adding options to specify device and configuration in sibernetic_c302.py
pgleeson Apr 10, 2017
ee991a7
Update README.md
bryanchriswhite Apr 24, 2017
6978a9c
Merge pull request #120 from bryanchriswhite/patch-1
skhayrulin Apr 24, 2017
d0a2c05
Add check in destructor that simualion instance was created.
skhayrulin May 8, 2017
150d7c8
Merge branch 'development' of github.com:openworm/sibernetic into dev…
skhayrulin May 8, 2017
cb0394a
Reformat some file.
skhayrulin May 10, 2017
86ba3c6
Merge last updates from server
skhayrulin May 10, 2017
736e893
Big significant update (see details).
a-palyanov Oct 11, 2017
9527325
Merge pull request #16 from openworm/development
pgleeson Oct 16, 2017
20af508
main_sim.py: Add missing C302NRNSimulation with fixed muscle list.
lungd Oct 17, 2017
9320b28
Tests on wcon
pgleeson Oct 17, 2017
50c150a
Initial ideas for heatmap
pgleeson Oct 18, 2017
abb45d8
Prints the total number of steps and the current simulation time to c…
pgleeson Oct 19, 2017
5e47a18
Updated main_sim.py to latest version
pgleeson Oct 19, 2017
e7e1748
Adding a "smooth start" to the Muscle signal
pgleeson Oct 19, 2017
5b831a0
Update README.md
dhd5076 Oct 21, 2017
1615722
Update README.md
dhd5076 Oct 21, 2017
b5caad4
Merge pull request #132 from dhd5076/development
skhayrulin Oct 22, 2017
24d8fed
Small update fixing a few issues
a-palyanov Oct 23, 2017
1252a5a
Merge branch 'development' of https://github.com/openworm/sibernetic …
a-palyanov Oct 23, 2017
6e0d1a5
small changes, swimming & crawling parameters tuning
a-palyanov Oct 31, 2017
c7e74f7
Merge branch 'development' of https://github.com/openworm/sibernetic …
pgleeson Nov 3, 2017
4330b5c
Merge branch 'openworm-development22' into development
pgleeson Nov 3, 2017
0a27cbc
Allowing option to run sims with no c302, i.e. use internal python si…
pgleeson Nov 3, 2017
5f1d710
Update
Nov 16, 2017
27dd147
Update sibernetic_c302.py
lungd Nov 16, 2017
2f8519c
Update
lungd Nov 17, 2017
edaa93c
Update
lungd Nov 17, 2017
c9348d6
Bugfix
lungd Nov 18, 2017
618c4b8
Update - datareader
lungd Nov 18, 2017
f204ef9
Update
lungd Nov 20, 2017
6428455
Update README.md
slarson Nov 28, 2017
2d0e456
Sibernetic configured for 1.1 mm worm body
a-palyanov Dec 19, 2017
faf5a99
Merge branch 'development' of https://github.com/openworm/sibernetic …
a-palyanov Dec 19, 2017
3ef5d32
Merge remote-tracking branch 'upstream/development' into development
lungd Jan 4, 2018
0812a3f
Adding library locations on makefile
pgleeson Jan 15, 2018
eea0d74
Some updates from lungd
pgleeson Jan 15, 2018
2da88f4
More tests
pgleeson Jan 15, 2018
f416ad9
Update README.md
lungd Jan 16, 2018
439ff20
Add list of tests
pgleeson Jan 16, 2018
9d22101
Merge branch 'ow-0.1' of https://github.com/lungd/sibernetic into lun…
pgleeson Jan 16, 2018
330d41b
Basic muscle plot
pgleeson Jan 16, 2018
0669ca7
Merge branch 'lungd-ow-0.1' into development
pgleeson Jan 16, 2018
01235e0
Merge branch 'development' of https://github.com/openworm/sibernetic …
pgleeson Jan 16, 2018
4c2196e
Merge branch 'openworm-development3' into development
pgleeson Jan 16, 2018
01af6a7
Don't show muscle fig
pgleeson Jan 16, 2018
786a8b1
Replace files in /src, /inc and / with these 3 files
a-palyanov Jan 17, 2018
80676dd
Fixed bug in saving to worm_motion_log.txt; correct timestep used
pgleeson Jan 17, 2018
94be68a
Improve plotting
pgleeson Jan 17, 2018
4e84415
Improved plot of muscle activs
pgleeson Jan 18, 2018
777f95b
Corrected order of muscle quadrants
pgleeson Jan 18, 2018
ad98e7f
Minor update
pgleeson Jan 19, 2018
5689e12
Ideas
pgleeson Jan 19, 2018
1b3a4ce
Cosmetic update
pgleeson Jan 23, 2018
be98e85
Improved plotting of Ca activity
pgleeson Jan 23, 2018
0925184
Small updates im makefile. Update README.md
skhayrulin Jan 25, 2018
8c3ebec
Merge branch 'development' of https://github.com/openworm/sibernetic …
pgleeson Jan 25, 2018
dab22ca
Merge branch 'openworm-development4' into development
pgleeson Jan 25, 2018
acc9510
Merge pull request #133 from pgleeson/development
a-palyanov Jan 25, 2018
c2a6933
Add configuration demo1_test for future experiments.
skhayrulin Jan 26, 2018
2e9789c
Little code review and adding settings files for vs code IDE. Also Ad…
skhayrulin Jan 26, 2018
0b99d77
little fix of vscode settings file
skhayrulin Jan 26, 2018
ffc4107
Update README.md
skhayrulin Jan 30, 2018
109d15e
Typos
pgleeson Feb 2, 2018
3eb9914
Merge pull request #140 from openworm/skhayrulin-patch-1
skhayrulin Feb 5, 2018
519ef98
Add function for reading pressure from device.
skhayrulin Feb 19, 2018
ca30892
Merge remote-tracking branch 'refs/remotes/origin/development' into d…
skhayrulin Feb 19, 2018
32d76e5
Add function for gen list of shell particles.
skhayrulin Feb 20, 2018
e5afee1
Work with .vscode files
skhayrulin Feb 20, 2018
5942e69
Merge with dev branch
skhayrulin Feb 20, 2018
a52006e
Transfer all const into map object in configProp class.
skhayrulin Feb 28, 2018
c9d5275
Merge branch 'moving_const' of github.com:openworm/sibernetic into mo…
skhayrulin Feb 28, 2018
688a717
Add const parser in Helper.
skhayrulin Mar 1, 2018
1b63814
fix several bugs with not right reading const. Still have roblem with…
skhayrulin Mar 1, 2018
2266df1
Update to wcon generation
pgleeson Mar 16, 2018
ea6300a
Merge pull request #21 from openworm/development
pgleeson Apr 17, 2018
d74dfaf
Add abbilty to save pressure for shell particle into file. If you run…
skhayrulin May 5, 2018
133f8f5
Update README.md
skhayrulin May 8, 2018
4c29d5f
Update README.md
skhayrulin May 8, 2018
ab55b4c
Merge pull request #23 from openworm/development
pgleeson Jun 19, 2018
2624eae
Works with new c302...
pgleeson Jul 6, 2018
397163f
Adds c302 version to report
pgleeson Jul 10, 2018
a5100ea
double size environments for swimming and crawling
a-palyanov Sep 4, 2018
8405350
Update sphFluid.cl
a-palyanov Sep 4, 2018
00d8ce0
Typos on paragraph #43
kant Sep 8, 2018
bedb526
2 new environments, one for swimming, one for crawling
a-palyanov Oct 24, 2018
2f2bf84
Environments with new geometries (for swimming and crawling)
a-palyanov Oct 24, 2018
19fd4b3
Ignoring...
pgleeson Nov 23, 2018
ebced47
Merge branch 'new_c302_repo' into test_dev
pgleeson Nov 23, 2018
7d9abd4
Fix 145 ?
lungd Nov 25, 2018
76da5db
Merge pull request #150 from kant/patch-1
skhayrulin Nov 26, 2018
4a44a6d
Merge pull request #151 from openworm/145-performance-change
skhayrulin Nov 26, 2018
c8adc67
Merge pull request #24 from openworm/development
pgleeson Nov 30, 2018
a944890
Better info on c302 at -h
pgleeson Jan 7, 2019
d73a5fc
Merge branch 'development' of https://github.com/openworm/sibernetic …
lungd Jan 27, 2019
4d31c57
Fix rerun issue
lungd Jan 27, 2019
d431eba
Add skip_display params
lungd Jan 27, 2019
62d4cac
Fix skip_display_connections
lungd Jan 28, 2019
1937934
Pass dt to C302NRNSimulation instance after initialization
lungd Jan 28, 2019
eaf317b
Add skip_display params
lungd Jan 27, 2019
7a03d3d
Fix skip_display_connections
lungd Jan 28, 2019
8c08581
Pass dt to C302NRNSimulation instance after initialization
lungd Jan 28, 2019
1d8ccdf
Print dt and time left
lungd Jan 28, 2019
99e30fa
Remove 2 old membrane lines. Probably some leftover from a testing phase
lungd Jan 29, 2019
b4e45c1
Merge branch 'worm_crawl_half_resolution_membrane_fix' into development
lungd Jan 29, 2019
e3dc991
Merge branch 'improve_output' into development
lungd Jan 29, 2019
dbc2201
Merge pull request #26 from lungd/development
pgleeson Jan 31, 2019
fc4056b
Update output
lungd Feb 6, 2019
eb0c5cd
Merge pull request #27 from lungd/improve_output
pgleeson Feb 8, 2019
4f9da91
Merge pull request #158 from lungd/worm_crawl_half_resolution_membran…
skhayrulin Feb 8, 2019
41ccd97
Merge pull request #159 from lungd/improve_output
skhayrulin Feb 8, 2019
b33c4d7
Merge pull request #157 from lungd/pass_dt_to_c302nrnsimulation
skhayrulin Feb 8, 2019
fbb189d
Merge pull request #156 from lungd/add_skip_display_params
skhayrulin Feb 8, 2019
2899b4f
Merge pull request #155 from lungd/fix_rerun_issue
skhayrulin Feb 8, 2019
97321cb
Merge pull request #152 from pgleeson/development
skhayrulin Feb 8, 2019
0f60bc3
Delete ide files.
skhayrulin Feb 11, 2019
47cb662
Add to gitignore file path to .idea folder
skhayrulin Feb 11, 2019
ae51fb8
Update README.md
nuragicboy Mar 18, 2019
de0b8a0
Merge pull request #162 from nuragicboy/development
skhayrulin Mar 20, 2019
374c66d
Merge branch 'development' of https://github.com/openworm/sibernetic …
pgleeson May 31, 2019
6481e46
Merge branch 'openworm-development_m19' into test_dev2
pgleeson May 31, 2019
6a5fba9
Minor addition to report
pgleeson May 31, 2019
2de91d8
Save sibernetic version
pgleeson Jun 3, 2019
70965f1
Lots more versions
pgleeson Jun 4, 2019
a073ce9
Better version info in reports
pgleeson Jun 4, 2019
2b40fbd
Add ststus 'Caught CTRL+C'
pgleeson Nov 18, 2019
9d7b48d
Merge
pgleeson Nov 18, 2019
34eb59f
Merge branch 'test_dev2' into test_dev3
pgleeson Nov 18, 2019
6523dd6
More in report
pgleeson Nov 18, 2019
8faeca4
Merge pull request #166 from pgleeson/test_dev3
skhayrulin Feb 21, 2020
14f019e
Update makefile for mac OS.
skhayrulin Jul 27, 2020
2cb6bfc
upgrade to Python 3
thejohnhoffer Aug 8, 2020
08e005a
Python 3 improvements
pgleeson Sep 24, 2020
fe4347a
Changes for Python 3
pgleeson Sep 28, 2020
5286262
Support py2 and py3
pgleeson Sep 28, 2020
25c6305
Merge branch 'development' of https://github.com/thejohnhoffer/sibern…
pgleeson Sep 28, 2020
823d28f
Merge branch 'testpy3' into ow-0.9.1
pgleeson Sep 28, 2020
63a6bc5
Updated version of python script for clarity
pgleeson Sep 28, 2020
d624b38
Using pythonX.Y-config for python linker/compiler flags
mwatts15 Sep 11, 2021
7b19c67
Correcting a typo in the README
mwatts15 Oct 2, 2021
8d2df73
Merge pull request #181 from openworm/issue-179-use-python-config
skhayrulin Oct 8, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
172 changes: 0 additions & 172 deletions .cproject

This file was deleted.

8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,11 @@ simulations
/sibernetic_NEURON/
/CElegansNeuroML/
/sib.env
/configuration/worm_no_water_2017
/test.sh
/test2.sh
/wcon/*.png
/run_fw*.sh
.vscode/*
.settings/*
.idea/*
7 changes: 5 additions & 2 deletions .openworm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,26 @@ shortDescription: "This is a C++/OpenCL implementation of the PCISPH algorithm s
coordinator: [email protected]
documentation: "https://openworm.github.io/sibernetic/"
gitter: "http://gitter.im/openworm/sibernetic"
inputs:
- openworm/CElegansNeuroML
keywords:
- simulation
- physics
- particles
- worm body
languages:
- c++
- python
latest-release:
- 0.0.3
members:
- [email protected]
- [email protected]
inputs:
- openworm/CElegansNeuroML
outputs:
- openworm/CElegansNeuroML
- openworm/skeletonExtraction
parent:
- openworm/OpenWorm
children:
- openworm/sibernetic_NEURON
- openworm/sibernetic_config_gen
89 changes: 0 additions & 89 deletions .project

This file was deleted.

103 changes: 71 additions & 32 deletions bin/win32/Release/main_sim.py → 20 cm long worm/main_sim.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import math
import numpy as np

"""
import matplotlib.pyplot as plt
from pylab import *
"""

muscle_row_count = 24

time_per_step = 0.000005 # s
time_per_step = 0.000001 # s

quadrant0 = 'MDR'
quadrant1 = 'MVR'
Expand Down Expand Up @@ -44,38 +46,70 @@ def parallel_waves(n=muscle_row_count, #26 for our first test?
step=0,
phi=math.pi,
amplitude=1,
velocity=0.0001):
"""
Array of two travelling waves, second one starts
#velocity=0.000008):
velocity_s =0.000015*3.7*1.94/1.76, #swimming
velocity_c =0.000015*0.72): #crawling // 0.9 // 0.65
"""
Array of two travelling waves, second one starts
half way through the array
"""

if n % 2 != 0:
raise NotImplementedError("Currently only supports even number of muscles!")

j = n/2

row_positions = np.linspace(0,1.5*2*math.pi,j)

wave_1 = (map(math.sin,(row_positions - velocity*step)))
wave_2 = (map(math.sin,(row_positions + (math.pi) - velocity*step)))

normalize_sine = lambda x : (x + 1)/2
wave_1 = map(normalize_sine, wave_1)
wave_2 = map(normalize_sine, wave_2)

double_wave_1 = []
double_wave_2 = []

for i in wave_1:
double_wave_1.append(i)
double_wave_1.append(i)

for i in wave_2:
double_wave_2.append(i)
double_wave_2.append(i)

return (double_wave_1,double_wave_2)
"""
j = n/2
max_muscle_force_coeff = 1.0

# "<" = first 6 seconds crawling, then swimming
# ">" = first 6 seconds swimming, then crawling
if (step>1200000):
velocity = 14 * 0.000015*0.72#crawling
max_muscle_force_coeff = 1.0
row_positions = np.linspace(0,2.97*math.pi,j)
wave_m = np.linspace(1,0.6,j)
else:
velocity = 14 * 0.000015*3.7#swimming
max_muscle_force_coeff = 0.575
row_positions = np.linspace(0,0.81*math.pi,j)
#wave_m = [0.8,0.7,0.8,0.93,1.0,1.0,1.0,1.0,0.93,0.8,0.6,0.4]
#wave_m = [0.8,0.7,0.8,0.93,1.0,1.0,1.0,1.0,0.93,0.8,0.65,0.5]
#wave_m = [0.8,0.7,0.8,0.93,1.0,1.0,1.0,0.93,0.8,0.6,0.4,0.2]
#wave_m = [0.81,0.90,0.97,1.00,0.99,0.95,0.88,0.78,0.65,0.50,0.33,0.15]
#wave_m = np.linspace(1,1,j)
wave_m = [0.81,0.90,0.97,1.00,0.99,0.95,0.88,0.78,0.65,0.53,0.40,0.25] #6
#wave_m = [0.81,0.90,0.97,1.00,0.99,0.95,0.90,0.83,0.75,0.65,0.55,0.45] #7

if n % 2 != 0:
raise NotImplementedError("Currently only supports even number of muscles!")

wave_1 = (map(math.sin, (row_positions - velocity*step) ))
wave_2 = (map(math.sin, (row_positions - velocity*step + (math.pi)) ))

normalize_sine = lambda x : abs(x*(x>0))#(x + 1)/2
wave_1 = map(normalize_sine, wave_1)
wave_2 = map(normalize_sine, wave_2)

###### sinusoidal signal correction ##################################
#normalize_sine = lambda x : x*x
#wave_1 = map(normalize_sine, wave_1)
#wave_2 = map(normalize_sine, wave_2)

wave_1 = map(lambda x,y: max_muscle_force_coeff*x*y, wave_1, wave_m)
wave_2 = map(lambda x,y: max_muscle_force_coeff*x*y, wave_2, wave_m)
###### smooth start###################################################
if (step<(10000/14)):
normalize_sine = lambda x : x*step/(10000/14)
wave_1 = map(normalize_sine, wave_1)
wave_2 = map(normalize_sine, wave_2)
######################################################################

double_wave_1 = []
double_wave_2 = []

for i in wave_1:
double_wave_1.append(i)
double_wave_1.append(i)
for i in wave_2:
double_wave_2.append(i)
double_wave_2.append(i)

return (double_wave_1,double_wave_2)

class MuscleSimulation():

Expand All @@ -86,6 +120,11 @@ def __init__(self,increment=1.0):
def run(self,do_plot = True):
self.contraction_array = parallel_waves(step = self.step)
self.step += self.increment
#if (self.step>1000000):
# self.increment = -1.0
#else:
# self.increment = self.increment

return list(np.concatenate([self.contraction_array[0],
self.contraction_array[1],
self.contraction_array[1],
Expand Down
Loading