diff -Naur lammps-28Apr08/doc/pair_lubricate.html lammps-10May08/doc/pair_lubricate.html --- lammps-28Apr08/doc/pair_lubricate.html 2008-04-16 16:19:08.000000000 -0600 +++ lammps-10May08/doc/pair_lubricate.html 2008-04-30 09:16:54.000000000 -0600 @@ -39,23 +39,24 @@

which represents the dissipation W between two nearby particles due to -the background solvent. Rc is the outer cutoff specified in the -pair_style command, the translational velocities of the 2 particles -are v1 and v2, the angular velocities are w1 and w2, and n is the unit -vector in the direction from particle 1 to 2. The 4 terms represent -four modes of pairwise interaction: squeezing, shearing, pumping, and -twisting. The 4 flags in the pair_style command turn on or off each -of these modes by including or excluding each term. The 4 -coefficients on each term are functions of the separation distance of -the particles. Details are given in (Ball and Melrose), -including the forces and torques that result from taking derivatives -of this equation (see Appendix A). +their relative velocities in the presence of a background solvent. Rc +is the outer cutoff specified in the pair_style command, the +translational velocities of the 2 particles are v1 and v2, the angular +velocities are w1 and w2, and n is the unit vector in the direction +from particle 1 to 2. The 4 terms represent four modes of pairwise +interaction: squeezing, shearing, pumping, and twisting. The 4 flags +in the pair_style command turn on or off each of these modes by +including or excluding each term. The 4 coefficients on each term are +functions of the separation distance of the particles. Details are +given in (Ball and Melrose), including the forces and torques +that result from taking derivatives of this equation with respect to +velocity (see Appendix A).

Unlike most pair potentials, the two specified cutoffs (cutinner and cutoff) refer to the surface-to-surface separation between two particles, not center-to-center distance. Currently, this pair style -can only be used for mono-disperse spheres (same radii), so that -separation is r_ij - 2*radius, where r_ij is the center-to-center +can only be used for mono-disperse extended spheres (same radii), so +that separation is r_ij - 2*radius, where r_ij is the center-to-center distance between the particles. Within the inner cutoff cutinner, the forces and torques are evaluated at a separation of cutinner. The outer cutoff is the separation distance beyond which the pair-wise diff -Naur lammps-28Apr08/doc/pair_lubricate.txt lammps-10May08/doc/pair_lubricate.txt --- lammps-28Apr08/doc/pair_lubricate.txt 2008-04-16 16:19:08.000000000 -0600 +++ lammps-10May08/doc/pair_lubricate.txt 2008-04-30 09:16:54.000000000 -0600 @@ -36,23 +36,24 @@ :c,image(Eqs/pair_lubricate.jpg) which represents the dissipation W between two nearby particles due to -the background solvent. Rc is the outer cutoff specified in the -pair_style command, the translational velocities of the 2 particles -are v1 and v2, the angular velocities are w1 and w2, and n is the unit -vector in the direction from particle 1 to 2. The 4 terms represent -four modes of pairwise interaction: squeezing, shearing, pumping, and -twisting. The 4 flags in the pair_style command turn on or off each -of these modes by including or excluding each term. The 4 -coefficients on each term are functions of the separation distance of -the particles. Details are given in "(Ball and Melrose)"_#Ball, -including the forces and torques that result from taking derivatives -of this equation (see Appendix A). +their relative velocities in the presence of a background solvent. Rc +is the outer cutoff specified in the pair_style command, the +translational velocities of the 2 particles are v1 and v2, the angular +velocities are w1 and w2, and n is the unit vector in the direction +from particle 1 to 2. The 4 terms represent four modes of pairwise +interaction: squeezing, shearing, pumping, and twisting. The 4 flags +in the pair_style command turn on or off each of these modes by +including or excluding each term. The 4 coefficients on each term are +functions of the separation distance of the particles. Details are +given in "(Ball and Melrose)"_#Ball, including the forces and torques +that result from taking derivatives of this equation with respect to +velocity (see Appendix A). Unlike most pair potentials, the two specified cutoffs (cutinner and cutoff) refer to the surface-to-surface separation between two particles, not center-to-center distance. Currently, this pair style -can only be used for mono-disperse spheres (same radii), so that -separation is r_ij - 2*radius, where r_ij is the center-to-center +can only be used for mono-disperse extended spheres (same radii), so +that separation is r_ij - 2*radius, where r_ij is the center-to-center distance between the particles. Within the inner cutoff {cutinner}, the forces and torques are evaluated at a separation of cutinner. The outer {cutoff} is the separation distance beyond which the pair-wise diff -Naur lammps-28Apr08/src/fix.h lammps-10May08/src/fix.h --- lammps-28Apr08/src/fix.h 2008-04-04 17:18:14.000000000 -0600 +++ lammps-10May08/src/fix.h 2008-05-09 09:01:30.000000000 -0600 @@ -93,9 +93,9 @@ virtual void final_integrate_respa(int) {} virtual void min_post_force(int) {} - virtual double min_energy(double *, double *) {return 0.0;} + virtual double min_energy(double *) {return 0.0;} + virtual void min_step(double, double *) {} virtual int min_dof() {return 0;} - virtual void min_xinitial(double *) {} virtual int pack_comm(int, int *, double *, int, int *) {return 0;} virtual void unpack_comm(int, int, double *) {} diff -Naur lammps-28Apr08/src/fix_ave_spatial.cpp lammps-10May08/src/fix_ave_spatial.cpp --- lammps-28Apr08/src/fix_ave_spatial.cpp 2008-01-09 14:56:57.000000000 -0700 +++ lammps-10May08/src/fix_ave_spatial.cpp 2008-05-09 09:01:25.000000000 -0600 @@ -242,9 +242,9 @@ // print header into file if (fp && me == 0) { - fprintf(fp,"Spatial-averaged data for fix %s and group %s\n",id,arg[1]); - fprintf(fp,"TimeStep Number-of-layers\n"); - fprintf(fp,"Layer Coordinate Natoms"); + fprintf(fp,"# Spatial-averaged data for fix %s and group %s\n",id,arg[1]); + fprintf(fp,"# TimeStep Number-of-layers\n"); + fprintf(fp,"# Layer Coordinate Natoms"); for (int i = 0; i < nvalues; i++) if (which[i] == COMPUTE) fprintf(fp," c_%s",ids[i]); else if (which[i] == FIX) fprintf(fp," f_%s",ids[i]); diff -Naur lammps-28Apr08/src/fix_ave_time.cpp lammps-10May08/src/fix_ave_time.cpp --- lammps-28Apr08/src/fix_ave_time.cpp 2008-03-03 14:52:23.000000000 -0700 +++ lammps-10May08/src/fix_ave_time.cpp 2008-05-09 09:01:25.000000000 -0600 @@ -167,8 +167,8 @@ // print header into file if (fp && me == 0) { - fprintf(fp,"Time-averaged data for fix %s\n",id); - fprintf(fp,"TimeStep"); + fprintf(fp,"# Time-averaged data for fix %s\n",id); + fprintf(fp,"# TimeStep"); for (int i = 0; i < nvalues; i++) if (which[i] == COMPUTE) fprintf(fp," c_%s",ids[i]); else if (which[i] == FIX) fprintf(fp," f_%s",ids[i]); diff -Naur lammps-28Apr08/src/fix_com.cpp lammps-10May08/src/fix_com.cpp --- lammps-28Apr08/src/fix_com.cpp 2008-01-09 14:56:57.000000000 -0700 +++ lammps-10May08/src/fix_com.cpp 2008-05-09 09:01:25.000000000 -0600 @@ -42,8 +42,8 @@ } if (me == 0) { - fprintf(fp,"Center-of-mass for group %s\n",group->names[igroup]); - fprintf(fp,"TimeStep x y z\n"); + fprintf(fp,"# Center-of-mass for group %s\n",group->names[igroup]); + fprintf(fp,"# TimeStep x y z\n"); } } diff -Naur lammps-28Apr08/src/fix_gyration.cpp lammps-10May08/src/fix_gyration.cpp --- lammps-28Apr08/src/fix_gyration.cpp 2008-01-09 14:56:57.000000000 -0700 +++ lammps-10May08/src/fix_gyration.cpp 2008-05-09 09:01:06.000000000 -0600 @@ -42,8 +42,8 @@ } if (me == 0) { - fprintf(fp,"Radius-of-gyration for group %s\n",group->names[igroup]); - fprintf(fp,"TimeStep Rg\n"); + fprintf(fp,"# Radius-of-gyration for group %s\n",group->names[igroup]); + fprintf(fp,"# TimeStep Rg\n"); } } diff -Naur lammps-28Apr08/src/fix_msd.cpp lammps-10May08/src/fix_msd.cpp --- lammps-28Apr08/src/fix_msd.cpp 2008-01-09 14:56:57.000000000 -0700 +++ lammps-10May08/src/fix_msd.cpp 2008-05-09 09:01:06.000000000 -0600 @@ -46,9 +46,9 @@ } if (me == 0) { - fprintf(fp,"Mean-squared Displacement for group %s\n", + fprintf(fp,"# Mean-squared Displacement for group %s\n", group->names[igroup]); - fprintf(fp,"TimeStep x y z total\n"); + fprintf(fp,"# TimeStep x y z total\n"); } // perform initial allocation of atom-based array diff -Naur lammps-28Apr08/src/fix_print.cpp lammps-10May08/src/fix_print.cpp --- lammps-28Apr08/src/fix_print.cpp 2008-01-02 12:24:46.000000000 -0700 +++ lammps-10May08/src/fix_print.cpp 2008-05-09 09:01:06.000000000 -0600 @@ -68,7 +68,7 @@ // print header into file - if (fp && me == 0) fprintf(fp,"Fix print output for fix %s\n",id); + if (fp && me == 0) fprintf(fp,"# Fix print output for fix %s\n",id); copy = new char[MAXLINE]; work = new char[MAXLINE]; diff -Naur lammps-28Apr08/src/fix_rdf.cpp lammps-10May08/src/fix_rdf.cpp --- lammps-28Apr08/src/fix_rdf.cpp 2008-01-09 14:56:57.000000000 -0700 +++ lammps-10May08/src/fix_rdf.cpp 2008-05-09 09:01:06.000000000 -0600 @@ -260,7 +260,7 @@ double constant = 4.0*PI / (3.0*domain->xprd*domain->yprd*domain->zprd); int irdf; - fprintf(fp,"%s %d \n","TIMESTEP", update->ntimestep); + fprintf(fp,"# Timestep %d\n",update->ntimestep); fprintf(fp,"%s","r"); for (int i = 1; i <= atom->ntypes; i++) @@ -300,7 +300,7 @@ if (update->ntimestep + nevery > update->endstep) { - fprintf(fp,"%s \n","RUN AVERAGE"); + fprintf(fp,"# Run Average\n"); fprintf(fp,"%s","r"); for (int i = 1; i <= atom->ntypes; i++) diff -Naur lammps-28Apr08/src/fix_tmd.cpp lammps-10May08/src/fix_tmd.cpp --- lammps-28Apr08/src/fix_tmd.cpp 2008-01-17 16:46:47.000000000 -0700 +++ lammps-10May08/src/fix_tmd.cpp 2008-05-09 09:01:25.000000000 -0600 @@ -78,7 +78,7 @@ sprintf(str,"Cannot open fix tmd file %s",arg[6]); error->one(str); } - fprintf(fp,"%s %s\n","Step rho_target rho_old gamma_back", + fprintf(fp,"%s %s\n","# Step rho_target rho_old gamma_back", "gamma_forward lambda work_lambda work_analytical"); } } diff -Naur lammps-28Apr08/src/modify.cpp lammps-10May08/src/modify.cpp --- lammps-28Apr08/src/modify.cpp 2008-04-04 17:17:45.000000000 -0600 +++ lammps-10May08/src/modify.cpp 2008-05-09 09:01:30.000000000 -0600 @@ -328,43 +328,47 @@ return energy and forces on extra degrees of freedom ------------------------------------------------------------------------- */ -double Modify::min_energy(double *xextra, double *fextra) +double Modify::min_energy(double *fextra) { int ifix,index; index = 0; - double energy_extra = 0.0; + double eng = 0.0; for (int i = 0; i < n_min_energy; i++) { ifix = list_min_energy[i]; - energy_extra += fix[ifix]->min_energy(&xextra[index],&fextra[index]); + eng += fix[ifix]->min_energy(&fextra[index]); index += fix[ifix]->min_dof(); } - return energy_extra; + return eng; } /* ---------------------------------------------------------------------- - minimizer extra degrees of freedom from relevant fixes + minimizer energy, force evaluation only for relevant fixes + return energy and forces on extra degrees of freedom ------------------------------------------------------------------------- */ -int Modify::min_dof() +void Modify::min_step(double delta, double *fextra) { - int ndof = 0; - for (int i = 0; i < n_min_energy; i++) - ndof += fix[list_min_energy[i]]->min_dof(); - return ndof; + int ifix,index; + + index = 0; + for (int i = 0; i < n_min_energy; i++) { + ifix = list_min_energy[i]; + fix[ifix]->min_step(delta,&fextra[index]); + index += fix[ifix]->min_dof(); + } } /* ---------------------------------------------------------------------- - minimizer initial xextra values only from relevant fixes + minimizer extra degrees of freedom from relevant fixes ------------------------------------------------------------------------- */ -void Modify::min_xinitial(double *xextra) +int Modify::min_dof() { - int index = 0; - for (int i = 0; i < n_min_energy; i++) { - fix[list_min_energy[i]]->min_xinitial(&xextra[index]); - index += fix[list_min_energy[i]]->min_dof(); - } + int ndof = 0; + for (int i = 0; i < n_min_energy; i++) + ndof += fix[list_min_energy[i]]->min_dof(); + return ndof; } /* ---------------------------------------------------------------------- diff -Naur lammps-28Apr08/src/modify.h lammps-10May08/src/modify.h --- lammps-28Apr08/src/modify.h 2008-01-09 14:56:57.000000000 -0700 +++ lammps-10May08/src/modify.h 2008-05-09 09:01:30.000000000 -0600 @@ -52,9 +52,9 @@ void final_integrate_respa(int); void min_post_force(int); - double min_energy(double *, double *); + double min_energy(double *); + void min_step(double, double *); int min_dof(); - void min_xinitial(double *); void add_fix(int, char **); void modify_fix(int, char **);