diff -Naur lammps-8Apr08/doc/compute_centro_atom.html lammps-9Apr08/doc/compute_centro_atom.html --- lammps-8Apr08/doc/compute_centro_atom.html 2008-01-03 17:56:10.000000000 -0700 +++ lammps-9Apr08/doc/compute_centro_atom.html 2008-04-07 09:58:34.000000000 -0600 @@ -39,10 +39,10 @@

-

where the 12 nearest neighbors are found and Ri and Ri+6 are the -vectors from the central atom to the opposite pair of nearest -neighbors. Atoms not in the group are included in the 12 neighbors -used in this calculation. +

where the 12 nearest neighbors are found (for fcc lattices) and Ri and +Ri+6 are the vectors from the central atom to the opposite pair of +nearest neighbors. Atoms not in the group are included in the 12 +neighbors used in this calculation.

The neighbor list needed to compute this quantity is constructed each time the calculation is performed (i.e. each time a snapshot of atoms diff -Naur lammps-8Apr08/doc/compute_centro_atom.txt lammps-9Apr08/doc/compute_centro_atom.txt --- lammps-8Apr08/doc/compute_centro_atom.txt 2008-01-03 17:56:10.000000000 -0700 +++ lammps-9Apr08/doc/compute_centro_atom.txt 2008-04-07 09:58:34.000000000 -0600 @@ -36,10 +36,10 @@ :c,image(Eqs/centro_symmetry.jpg) -where the 12 nearest neighbors are found and Ri and Ri+6 are the -vectors from the central atom to the opposite pair of nearest -neighbors. Atoms not in the group are included in the 12 neighbors -used in this calculation. +where the 12 nearest neighbors are found (for fcc lattices) and Ri and +Ri+6 are the vectors from the central atom to the opposite pair of +nearest neighbors. Atoms not in the group are included in the 12 +neighbors used in this calculation. The neighbor list needed to compute this quantity is constructed each time the calculation is performed (i.e. each time a snapshot of atoms diff -Naur lammps-8Apr08/doc/compute_temp_asphere.html lammps-9Apr08/doc/compute_temp_asphere.html --- lammps-8Apr08/doc/compute_temp_asphere.html 2008-03-20 18:45:02.000000000 -0600 +++ lammps-9Apr08/doc/compute_temp_asphere.html 2008-04-07 09:58:34.000000000 -0600 @@ -85,6 +85,10 @@ be altered using the extra option of the compute_modify command.

+

See this howto section of the manual for a +discussion of different ways to compute temperature and perform +thermostatting. +

Output info:

The scalar value calculated by this compute is "intensive", meaning it diff -Naur lammps-8Apr08/doc/compute_temp_asphere.txt lammps-9Apr08/doc/compute_temp_asphere.txt --- lammps-8Apr08/doc/compute_temp_asphere.txt 2008-03-20 18:45:02.000000000 -0600 +++ lammps-9Apr08/doc/compute_temp_asphere.txt 2008-04-07 09:58:34.000000000 -0600 @@ -82,6 +82,10 @@ be altered using the {extra} option of the "compute_modify"_compute_modify.html command. +See "this howto section"_Section_howto.html#4_16 of the manual for a +discussion of different ways to compute temperature and perform +thermostatting. + [Output info:] The scalar value calculated by this compute is "intensive", meaning it diff -Naur lammps-8Apr08/src/MOLECULE/dump_bond.cpp lammps-9Apr08/src/MOLECULE/dump_bond.cpp --- lammps-8Apr08/src/MOLECULE/dump_bond.cpp 2007-10-03 10:16:14.000000000 -0600 +++ lammps-9Apr08/src/MOLECULE/dump_bond.cpp 2008-04-08 07:58:15.000000000 -0600 @@ -59,11 +59,13 @@ void DumpBond::write_header(int ndump) { - fprintf(fp,"ITEM: TIMESTEP\n"); - fprintf(fp,"%d\n",update->ntimestep); - fprintf(fp,"ITEM: NUMBER OF BONDS\n"); - fprintf(fp,"%d\n",ndump); - fprintf(fp,"ITEM: BONDS\n"); + if (me == 0) { + fprintf(fp,"ITEM: TIMESTEP\n"); + fprintf(fp,"%d\n",update->ntimestep); + fprintf(fp,"ITEM: NUMBER OF BONDS\n"); + fprintf(fp,"%d\n",ndump); + fprintf(fp,"ITEM: BONDS\n"); + } } /* ---------------------------------------------------------------------- */ diff -Naur lammps-8Apr08/src/MOLECULE/pair_lj_charmm_coul_charmm.cpp lammps-9Apr08/src/MOLECULE/pair_lj_charmm_coul_charmm.cpp --- lammps-8Apr08/src/MOLECULE/pair_lj_charmm_coul_charmm.cpp 2008-01-02 12:24:46.000000000 -0700 +++ lammps-9Apr08/src/MOLECULE/pair_lj_charmm_coul_charmm.cpp 2008-04-07 14:21:05.000000000 -0600 @@ -441,7 +441,8 @@ double factor_coul, double factor_lj, double &fforce) { - double r2inv,r6inv,switch1,switch2,forcecoul,forcelj,phicoul,philj; + double r2inv,r6inv,forcecoul,forcelj,phicoul,philj; + double switch1,switch2; r2inv = 1.0/rsq; if (rsq < cut_coulsq) { @@ -454,6 +455,7 @@ forcecoul *= switch1 + switch2; } } else forcecoul = 0.0; + if (rsq < cut_ljsq) { r6inv = r2inv*r2inv*r2inv; forcelj = r6inv * (lj1[itype][jtype]*r6inv - lj2[itype][jtype]); @@ -466,6 +468,7 @@ forcelj = forcelj*switch1 + philj*switch2; } } else forcelj = 0.0; + fforce = (factor_coul*forcecoul + factor_lj*forcelj) * r2inv; double eng = 0.0; diff -Naur lammps-8Apr08/src/XTC/dump_xtc.cpp lammps-9Apr08/src/XTC/dump_xtc.cpp --- lammps-8Apr08/src/XTC/dump_xtc.cpp 2008-02-08 13:06:26.000000000 -0700 +++ lammps-9Apr08/src/XTC/dump_xtc.cpp 2008-04-08 07:58:15.000000000 -0600 @@ -151,7 +151,7 @@ void DumpXTC::write_header(int n) { - // realloc coords if necessary + // all procs realloc types & coords if necessary if (n != natoms) { memory->sfree(coords); @@ -161,6 +161,10 @@ coords = (float *) memory->smalloc(3*natoms*sizeof(float),"dump:coords"); } + // only proc 0 writes header + + if (me != 0) return; + int tmp = XTC_MAGIC; xdr_int(&xd,&tmp); xdr_int(&xd,&n); diff -Naur lammps-8Apr08/src/atom.cpp lammps-9Apr08/src/atom.cpp --- lammps-8Apr08/src/atom.cpp 2008-03-17 17:37:19.000000000 -0600 +++ lammps-9Apr08/src/atom.cpp 2008-04-08 07:58:15.000000000 -0600 @@ -602,7 +602,7 @@ /* ---------------------------------------------------------------------- check if atom tags are consecutive from 1 to Natoms - return 0 if any tag <= 0 or maxtag > Natoms + return 0 if any tag <= 0 or maxtag != Natoms return 1 if OK (doesn't actually check if all tag values are used) ------------------------------------------------------------------------- */ @@ -620,7 +620,7 @@ } MPI_Allreduce(check,check_all,2,MPI_INT,MPI_MAX,world); - if (check_all[0] || check_all[1] > natoms) return 0; + if (check_all[0] || check_all[1] != static_cast (natoms)) return 0; return 1; } diff -Naur lammps-8Apr08/src/dump.cpp lammps-9Apr08/src/dump.cpp --- lammps-8Apr08/src/dump.cpp 2008-01-17 16:46:47.000000000 -0700 +++ lammps-9Apr08/src/dump.cpp 2008-04-08 07:58:15.000000000 -0600 @@ -153,7 +153,7 @@ // write timestep header if (multiproc) write_header(nme); - else if (me == 0) write_header(ntotal); + else write_header(ntotal); // grow communication buffer if necessary diff -Naur lammps-8Apr08/src/dump_atom.cpp lammps-9Apr08/src/dump_atom.cpp --- lammps-8Apr08/src/dump_atom.cpp 2007-10-03 10:22:30.000000000 -0600 +++ lammps-9Apr08/src/dump_atom.cpp 2008-04-08 07:58:15.000000000 -0600 @@ -110,7 +110,7 @@ void DumpAtom::write_header(int ndump) { - (this->*header_choice)(ndump); + if (me == 0) (this->*header_choice)(ndump); } /* ---------------------------------------------------------------------- */ diff -Naur lammps-8Apr08/src/dump_custom.cpp lammps-9Apr08/src/dump_custom.cpp --- lammps-8Apr08/src/dump_custom.cpp 2008-01-02 12:24:46.000000000 -0700 +++ lammps-9Apr08/src/dump_custom.cpp 2008-04-08 07:58:15.000000000 -0600 @@ -206,7 +206,7 @@ void DumpCustom::write_header(int ndump) { - (this->*header_choice)(ndump); + if (me == 0) (this->*header_choice)(ndump); } /* ---------------------------------------------------------------------- */ diff -Naur lammps-8Apr08/src/dump_dcd.cpp lammps-9Apr08/src/dump_dcd.cpp --- lammps-8Apr08/src/dump_dcd.cpp 2008-01-17 13:22:20.000000000 -0700 +++ lammps-9Apr08/src/dump_dcd.cpp 2008-04-08 07:58:15.000000000 -0600 @@ -179,11 +179,13 @@ dim[4] = (h[0]*h[5]) / alen/blen; } - uint32_t out_integer = 48; - fwrite_int32(fp,out_integer); - fwrite(dim,out_integer,1,fp); - fwrite_int32(fp,out_integer); - if (flush_flag) fflush(fp); + if (me == 0) { + uint32_t out_integer = 48; + fwrite_int32(fp,out_integer); + fwrite(dim,out_integer,1,fp); + fwrite_int32(fp,out_integer); + if (flush_flag) fflush(fp); + } } /* ---------------------------------------------------------------------- */ diff -Naur lammps-8Apr08/src/dump_xyz.cpp lammps-9Apr08/src/dump_xyz.cpp --- lammps-8Apr08/src/dump_xyz.cpp 2007-10-04 11:57:04.000000000 -0600 +++ lammps-9Apr08/src/dump_xyz.cpp 2008-04-08 07:58:15.000000000 -0600 @@ -94,7 +94,7 @@ void DumpXYZ::write_header(int n) { - // realloc types & coords if necessary + // all procs realloc types & coords if necessary if (igroup == 0 && n != natoms) { memory->sfree(types); @@ -106,8 +106,12 @@ coords = (float *) memory->smalloc(3*natoms*sizeof(float),"dump:coords"); } - fprintf(fp,"%d\n",n); - fprintf(fp,"Atoms\n"); + // only proc 0 writes header + + if (me == 0) { + fprintf(fp,"%d\n",n); + fprintf(fp,"Atoms\n"); + } } /* ---------------------------------------------------------------------- */ diff -Naur lammps-8Apr08/src/pair_lj_smooth.cpp lammps-9Apr08/src/pair_lj_smooth.cpp --- lammps-8Apr08/src/pair_lj_smooth.cpp 2008-01-02 12:24:46.000000000 -0700 +++ lammps-9Apr08/src/pair_lj_smooth.cpp 2008-04-07 14:21:05.000000000 -0600 @@ -67,8 +67,8 @@ { int i,j,ii,jj,inum,jnum,itype,jtype; double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair; - double rsq,r2inv,r6inv,r,forcelj,factor_lj; - double t,tsq,fskin; + double rsq,r2inv,r6inv,forcelj,factor_lj; + double r,t,tsq,fskin; int *ilist,*jlist,*numneigh,**firstneigh; evdwl = 0.0; @@ -203,7 +203,8 @@ cut_inner_global = atof(arg[0]); cut_global = atof(arg[1]); - if (cut_inner_global <= 0.0) error->all("Illegal pair_style command"); + if (cut_inner_global <= 0.0 || cut_inner_global > cut_global) + error->all("Illegal pair_style command"); // reset cutoffs that have been explicitly set @@ -242,7 +243,8 @@ cut_one = atof(arg[5]); } - if (cut_inner_one <= 0.0) error->all("Incorrect args for pair coefficients"); + if (cut_inner_one <= 0.0 || cut_inner_one > cut_one) + error->all("Incorrect args for pair coefficients"); int count = 0; for (int i = ilo; i <= ihi; i++) {