Hi, I am trying a example give by the manual of command ‘computer heat flux’. While alway got an error ’ compute ID for fix ave/correlate does not exist’. I just updated Lammps and the version should not be the problem. Below is the script:
Sample LAMMPS input script
atom_style atomic
units real
variable kB equal 1.3806504e-23 # **J/K** Boltzmann
variable kCal2J equal 4186.0/6.02214e23
variable T equal 70
variable V equal vol
variable dt equal 4.0
variable p equal 200 # correlation length
variable s equal 10 # sample interval
variable d equal $p*$s # dump interval
It should be c_flux[1], not c_flux1.
It's just a formatting error
in the way the HTML for the doc page appears.
I just corrected it on the WWW site. Try looking
at the new page, there are several places that brackets
now appear in the commands.
ok - try cut/paste from the compute heat/flux doc page (on the
WWW site) one more time. This was again a formatting error
in the HTML with the curly braces around variables not passing
thru to the HTML.
Thanks, it works now. While as I modified the second piece of the script to the following, i.e. I use my amorphous silica structure by ‘read data’, and use Tersoff potential, I was always given ‘Invalid pair style’. This position file and potential were already tested in other script, so these should not be the problem. I know the Tersoff potential file I used is only suitable for ‘metal’ unit, when I changed the unit in the sample script from ‘real’ to ‘metal’, I still got the same message. I am confused, even the potential parameters are wrong due to the mis-assigning of unit style, it should be nothing to do with the pair style.
I replaced the second part of sample script with my script shown in the last message, so I did not use ‘create box’ command but defined the box and the atoms positions in the configuration file. As shown below,
units real
variable kB equal 1.3806504e-23 # [J/K] Boltzmann
variable kCal2J equal 4186.0/6.02214e23
variable T equal 70
variable V equal vol
variable dt equal 4.0
variable p equal 200 # correlation length
variable s equal 10 # sample interval
variable d equal $p*$s # dump interval