openworm / sibernetic

This is a C++/OpenCL implementation of the PCISPH algorithm supplemented with a set of biomechanics related features applied to C. elegans locomotion
Other
358 stars 106 forks source link

Difficulty running with both -nrn and -f worm #113

Closed slarson closed 7 years ago

slarson commented 7 years ago
/Release/Sibernetic -f worm -nrn /home/[..]/sibernetic_NEURON/avm.hoc

Not currently working (doesn’t run NEURON in the background)

/Release/Sibernetic -nrn /home/[..]/sibernetic_NEURON/avm.hoc

Without -f worm, it launches neuron in the background but only runs the falling cube example

cc: @pgleeson

pgleeson commented 7 years ago

This might just consist of updating the section in the README for more complete instructions for getting it running. A start on this is here:

Now it's possible to run the physical and neuronal simulations together. For this you need sibernetic_NEURON also. Don't forget to add the path to sibernetic_NEURON into your PYTHONPATH. You just need to run Sibernetic with command argument '-nrn ' where value is the path to NEURON simulation file (*.hoc e.g.). After that Sibernetic will init sibernetic_NEURON with the appropriate simulation file and same timeStep also. You should indicate from what segments of NEURON's model you'd like to read data (currently Voltage). After each step of the Sibernetic simulation it will run one step of the NEURON simulation and read data from it and update the signal array in Sibernetic. For now, it actually works in test mode list of segments is hardcoded so if you'd like to work with another list of segments you need rewrite this part of code and recompile Sibernetic.

If you have Sibernetic correctly installed, the following should be sufficient to get this running:

git clone https://github.com/openworm/sibernetic_NEURON.git
export PYTHONPATH=./sibernetic_NEURON:./src
./Release/Sibernetic -nrn ./sibernetic_NEURON/models/celegans/_ria.hoc  -f worm
skhayrulin commented 7 years ago

@slarson @pgleeson I've finally found problem of incorrect work - main reason was that if we run worm configuration then it run old sinusoidal pattern generator so I've fixed it now and if you've indicated that you're trying to run worm config with -nrn key it will start neuron simulation and sibernetic simultaneously. Next step is to eliminate hardcoded muscle section from simulation and make it universal maybe read it from configuration file what do you think?

pgleeson commented 7 years ago

Great @skhayrulin! Have managed to get the worm model & Neuron running locally.

I'd recommend having the default behaviour still be that the worm runs with the Python based sine wave generator if no other options are given. This way users can see interesting behaviour with just Sibernetic installed before they need to use Neuron, c302, etc.