[lammps-users] fix rdf problems

I am trying to calculate the radial distribution function (rdf) for
TIP3P water molecules: atom info is in the file wa.atoms. I want
to equilibrate with an npt calculation, and then calculate the
rdf with nvt. Based on the manual, I assume that my "pair_style"
must include lj/cut and coul/cut, even though I would prefer
lj/cut/coul/long. (I am taking short cuts in this input file
while I debug the rdf error.)

I am getting an "ERROR: Illegal fix style" in the LAMMPS output file
when I use the following LAMMPS input file (hydrogen-1, oxygen-2):

dimension 3
boundary p p p
units real
atom_style full
pair_style lj/cut/coul/cut 5.0 10.0
bond_style harmonic
angle_style harmonic
read_data wa.atoms
fix 1 all shake 0.001 10 100 b 1 a 1
fix 2 all npt 300.0 300.0 100.0 xyz 1.0 1.0 1000.0 drag 0.2
velocity water create 300.0 527245 rot yes dist gaussian
timestep 2.0
run 1000
unfix 2
fix 3 all nvt 300.0 300.0 100.0
fix 4 all rdf 20 wa.rdf 100 2 2
run 2000

I know that I could do the rdf calculation using the dump file, but the
rdf is for a qualitative check, and I don't want to expend the effort for
a post-processor rdf calculation, if I don't have to.

Ken.

Hi Ken. Which version of LAMMPS are you running? Have
you upgraded to the most current version:

http://www.cs.sandia.gov/~sjplimp/download.html

I'm running a similar script here with no problem.
(I'll paste my script below for easy comparison.)
Also, there is no problem using lj/cut/coul/long with
this fix.

If you still can't get it to work, please send me your
data file and log file.

Paul

units real
neigh_modify delay 2 every 1

atom_style full
bond_style harmonic
angle_style charmm
pair_style lj/charmm/coul/long 8 10
pair_modify mix arithmetic
kspace_style pppm 1e-4

read_data water.data

special_bonds charmm
fix 1 all nvt 300. 300. 100.
fix 2 all shake 1e-6 500 0 m 1.0 a 1
velocity all create 300.0 12345678 dist uniform

thermo 1
thermo_style multi
timestep 2.0

fix 4 all rdf 20 wa.rdf 100 2 2

run 1000