Skip to content
/ FK_1D Public

Python implementation of Frenkel-Kontorova model in 1D. Open boundary conditions.

Notifications You must be signed in to change notification settings

LamaKing/FK_1D

Repository files navigation

Frenkel-Kontorova model 1D

Implementation with all same masses, OBC/PBC with flag, not much care about details.

Files:

  • FK_1D derivatives defining the model. And simple functions to evaluate spring energy and substrate energy
  • create_chain read parameter and create xyz with chain initial positions. Useful to create something, relax and start from that, in xyz
  • driver takes care of initialisation, solving the equation and storing the trajectory
  • plot_traj reads the traj.dat file generated by the driver and plots few things: + simple trajectory of each particle as a function of time + bond length difference along the trajectory, nice to see topological charge of the kink + substrate potential of each traj
  • params are json files defining the parameters of the system, used by all other files

Example

Take a chain with 50 atoms and 1 kink by construction (in the middle, vacancy).

Relax

Relax the config by a short Langevin damped simulations. The total energy components and CM trajectory are written in out.dat file.

Screenshot 2022-03-01 at 01 32 39 Fig 1: See that the total energy has converged.

The full trajectory is in traj.dat. An augmented xyz is created as well, useful for Ovito: y is substrate energy, z is spring energy.

Drive

Then drag it and see the king moving. The parameters is set so that the chain in depinned but doesn't slide too much in the given time. Should run in under a minute.

You can see the trajectory of the whole system, the beauty of 1D models! traj Fig 2: each line is the trajectory of an atom.

The system is under-damped, so the atoms oscillate a bit. Also, the soliton reflects nicely at the chain edges, does a double slip and chainges its topological charge.

bond_length_diff Fig 3: see how the soliton goes from vacancy (local spring length larger than equilibrium) to a kink (local spring length smaller than equilibrium) at each relfection from the boundary.