Dear lammps user,
I have a simulation box containing spce water Na and Cl, I wanto to output averaged velocities of this components as function of position in the simulation box along the z axes. I am using lammps version 5 jun 2019
For Cl and Na i have use the comput chunk/atom command in combination with fix ave/chunk.
Nevertheless for water is a bit more complicate because the histograms need to be make with the velocities of the center of mass of the molecules and the position of the center of mass. I red the lammps manual and these combination of commands should do the work
group sv type 1 2
compute svchunk sv chunk/atom molecule compress yes
compute comsv sv com/chunk svchunk
compute vcmsv sv vcm/chunk svchunk
fix 1c sv ave/histo/weight 1 10 10 {loo} {hii} ${nbin} c_comsv[3] c_vcmsv[3] file “vel_sv_com_forhist_norm_all.dat” mode vector
nevertheless fix/ave/histo/weight does not work when used like this.
I can output an histogram of number of water molecules along the z direction in the simulation box based on their com with just fix ave/histo, but when weighted by the velocity the output just doesn’t make sense
I am attaching a simple example, “in_test.run” , to see if someone can reproduce this error. I also attached the outputs I am getting
Thanks in advance
Matias
in_test.run (1.72 KB)
log.lammps (6.32 KB)
vel_his_na.dat (8.48 KB)
vel_his_cl.dat (8.6 KB)
spce_nalc.data (575 KB)
vel_sv_com_hist.dat (6.44 KB)