| 1 |
# ------------------------------- Initialization Section -------------------- |
| 2 |
|
| 3 |
include system.in.init |
| 4 |
|
| 5 |
# ------------------------------- Atom Definition Section ------------------- |
| 6 |
|
| 7 |
read_data system.data |
| 8 |
|
| 9 |
# ------------------------------- Settings Section -------------------------- |
| 10 |
|
| 11 |
include system.in.settings |
| 12 |
|
| 13 |
# ------------------------------- Run Section ------------------------------- |
| 14 |
# |
| 15 |
# The run-settings below were stolen from: |
| 16 |
# |
| 17 |
# http://icme.hpc.msstate.edu/mediawiki/index.php/Uniaxial_Compression |
| 18 |
|
| 19 |
|
| 20 |
compute csym all centro/atom fcc |
| 21 |
compute peratom all pe/atom |
| 22 |
|
| 23 |
# EQUILIBRATION |
| 24 |
reset_timestep 0 |
| 25 |
timestep 0.001 |
| 26 |
velocity all create 300 12345 mom yes rot no |
| 27 |
fix 1 all npt temp 300 300 1 iso 0 0 1 drag 1 |
| 28 |
|
| 29 |
# Set thermo output |
| 30 |
thermo 1000 |
| 31 |
thermo_style custom step lx ly lz press pxx pyy pzz pe temp |
| 32 |
|
| 33 |
# Run for at least 10 picosecond (assuming 1 fs timestep) |
| 34 |
run 20000 |
| 35 |
unfix 1 |
| 36 |
|
| 37 |
# Store final cell length for strain calculations |
| 38 |
variable tmp equal "lx" |
| 39 |
variable L0 equal ${tmp} |
| 40 |
print "Initial Length, L0: ${L0}" |
| 41 |
|
| 42 |
###################################### |
| 43 |
# DEFORMATION |
| 44 |
reset_timestep 0 |
| 45 |
|
| 46 |
fix 1 all npt temp 300 300 1 y 0 0 1 z 0 0 1 drag 1 |
| 47 |
variable srate equal 1.0e10 |
| 48 |
variable srate1 equal "-v_srate / 1.0e12" |
| 49 |
fix 2 all deform 1 x erate ${srate1} units box remap x |
| 50 |
|
| 51 |
# Output strain and stress info to file |
| 52 |
# for units metal, pressure is in [bars] = 100 [kPa] = 1/10000 [GPa] |
| 53 |
# p2, p3, p4 are in GPa |
| 54 |
variable strain equal "(lx - v_L0)/v_L0" |
| 55 |
variable p1 equal "v_strain" |
| 56 |
variable p2 equal "-pxx/10000" |
| 57 |
variable p3 equal "-pyy/10000" |
| 58 |
variable p4 equal "-pzz/10000" |
| 59 |
fix def1 all print 100 "${p1} ${p2} ${p3} ${p4}" file Al_comp_100.def1.txt screen no |
| 60 |
|
| 61 |
# Use cfg for AtomEye |
| 62 |
dump dAtomEye all cfg 250 dump.comp_*.cfg id type xs ys zs c_csym c_peratom fx fy fz |
| 63 |
dump_modify dAtomEye element Al |
| 64 |
|
| 65 |
# For users without AtomEye (like me), I decided to create a regular dump file: |
| 66 |
dump dCoords all custom 250 traj.lammpstrj id type x y z ix iy iz |
| 67 |
|
| 68 |
# Display thermo |
| 69 |
thermo 1000 |
| 70 |
thermo_style custom step v_strain temp v_p2 v_p3 v_p4 ke pe press |
| 71 |
|
| 72 |
run 20000 |
| 73 |
|
| 74 |
###################################### |
| 75 |
# SIMULATION DONE |
| 76 |
print "All done" |