Help entries

In the Julia REPL type ? name:

FundamentosDMC.Options — Type

Structure containing the options and parameters of the simulation.

Examples

julia> opt = Options()

julia> opt = Options(nsteps=2000)
source
FundamentosDMC.System — Type

Structure containing the system initial coordinates and box sides.

Example

julia> sys = System(n=100,sides=[100,100])
source
FundamentosDMC.forces! — Method
forces!(x::Vector{T},f::Vector{T},opt::Options) where T

Subroutine that computes the force. It modifies the input f vector.

source
FundamentosDMC.mc — Method
mc(sys::System{T},opt=Options=Options()) where T

Peforms a Monte-Carlos simulation.

source
FundamentosDMC.minimize! — Method
minimize!(sys::System{T},opt::Options)

Minimizes the potential energy of sys.x0. Modifies sys.x0.

Example

julia> sys = System(n=100,sides=[100,100])

julia> minimize!(sys,Options(tol=1e-3))
Energy before minimization: 38322.72337856496
Energy after minimization: -74.15646912098042
source
FundamentosDMC.potential — Method
potential(x::Vector{T},sys::System{T},opt::Options) where T

Function that computes the potential energy given a vector of positions, x.

source
FundamentosDMC.printxyz — Method
printxyz(time,x,sys,traj_file_buffer)

Subroutine that writes the current coordinates (or velocities) to output files, previously opened in respective buffers.

source
FundamentosDMC.printxyz — Method
printxyz(time,x,v,sys,traj_file_buffer,vel_file_buffer)

Subroutine that writes the current coordinates and velocities to output files, previously opened in respective buffers.

source
FundamentosDMC.printxyz — Method
printxyz(x,sys,file::String)

Prints one set of coordinates (or velocities), given in x to file file. Overwrites the file.

source
FundamentosDMC.radial_distribution — Method
radial_distribution(
    sys::System{T},
    trajfile::String;
    dmax::Float64=10.,
    nbins::Int=100
) where T

Computes the g(r). If T=Point3D the system will be read as three-dimensional.

source
FundamentosDMC.simulate_gui — Function
simulate_gui(; n=100, sides=(100.0, 100.0), kind=:md)

Opens a graphical interface to interactively run and visualize, in 2D, the simulations described in the tutorial: microcanonical MD (:md), MD with an isokinetic bath (:md_isokinetic), a Berendsen bath (:md_berendsen), a Langevin bath (:md_langevin), and Monte Carlo (:mc).

The interface shows the motion of the particles together with live plots of the potential, kinetic and total energies, and of the temperature (average kinetic energy per particle), and exposes all the relevant System and Options parameters. Changing any parameter or the simulation type restarts the simulation with the new settings.

This function is implemented as a package extension and requires GLMakie to be loaded:

julia> using FundamentosDMC

julia> import GLMakie

julia> simulate_gui()
source
FundamentosDMC.velocity_distribution — Method
velocity_distribution(
  sys::System{T},
  velfile::String;
  vmax::Float64=2.,
  nbins::Int=100
) where T

Computes the distribution of velocities. If T=Point3D the system will be read as three-dimensional.

source