Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
tamchow committed Jul 11, 2017
0 parents commit b1084a9
Show file tree
Hide file tree
Showing 22 changed files with 2,320 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .idea/libraries/SBT__org_scala_lang_scala_library_2_12_2_jar.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

98 changes: 98 additions & 0 deletions .idea/modules/chemotaxissimulator-build.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions .idea/modules/chemotaxissimulator.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions .idea/sbt.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/scala_compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2017 Tamoghna Chowdhury

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
43 changes: 43 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#Scala/JavaFX Chemotaxis simulator

##Features

Simulates _E. coli_'s movement in a food concentration gradient.

Uses the run-and-tumble model with a hunger concept.

Bacteria can die from excess hunger. Amount of food is indicated by size (and possibly color),
and poison content in a food source by the color gradient (the darker in color the food circle, the more toxic it is).

Bacteria can also hybridize and reproduce by binary fission.

This can be used to visualize a simplified version of chemotactic optimization.

##Controls

_Implemented_:

1. <kbd> Return</kbd>/<kbd> Enter</kbd> or <kbd>Space</kbd> to play / pause simulation.
2. <kbd> =</kbd> (<kbd>+</kbd>) to speed up simulation
3. <kbd> -</kbd> to slow down simulation`
4. <kbd> Esc</kbd> to exit
5. <kbd> F11</kbd> to toggle into / out of fullscreen
6. <kbd> s</kbd> to save snapshot
7. <kbd> F5</kbd> to start new simulation
8. <kbd>Backspace</kbd> to rewind

_Unimplemented:_
9. <kbd>F2</kbd> to save session state
10. <kbd>F3</kbd> to restore session state

##Requirements

1. Scala 2.12.1 (2.11+ should work)
2. Java 8 Update 121 + JavaFX (Oracle JDK on Linux) (Java 8 Update 40+ should work)
3. A powerful PC ;)

##Enhancements

1. Implement support for sessions (save and restore simulations) (Priority 1)
2. Implement configuration via files (priority 2-3)
2. Implement configuration via GUI (priority 10?)
14 changes: 14 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name := "ChemotaxisSimulator"

version := "0.7"
organization := "in.github.tamchow"
scalaVersion := "2.12.2"

scalacOptions += "-feature"

jfxSettings

JFX.mainClass := Some("chemotaxis.ui.Main")

mainClass in assembly := Some("chemotaxis.ui.Main")
assemblyJarName in assembly := "chemotaxis.jar"
1 change: 1 addition & 0 deletions project/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version = 0.13.15
2 changes: 2 additions & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
addSbtPlugin("no.vedaadata" %% "sbt-javafx" % "0.7")
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.5")
Loading

0 comments on commit b1084a9

Please sign in to comment.