HappyMolecules.Bin — TypeThe type for binning statistics.
HappyMolecules.LennardJones — Type\[f(r) = \frac{48 \vec{r}}{r^2}(\frac{1}{r^{12}} - 0.5 \frac{1}{r^6})\]
HappyMolecules.heat_capacity — MethodCompute the constant volume capacity is using the following equation
\[\langle K^2 \rangle - \langle K \rangle^2 = \frac{3 k_b^2 T^2}{2N}(1-\frac{3k_B}{2C_v})\]
heat_capacity(md)defined at /home/runner/work/HappyMolecules.jl/HappyMolecules.jl/src/Core.jl:119.
HappyMolecules.measure_gr — MethodMeasure the radial distribtion over a molecular dynamics runtime instance.
Arguments
mdis the molecular dynamics runtime instance.
Keyword argument
nbinsis the number of bins,min_distanceandmax_distanceare the minimum and maximum distance of the bins.
measure_gr(md; nbins, min_distance, max_distance)defined at /home/runner/work/HappyMolecules.jl/HappyMolecules.jl/src/Core.jl:245.
HappyMolecules.pressure — MethodThe most common among the ways to measure the pressure $P$ is based on the virial equation for the pressure.
\[P = \rho k_B T + \frac{1}{dV}\langle\sum_{i<j} f(r_{ij}) \cdot r_{ij}\rangle\]
pressure(md)defined at /home/runner/work/HappyMolecules.jl/HappyMolecules.jl/src/Core.jl:140.
HappyMolecules.random_locations — Methodrandom_locations(box::Box, natoms::Int) -> SVectorReturns a set of random locations in a box
random_locations(box, natoms)defined at /home/runner/work/HappyMolecules.jl/HappyMolecules.jl/src/Core.jl:22.
HappyMolecules.temperature — MethodThe temperature $T$ is measured by computing the average kinetic energy per degree of freedom.
\[k_B T = \frac{\langle 2 \mathcal{K} \rangle}{f}.\]
temperature(md)defined at /home/runner/work/HappyMolecules.jl/HappyMolecules.jl/src/Core.jl:103.
HappyMolecules.ticks — Methodticks(bin)
Return the ticks (center of boxes) of bins.
ticks(bin)defined at /home/runner/work/HappyMolecules.jl/HappyMolecules.jl/src/Core.jl:211.
HappyMolecules.uniform_locations — Methoduniform_locations(box, natoms)
uniform_locations(box::Box, natoms::Int) -> SVectorReturns a set of uniform locations in a box
uniform_locations(box, natoms)defined at /home/runner/work/HappyMolecules.jl/HappyMolecules.jl/src/Core.jl:39.
HappyMolecules.Applications.lennard_jones_triple_point — Methodlennard_jones_triple_point(
;
natoms,
temperature,
density,
Nt,
Δt,
seed,
gr_lastn
)
Case study in Chapter 4 of the book "Understanding Molecular Simulation, From Algorithms to Applications". It is about the molecule dynamics simulation of a Lennard-Jones Fluid in a 3D periodic box. The parameters are set close to the triple point.
Keyword arguments
natomsis the number of atoms.temperatureis the initial temperature.densityis the density of atoms.Ntis the number of tims steps.Δtis the time step.seedis the random seed.gr_lastnis the number of last n samples for collecting radial distribution.
lennard_jones_triple_point(
;
natoms,
temperature,
density,
Nt,
Δt,
seed,
gr_lastn
)defined at /home/runner/work/HappyMolecules.jl/HappyMolecules.jl/src/applications.jl:31.