Skip to content

dkonstan/crawler

Repository files navigation

crawler

a mini MD engine written in Julia for educational purposes

crawler.jl is a small educational MD engine that can energy-minimize and simulate the dynamics of generic polymers using periodic boundary conditions (with Ewald summation for long-range interactions). It supports bond, angle, dihedral, coulomb, and VDW (LJ) forces.

It also supports bond length constraints with the SHAKE algorithm and Langevin dynamics (beta) with or without constraints

crawler.jl takes in and outputs xyz files for both structures and trajectories and requires a topology file (see below) The goal is to learn more about MD and learn Julia.

source files

structs.jl: definitions of complex datatypes such as Topology and Energies

IO.jl: read/write-related stuff

integrators.jl: minimization, velocity Verlet, in the future also velocity Verlet with SHAKE

forces.jl: energies and gradients (forces)

ewald.jl: short- and long-range Coulomb energy and forces

constraints.jl: SHAKE algorithm for bond length constraints

util.jl: utility functions used throughout (periodic boundary conditions, etc.)

Sources

this program uses atomic units everywhere!

  • charge: elementary charges
  • length: bohr radii (bohr)
  • energy: Hartrees
  • mass: electron masses
  • time: h-bar / E_h
  • angles: degrees (in topology), radians (internally)

bond spring constants are in units of (Hartree / bohr^2), corresponding to N/m in SI

angle and dihedral spring constants are in units of (Hartree / (bohr.rad))

The force field expression is simple and based on harmonic potentials for most terms:

V(x) = bond + angle + dihedral + coulomb + lennard-jones (VDW),

or

V(x) = Σ(1/2)kx^2 + Σ(1/2)kAngle(θ - θ0)^2 + Σ(1/2)kDihedral(α-α0)^2 + ΣΣ(qi*qj)/rij + Σ4ϵ((σ / r)^12 - (σ / r)^6)

About

a mini MD engine for educational purposes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published