GCMC Simulation
A C++ and Python-based Monte Carlo simulation framework for interacting particles.
|
Manages the 2D simulation box, including periodic boundary conditions. More...
#include <initial.h>
Public Member Functions | |
SimulationBox (double Lx, double Ly) | |
Constructs a SimulationBox with the given dimensions. | |
void | applyPBC (Particle &p) const |
Applies periodic boundary conditions to a particle. | |
double | minimumImageDistance (const Particle &p1, const Particle &p2) const |
Calculates the minimum image distance between two particles considering PBC. | |
double | minimumImageDistanceSquared (const Particle &p1, const Particle &p2) const |
Calculates the minimum image distance squared between two particles considering PBC. | |
double | getLx () const |
Gets the length of the simulation box in the x-direction. | |
double | getLy () const |
Gets the length of the simulation box in the y-direction. | |
double | getV () const |
Gets the simulation box volume. | |
Manages the 2D simulation box, including periodic boundary conditions.
SimulationBox::SimulationBox | ( | double | Lx, |
double | Ly ) |
Constructs a SimulationBox with the given dimensions.
Lx | Length of the simulation box in the x-direction. |
Ly | Length of the simulation box in the y-direction. |
void SimulationBox::applyPBC | ( | Particle & | p | ) | const |
Applies periodic boundary conditions to a particle.
p | The particle to which PBC will be applied. |
double SimulationBox::getLx | ( | ) | const |
Gets the length of the simulation box in the x-direction.
double SimulationBox::getLy | ( | ) | const |
Gets the length of the simulation box in the y-direction.
double SimulationBox::getV | ( | ) | const |
Gets the simulation box volume.
Calculates the minimum image distance between two particles considering PBC.
p1 | The first particle. |
p2 | The second particle. |
double SimulationBox::minimumImageDistanceSquared | ( | const Particle & | p1, |
const Particle & | p2 ) const |
Calculates the minimum image distance squared between two particles considering PBC.
p1 | The first particle. |
p2 | The second particle. |