Software Engine

3D Molecule Simulator - PlanckSim

A real-time 3D simulation written in modern C++ and OpenGL. Interact with chemical structures, visualize VSEPR geometry, and simulate atomic forces.

Full Feature Set

  • Interactive Molecule Builder: Spawn atoms by symbol or chemical formula. Auto-generates resonance-optimized structures via custom algorithms.
  • Force-Based Simulation: Bonds modeled as springs applying real-time forces. Atoms move under Verlet-like integration with collision.
  • VSEPR Geometry: Dynamically computes lone-pair positions and ideal bond angles using energy-minimization.
  • Charge Analysis: Calculates formal charges per atom and computes net dipole moment vectors in 3D.
  • Lone Pair Visualization: Generates virtual dots for lone pairs using tetrahedral or planar heuristics.
  • Multiple Bond Orders: Renders single, double, and triple bonds with distinct cylinder geometry (sigma/pi counting).
  • Stability Indicator: Monitors VSEPR correction magnitude to show a percentage stability gauge.
  • Extended Periodic Table: Built-in lookup for atomic mass, electronegativity, and valence for 118 elements.
  • Custom Particle Engine: Lightweight engine without external physics libraries. Supports "Flight Mode".
  • Flying Camera: Free-roaming 360° camera with optional auto-follow of molecule center.
  • Real-Time Interactions: Drag atoms, break/form bonds, and delete structures on-the-fly.
  • Prebuilt Templates: One-click generation of common molecules (H₂O, CO₂, NH₃, etc.).
  • Dynamic Lighting: Phong-style shaders for atoms/bonds with optional raytracing module.
  • ImGui Interface: Tabbed menus for controls and properties.

Tech Stack

C++20 OpenGL 3.3+ CMake
  • GLFW: Windowing and input handling
  • GLAD: OpenGL function loader
  • GLM: Mathematics (vectors/matrices)

Acknowledgements to LearnOpenGL and TheCherno for their excellent C++ graphics tutorials.

Getting Started

Clone the repository to build locally.

git clone https://github.com/chromemilk/3D-Particle-Simulator.git
cd 3D-Particle-Simulator