This PR proposes letting the user specify a Boltzmann's constant when defining a System, allowing for reduced unit systems.
The changes are the following
src/types.jl:
Add a k field and K type parameter to the System struct
Add logic for default behavior
src/spatial.jl:
Let AtomsBase.velocity, velocity3D, velocity2D and maxwell_boltzmann take an additional parameter k
modify random_velocities to use the system's boltzmann constant
src/coupling.jl:
Fix velocity resampling to rely on the system's k
src/temperature.jl:
Modify temperature to convert kinetic energy to temperature using on the system's k
test/basic.jl
Modify basic tests of velocity generation
This PR proposes letting the user specify a Boltzmann's constant when defining a System, allowing for reduced unit systems. The changes are the following
src/types.jl: Add a
k
field andK
type parameter to theSystem
struct Add logic for default behaviorsrc/spatial.jl: Let
AtomsBase.velocity
,velocity3D
,velocity2D
andmaxwell_boltzmann
take an additional parameterk
modifyrandom_velocities
to use the system's boltzmann constantsrc/coupling.jl: Fix velocity resampling to rely on the system's
k
src/temperature.jl: Modify
temperature
to convert kinetic energy to temperature using on the system'sk
test/basic.jl Modify basic tests of velocity generation