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
md
is the molecular dynamics runtime instance.
Keyword argument
nbins
is the number of bins,min_distance
andmax_distance
are 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) -> SVector
Returns 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) -> SVector
Returns 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
natoms
is the number of atoms.temperature
is the initial temperature.density
is the density of atoms.Nt
is the number of tims steps.Δt
is the time step.seed
is the random seed.gr_lastn
is 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
.