Hello everyone,
I am trying to calculate thermal conductivity, using rNEMD method (Muller Plather algorithm) fix thermal/conductivity
that is explained in LAMMPS manual.
To do so, after equilibrating the system, I ran NPT ensemble to have a stable system at 300 k. Then, I calculated kinetic energy, followed by fix NVE
to get the production run and thermal conductivity.
My question is that does the procedure that I am following is correct? My concern mostly is for the fix NVE
part, as I am not sure that for rNEMD method, should NVE
ensemble be run or other ensembles, like NVT
should be used to impose a temperature gradient to the system and then use fix thermal/conductivity
along with that temperature gradient. Since, using NVE
, I am not sure how the temperature gradient would be imposed to the system.
Also, I am using real
units. So, is the calculation of kinetic energy correct? c_ke/0.00298
?
Here is my input file that I am trying to run with NVE
.
echo both
units real
dimension 3
boundary p p p
atom_style full
restart 50 restart
# Pair_Coefficient ..............................................................................................................................................
pair_style lj/class2/coul/long 10 15
dielectric 1.0
bond_style class2
angle_style class2
dihedral_style class2
improper_style class2
#read_data System.data
read_restart System_2.data
#info coeffs out log
#...................................................................................................................................................................................
kspace_style pppm 0.0001
neighbor 2 bin
neigh_modify every 1 delay 0 check yes
#velocity all create 300.0 497 dist gaussian
#minimize 1.0e-6 1.0e-6 5000 5000
timestep 1
thermo 1000
#thermo_style custom step cpu temp pe ke epair ecoul etotal density lx ly lz
# reset timestep
reset_timestep 0
# saving trajectories
dump 1 all xyz 1000 System_2.xyz
#Exports ......................................................................................................................................
#nvt run
#fix 2 all nvt temp 300.0 300.0 50.0
#run 400000
#undump
#unfix 2
#..............................................................................................................................................
#raise temperature
#fix 3 all nvt temp 300.0 600 50
#write_restart restart-1.equil
#run 1000000
#undump 1
#unfix 3
#..............................................................................................................................................
#run at high temperature for 3000ps
#fix 4 all npt temp 600 600 50 iso 1 1 1000
#write_restart restart-1.equil
#fix nvt all nvt temp 600.0 600 50
#run 3000000 upto
#undump 1
#unfix 4
#..............................................................................................................................................
# anneal
#fix 5 all nvt temp 600.0 300 50
#run 300000 #ADJUST the steps here for different cooling rates
#unfix 5
#..............................................................................................................................................
#fix 6 all npt temp 300 300 50 iso 1 1 1000
#fix nvt2 all nvt temp 570.0 570.0 50
#run 3000000 upto #ADJUST STEPS of production run
#unfix 6
#write_data Nafion_3landa.data
#..............................................................................................................................................
compute ke all ke/atom
variable temp atom c_ke/0.00298
fix 7 all nve
#calculate temperature difference
compute layers all chunk/atom bin/1d z lower 0.05 units reduced
fix 8 all ave/chunk 100 10 1000 layers v_temp file profile.mp
# Calculate thermal conductivity; velocity exchange is 10 here
fix 9 all thermal/conductivity 10 z 20
variable tdiff equal f_8[11][3]-f_8[1][3]
# thermal conductivity calculation
# reset fix thermal/conductivity to zero energy accumulation
fix 10 all thermal/conductivity 10 z 20
fix ave all ave/time 1 1 1000 v_tdiff ave running
thermo_style custom step cpu temp pe epair etotal density f_10 v_tdiff f_ave
dump 1 all xyz 1000 System3.xyz
run 1000000
undump 1
write_restart restart-3.equil
I really appreciate your guidance on this matter as I could not find much information in this regard.
Cheers,
Mahsheed