SkillAgentSearch skills...

Hspmc

Monte Carlo simulation of hard sphere packing using MATLAB

Install / Use

/learn @williamgilpin/Hspmc
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

This set of MATLAB routines simulates a three-dimensional hard sphere packing with periodic boundary conditions. It initializes a uniform lattice, and then uses the Metropolis algorithm to anneal the particle locations for many iterations. It then calculates $g_2(r)$, or the pairwise radial distribution function, averaged over many centers in the set. For large initial particle densities, the resulting $g_2$ matches the analytic approximation given by the Percus-Yevick approximation to arbitrary precision given a high enough particle density.

Related Skills

View on GitHub
GitHub Stars8
CategoryDevelopment
Updated11mo ago
Forks4

Languages

Matlab

Security Score

82/100

Audited on May 5, 2025

No findings