https://github.com/openworm/OpenWorm Skip to content Toggle navigation Sign up * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions For + Enterprise + Teams + Startups + Education By Solution + CI/CD & Automation + DevOps + DevSecOps Case Studies + Customer Stories + Resources * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. {{ message }} openworm / OpenWorm Public * Notifications * Fork 175 * Star 2.1k Repository for the main Dockerfile with the Openworm software stack and project-wide issues openworm.org License MIT license 2.1k stars 175 forks Star Notifications * Code * Issues 42 * Pull requests 1 * Discussions * Actions * Security * Insights More * Code * Issues * Pull requests * Discussions * Actions * Security * Insights openworm/OpenWorm This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. master Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags Name already in use A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch? Cancel Create 24 branches 5 tags Code * Local * Codespaces * Clone HTTPS GitHub CLI [https://github.com/o] Use Git or checkout with SVN using the web URL. [gh repo clone openwo] Work fast with our official CLI. Learn more about the CLI. * Open with GitHub Desktop * Download ZIP Sign In Required Please sign in to use Codespaces. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching Xcode If nothing happens, download Xcode and try again. Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @pgleeson pgleeson Merge pull request #328 from openworm/dev_0.9.3 ... 499344a Sep 1, 2022 Merge pull request #328 from openworm/dev_0.9.3 Updated sibernetic branch 499344a Git stats * 265 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .github Info on all output September 1, 2022 10:42 img Added link to our public badge page. May 23, 2018 23:01 output Add readme in output January 19, 2018 16:22 .dockerignore Add .dockerignore to exclude files from the context March 27, 2018 16:48 .gitignore Improved handling of versions July 27, 2022 17:03 .openworm.yml Update most files January 6, 2022 16:58 Dockerfile Use latest ow-0.9.3 on sibernetic September 1, 2022 17:24 Dockerfile2 Moving Dockerfile3 to main Dockerfile, so making python3 default February 16, 2021 17:38 LICENSE To 0.9.3 June 16, 2022 14:03 README.md Emphasise short run August 15, 2022 12:20 VERSION Basic changes for 0.9.3 July 28, 2022 17:19 build.cmd Basic changes for 0.9.3 July 28, 2022 17:19 build.sh Improved handling of versions July 27, 2022 17:03 build2.sh Improved handling of versions July 27, 2022 17:03 master_openworm.py Improved movie generation August 15, 2022 14:31 rebuild.sh Improved handling of versions July 27, 2022 17:03 run-quick.sh Improved movie generation August 15, 2022 14:31 run-shell-only.cmd Basic changes for 0.9.3 July 28, 2022 17:19 run-shell-only.sh Improved handling of versions July 27, 2022 17:03 run.cmd Basic changes for 0.9.3 July 28, 2022 17:19 run.sh Improved handling of versions July 27, 2022 17:03 run2-shell-only.sh Improved handling of versions July 27, 2022 17:03 run2.sh Improved handling of versions July 27, 2022 17:03 silent-intel-sdk.cfg Remove .DS_Store (already in .gitignore) January 8, 2020 19:32 stop.cmd Added Windows batch files in additional to shell scripts to support W... February 7, 2019 08:18 stop.sh Improved handling of versions July 27, 2022 17:03 View code [ ] About OpenWorm Quickstart FAQ What is the Docker container? Is it possible to modify the simulation without having to run build.sh? How do I access more data than what is already output? What is the difference between exit and stop.sh? How do I enter a container I just exited? Documentation README.md OpenWorm Docker Image CI About OpenWorm OpenWorm aims to build the first comprehensive computational model of Caenorhabditis elegans (C. elegans), a microscopic roundworm. With only a thousand cells, it solves basic problems such as feeding, mate-finding and predator avoidance. Despite being extremely well-studied in biology, a deep, principled understanding of the biology of this organism remains elusive. We are using a bottom-up approach, aimed at observing the worm behaviour emerge from a simulation of data derived from scientific experiments carried out over the past decade. To do so, we are incorporating the data available from the scientific community into software models. We are also forging new collaborations with universities and research institutes to collect data that fill in the gaps. You can earn a badge with us simply by trying out this package! Click on the image below to get started. OpenWorm Docker Badge Quickstart We have put together a Docker container that pulls together the major components of our simulation and runs it on your machine. When you get it all running it does the following: 1. Run our nervous system model, known as c302, on your computer. 2. In parallel, run our 3D worm body model, known as Sibernetic, on your computer, using the output of the nervous system model. 3. Produce graphs from the nervous system and body model that demonstrate its behavior on your computer for you to inspect. 4. Produce a movie showing the output of the body model. Example Output Worm Crawling [muscle-activity][neuron-activity] NOTE: Running the simulation for the full amount of time would produce content like the above. However, in order to run in a reasonable amount of time, the default run time for the simulation is limited. As such, you will see only a partial output, equivalent to about 5% of run time, compared to the examples above. To extend the run time, use the -d argument as described below. Installation Pre-requisites: 1. You should have at least 60 GB of free space on your machine and at least 2GB of RAM 2. You should be able to clone git repositories on your machine. Install git, or this GUI may be useful. To Install: 1. Install Docker on your system. 2. If your system does not have enough free space, you can use an external hard disk. On MacOS X, the location for image storage can be specified in the Advanced Tab in Preferences. See this thread in addition for Linux instructions. Running 1. Ensure the Docker daemon is running in the background (on MacOS/ Windows there should be an icon with the Docker whale logo showing in the menu bar/system tray). 2. Open a terminal and run: git clone http://github.com/openworm/ openworm; cd openworm 3. Optional: Run ./build.sh (or build.cmd on Windows). If you skip this step, it will download the latest released Docker image from the OpenWorm Docker hub. 4. Run ./run.sh (or run.cmd on Windows). 5. About 5-10 minutes of output will display on the screen as the steps run. 6. The simulation will end. Run stop.sh (stop.cmd on Windows) on your system to clean up the running container. 7. Inspect the output in the output directory on your local machine. Advanced Arguments * -d [num] : Use to modify the duration of the simulation in milliseconds. Default is 15. Use 5000 to run for time to make the full movie above (i.e. 5 seconds). Other things to try * Open a terminal and run ./run-shell-only.sh (or run-shell-only.cmd on Windows). This will let you log into the container before it has run master_openworm.py. From here you can inspect the internals of the various checked out code bases and installed systems and modify things. Afterwards you'll still need to run ./stop.sh to clean up. * If you wish to modify what gets installed, you should modify Dockerfile. If you want to modify what runs, you should modify master_openworm.py. Either way you will need to run build.sh in order to rebuild the image locally. Afterwards you can run normally. FAQ What is the Docker container? The Docker container is a self-contained environment in which you can run OpenWorm simulations. It's fully set up to get you started by following the steps above. At the moment, it runs simulations and produces visualizations for you, but these visualizations must be viewed outside of the Docker container. While you do not need to know much about Docker to use OpenWorm, if you are planning on working extensively with the platform, you may benefit from understanding some basics. Docker Curriculum is an excellent tutorial for beginners that is straightforward to work through (Sections 1 - 2.5 are plenty sufficient). Is it possible to modify the simulation without having to run build.sh? Yes, but it is marginally more complex. The easiest way is to modify anything in the Docker container once you are inside of it - it will work just like a bash shell. If you want to modify any code in the container, you'll need to use an editor that runs in the terminal, like nano. Once you've modified something in the container, you don't need to re-build. However, if you run stop.sh once you exit, those changes will be gone. How do I access more data than what is already output? The simulation by default outputs only a few figures and movies to your home system (that is, outside of the Docker container). If you want to access the entire output of the simulation, you will need to copy it from the Docker container. For example, say you want to extract the worm motion data. This is contained in the file worm_motion_log.txt, which is found in the / home/ow/sibernetic/simulations/[SPECIFIC_TIMESTAMPED_DIRECTORY]/ worm_motion_log.txt. The directory [SPECIFIC_TIMESTAMPED_DIRECTORY] will have a name like C2_FW_2018_02-12_18-36-32, and its name can be found by checking the output directory. This is actually the main output directory for the simulation, and contains all output, including cell modelling and worm movement. Once the simulation ends and you exit the container with exit, but before you run stop.sh, run the following command from the openworm-docker-master folder: docker cp openworm:/home/ow/sibernetic/simulations/ [SPECIFIC_TIMESTAMPED_DIRECTORY]/worm_motion_log.txt ./ worm_motion_log.txt This will copy the file from the Docker container, whose default name is openworm. It is crucial that you do not run stop.sh before trying to get your data out (see below) What is the difference between exit and stop.sh? When you are in the Docker Container openworm, and are done interacting with it, you type exit to return to your system's shell. This stops execution of anything in the container, and that container's status is now Exited. If you try to re-start the process using run-shell-only.sh, you will get an error saying that the container already exists. You can choose, at this point, to run stop.sh. Doing so will remove the container and any files associated with it, allowing you to run a new simulation. However, if you don't want to remove that container, you will instead want to re-enter it. How do I enter a container I just exited? If you run stop.sh you'll delete your data and reset the container for a new run. If, however, you don't want to do that, you can re-enter the Docker container like this: docker start openworm # Restarts the container docker exec -it openworm /bin/bash # Runs bash inside the container This tells Docker to start the container, to execute commands (exec) with an interactive, tty (-it) bash (bash) shell in the container openworm. You'll be able to interact with the container as before. Documentation to find out more about OpenWorm, please see the documentation at http://docs.openworm.org or join us on Slack. This repository also contains project-wide tracking via high-level issues and milestones. About Repository for the main Dockerfile with the Openworm software stack and project-wide issues openworm.org Topics simulation biology openworm elegans Resources Readme License MIT license Stars 2.1k stars Watchers 163 watching Forks 175 forks Report repository Releases 5 0.9.2 Latest Aug 15, 2022 + 4 releases Packages 0 No packages published Contributors 18 * @pgleeson * @slarson * @msasinski * @tarelli * @gidili * @mwatts15 * @vellamike * @AntoineValera * @lungd * @cheelee * @mewmew + 7 contributors Languages * Python 53.0% * Dockerfile 22.3% * Shell 20.9% * Batchfile 3.8% Footer (c) 2023 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time.