Skip to content

Molecule simulation written in Python for Blender Game Engine

License

Notifications You must be signed in to change notification settings

PlumpMath/molecule_simulation

 
 

Repository files navigation

Molecule Simulation

This is a molecular simulation I created using Blender Game Engine around 2014. All the gaming logic uses Python.

Features

  • Molecules are built by placing atoms close to eachother.
  • Atoms in molecules interact according to VSEPR theory and the ball and spring model.
  • Small organic molecules have shapes similar to those observed in real life.
  • Automatic naming of simple molecules based on their component elements.
  • Supports double and triple bonds.
  • Building blocks include Hydrogen, Carbon, Oxygen, Nitrogen, Bromine, Hydroxide and Hydron.
  • Visual indicators for lone pair valence electrons.
  • FPS style camera movement and control scheme.

Screenshots

Note: This is a 3D simulation, even though the models appear 2D in these screenshots.

Methane

Methane

Methanol

Methanol

Ethene

Ethene

Cyclohexane

Cyclohexane

Cyclohexane at another angle

Cyclohexane at another angle

Installation

Install blender from https://www.blender.org/

Open molecules.blend

Press P to play

Controls

  • Esc: Exit

  • W,A,S,D: Movement

  • Q,E: Move Down/Up

  • R: Reset

  • Numbers 1-6: Switch between elements (names are shown in game)

  • Left click: Fire specified element

  • Right click: Fire carbon element

  • Space: Fire antimatter (destroys elements)

  • T: Fire laser (moves molecules further away)

About

Molecule simulation written in Python for Blender Game Engine

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%