File: in.ti_spring

package info (click to toggle)
lammps 20210122~gita77bb%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 331,996 kB
  • sloc: cpp: 802,213; python: 24,256; xml: 14,949; f90: 10,448; ansic: 8,476; perl: 4,161; sh: 3,466; fortran: 2,805; makefile: 1,250; objc: 238; lisp: 163; csh: 16; awk: 14; tcl: 6
file content (59 lines) | stat: -rw-r--r-- 2,586 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Rodrigo Freitas - rodrigof@berkeley.edu
#
# Description: nonequilibrium thermodynamic integration. Further details in:
# R. Freitas, M. Asta, and M. de Koning, Computational Materials Science, (2016)
# https://doi.org/10.1016/j.commatsci.2015.10.050


#--------------------------- System setup -------------------------------------#
  units             metal
  lattice           fcc 3.621
  region            sim_box block 0 4 0 4 0 4
  create_box        1 sim_box
  create_atoms      1 box

  pair_style        eam/alloy
  pair_coeff        * * ../../../../potentials/Cu_mishin1.eam.alloy Cu
#------------------------------------------------------------------------------#


#---------------------- Simulation setup --------------------------------------#
  # The order of the fix commands is important: thermostat AFTER thermodynamic integration force interpolation.
  fix               f1 all nve
  fix               f2 all ti/spring 3.728 2000 1000 function 2
  fix               f3 all langevin 100.0 100.0 0.1 666 zero yes

  # Compute temperature using center-of-mass coordinates.
  compute           c1 all temp/com
  fix_modify        f3 temp c1

  # Output variables.
  variable          step    equal step
  variable          dU      equal pe-f_f2 # Used on the integration.
  variable          lambda  equal f_f2[1] # For reference or integration.
  variable          dlambda equal f_f2[2] # For reference or integration.

  # Thermo output.
  thermo_style      custom step pe
  thermo            100
#------------------------------------------------------------------------------#


#------------------------- Running the simulation -----------------------------#
  # Setup initial velocities to accelerate equilibration.
  velocity          all create 200.0 9999 mom yes rot yes dist gaussian

  # Forward nonequilibrium thermodynamic integration.
  run               1000 # Equilibrate system at lambda = 0.
  fix               f4 all print 1 "${step} ${dU} ${lambda} ${dlambda}" & 
                    screen no file forward.dat title '# step dU lambda dlambda'
  run               2000 # Lambda switching: 0 -> 1.
  unfix             f4

  # Backward nonequilibrium thermodynamic integration.
  run               1000 # Equilibrate system at lambda = 1.
  fix               f4 all print 1 "${step} ${dU} ${lambda} ${dlambda}" & 
                    screen no file backward.dat title '# step dU lambda dlambda'
  run               2000 # Lambda switching: 1 -> 0.
  unfix             f4
#------------------------------------------------------------------------------#