Commit bbec50be authored by Andrew Schultz's avatar Andrew Schultz
Browse files

Add HMA examples

parent 26c40a26
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
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)
+36 −0
Original line number Diff line number Diff line
# 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
+10159 −0

File added.

Preview size limit exceeded, changes collapsed.

+10159 −0

File added.

Preview size limit exceeded, changes collapsed.