Skip to content

kaz2700/computational-physics

Repository files navigation

Computational Physics

A collection of computational physics simulations and implementations.

Contents

  • hartree_fock/ - Hartree-Fock quantum chemistry calculations
  • polymer_simulation/ - Polymer chain simulations
  • velocity_analysis/ - Velocity field analysis tools
  • wave_equation/ - Wave equation solvers

Setup

This project uses Nix for reproducible environments with GNU Fortran for compilation and Gnuplot for visualization.

Prerequisites

Install Nix (if not already installed):

curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install

Environment Setup

Option 1: Using nix shell

# Enter the development environment
nix develop

# Compile Fortran programs
gfortran -o program program.f90

# Generate plots with gnuplot
gnuplot plot.gp

Option 2: Using direnv (recommended)

# Install direnv if needed
sudo apt install direnv  # Ubuntu/Debian
# or: brew install direnv  # macOS

# Allow the project's .envrc
direnv allow

# The environment will be loaded automatically when entering the directory

Available Packages

The development environment includes:

  • gfortran - GNU Fortran compiler for Fortran 90+ programs
  • gnuplot - Scientific plotting and visualization
  • lapack - Linear Algebra Package for numerical computations

Usage

  1. Navigate to any module directory (e.g., hartree_fock/, polymer_simulation/)
  2. Compile the Fortran source files using gfortran
  3. Run the generated executables
  4. Use gnuplot with the provided .gp files to generate visualizations

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors