Fold hma compute into USER-MISC

This commit is contained in:
Andrew Schultz
2019-06-19 16:12:15 -04:00
parent 04cfaae54f
commit 395a9d3739
9 changed files with 2 additions and 23 deletions

View File

@ -0,0 +1,22 @@
The example input script sets up a simple FCC crystal using the Lennard-Jones
potential. The script sets up the HMA compute to calculate the energy, pressure
and heat capacity. The output columns are:
1: timestep
2: measured temperature
3: potential energy
4: HMA potential energy
5: pressure
6: HMA pressure
7: HMA heat capacity contribution
Averages of the potential energy (#3 and #4) agree although #4 (HMA) is more precise.
Averages of the pressure (#5 and #6) agree once the ideal gas
contribution is included; #6 (HMA) is more precise.
The heat capacity can be computed from colume #3 (convential) as
Cv = Var(#3)/(k T^2)
With HMA, the heat capacity can be computed from column #4 and #7 as
Cv = #7 + Var(#4)/(k T^2)

View File

@ -0,0 +1,36 @@
# Harmonically mapped average example
units lj
dimension 3
boundary p p p
atom_style atomic
atom_modify map array
# ---------- Create Atoms ----------------------------
lattice fcc 1.0
region box block 0 4 0 4 0 4 units lattice
create_box 1 box
lattice fcc 1.0 orient x 1 0 0 orient y 0 1 0 orient z 0 0 1
create_atoms 1 region box
# ---------- Define Interatomic Potential ---------------------
pair_style lj/smooth/linear 3
pair_coeff * * 1.0 1.0
mass 1 1.0
atom_modify sort 0 1
velocity all create 0.1 45678 dist gaussian
compute u all pe
compute p all pressure NULL pair
compute hma all HMA settemp u p 9.579586686264458 cv
timestep 0.005
fix settemp all nvt temp 1.0 1.0 0.5
thermo_style custom elapsed temp c_u c_hma[1] c_p c_hma[2] c_hma[3]
thermo_modify format float '%22.15e'
thermo 500
run 20000
thermo 20
run 200000

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff