diff -Naur lammps-3May07/doc/Section_start.html lammps-4May07/doc/Section_start.html --- lammps-3May07/doc/Section_start.html 2007-04-30 09:34:40.000000000 -0600 +++ lammps-4May07/doc/Section_start.html 2007-04-30 18:14:45.000000000 -0600 @@ -59,10 +59,10 @@ (MPI, FFT), etc. Please read this section carefully. If you are not comfortable with makefiles, or building codes on a Unix platform, or running an MPI job on your machine, please find a local expert to help -you. Many compiling, linking, and run problems users have do not -really have to do with LAMMPS - they are peculiar to the user's -system, compilers, libraries, etc. Such questions are better answered -by a local expert. +you. Many compiling, linking, and run problems that users are not +really LAMMPS issues - they are peculiar to the user's system, +compilers, libraries, etc. Such questions are better answered by a +local expert.

If you have a build problem that you are convinced is a LAMMPS issue (e.g. the compiler complains about a line of LAMMPS source code), then @@ -76,7 +76,7 @@

Building a LAMMPS executable:

The src directory contains the C++ source and header files for LAMMPS. -It also contains a top-level Makefile and a MAKE directory with +It also contains a top-level Makefile and a MAKE sub-directory with low-level Makefile.* files for several machines. From within the src directory, type "make" or "gmake". You should see a list of available choices. If one of those is the machine and options you want, you can @@ -107,9 +107,9 @@

(2) Other errors typically occur because the low-level Makefile isn't setup correctly for your machine. If your platform is named "foo", -you need to create a Makefile.foo in the MAKE directory. Use whatever -existing file is closest to your platform as a starting point. See -the next section for more instructions. +you need to create a Makefile.foo in the MAKE sub-directory. Use +whatever existing file is closest to your platform as a starting +point. See the next section for more instructions.

Editing a new low-level Makefile.foo:

@@ -125,24 +125,25 @@

(2) Set the paths and flags for your C++ compiler, including optimization flags. You can use g++, the open-source GNU compiler, which is available on all Unix systems. Vendor compilers often -produce faster code. On boxes with Intel CPUs, I use the free Intel -icc compiler, which you can download from Intel's compiler +produce faster code. On boxes with Intel CPUs, we suggest using the +free Intel icc compiler, which you can download from Intel's compiler site.

(3) If you want LAMMPS to run in parallel, you must have an MPI -library installed on your platform. Makefile.foo needs to specify -where the mpi.h file (-I switch) and the libmpi.a library (-L switch) -is found. On my Linux box, I use Argonne's MPICH 1.2 which can be -downloaded from the Argonne MPI +library installed on your platform. If you do not use "mpicc" as your +compiler/linker, then Makefile.foo needs to specify where the mpi.h +file (-I switch) and the libmpi.a library (-L switch) is found. If +you are installing MPI yourself, we recommend Argonne's MPICH 1.2 +which can be downloaded from the Argonne MPI site. LAM MPI should also work. If you are running on a big parallel platform, your system people or the vendor should have already installed a version of MPI, which will be -faster than MPICH or LAM, so find out how to link against it. If you -use MPICH or LAM, you will have to configure and build it for your -platform. The MPI configure script should have compiler options to -enable you to use the same compiler you are using for the LAMMPS +faster than MPICH or LAM, so find out how to build and link with it. +If you use MPICH or LAM, you will have to configure and build it for +your platform. The MPI configure script should have compiler options +to enable you to use the same compiler you are using for the LAMMPS build, which can avoid problems that may arise when linking LAMMPS to the MPI library.

@@ -159,7 +160,7 @@ gettimeofday() . If your system doesn't support gettimeofday() , you'll need to insert code to call another timer. Note that the ANSI-standard function clock() rolls over after an hour or so, and is -therefore insufficient for timing long LAMMPS runs. +therefore insufficient for timing long LAMMPS simulations.

(5) If you want to use the particle-particle particle-mesh (PPPM) option in LAMMPS for long-range Coulombics, you must have a 1d FFT @@ -168,9 +169,10 @@ but the last one are native vendor-provided libraries. FFTW is a fast, portable library that should work on any platform. You can download it from www.fftw.org. Use version -2.1.X, not the newer 3.0.X. Building FFTW for my box was as simple as -./configure; make. Whichever FFT library you have on your platform, -you'll need to set the appropriate -I and -L switches in Makefile.foo. +2.1.X, not the newer 3.0.X. Building FFTW for your box should be as +simple as ./configure; make. Whichever FFT library you have on your +platform, you'll need to set the appropriate -I and -L switches in +Makefile.foo.

If you examine fft3d.c and fft3d.h you'll see it's possible to add other vendor FFT libraries via #ifdef statements in the appropriate @@ -255,12 +257,12 @@

(5) Building for MicroSoft Windows.

I've never done this, but LAMMPS is just standard C++ with MPI and FFT -calls. You should be able to use cygwin to build LAMMPS with a Unix -make. Or you should be able to pull all the source files into Visual -C++ (ugh) or some similar development environment and build it. In -the src/MAKE/Windows directory are some notes from users on how they -built LAMMPS under Windows, so you can look at their instructions for -tips. Good luck - we can't help you on this one. +calls. You can use cygwin to build LAMMPS with a Unix make; see +Makefile.cygwin. Or you should be able to pull all the source files +into Visual C++ (ugh) or some similar development environment and +build it. In the src/MAKE/Windows directory are some notes from users +on how they built LAMMPS under Windows, so you can look at their +instructions for tips. Good luck - we can't help you on this one.

2.3 Making LAMMPS with optional packages

@@ -289,7 +291,9 @@ The one exception is that to use the "opt" package, you must also be using the "molecule" and "manybody" packages. You may wish to exclude certain packages if you will never run certain kinds of simulations. -This will produce a smaller executable which may run a bit faster. +This will keep you from having to build auxiliary libraries (see +below) and will produce a smaller executable which may run a bit +faster.

By default, LAMMPS includes only the "kspace", "manybody", and "molecule" packages. As described below, some packages require LAMMPS @@ -433,10 +437,10 @@ (lmp_linux) to the directory with the input files. This may not be necessary, but some versions of MPI reset the working directory to where the executable is, rather than leave it as the directory where -you launch mpirun from. If that happens, LAMMPS will look for -additional input files and write its output files to the executable -directory, rather than your working directory, which is probably not -what you want. +you launch mpirun from (if you launch lmp_linux on its own and not +under mpirun). If that happens, LAMMPS will look for additional input +files and write its output files to the executable directory, rather +than your working directory, which is probably not what you want.

If LAMMPS encounters errors in the input script or while running a simulation it will print an ERROR message and stop or a WARNING @@ -490,9 +494,11 @@ processors.

The input script specifies what simulation is run on which partition; -see the variable and next commands. -Simulations running on different partitions can also communicate with -each other; see the temper command. +see the variable and next commands. This +howto section gives examples of how to use +these commands in this way. Simulations running on different +partitions can also communicate with each other; see the +temper command.

-in file 
 
@@ -537,10 +543,12 @@ single character (referenced as $x in the input script) or a full string (referenced as ${abc}). The value can be any string. Using this command-line option is equivalent to putting the line "variable -name index value" at the beginning of the input script. See the -variable command for more info on defining variables -and this section for more info on using -variables in input scripts. +name index value" at the beginning of the input script. Defining a +variable as a command-line argument overrides any setting for the same +variable in the input script, since variables cannot be re-defined. +See the variable command for more info on defining +variables and this section for more info +on using variables in input scripts.


diff -Naur lammps-3May07/doc/Section_start.txt lammps-4May07/doc/Section_start.txt --- lammps-3May07/doc/Section_start.txt 2007-04-30 09:34:40.000000000 -0600 +++ lammps-4May07/doc/Section_start.txt 2007-04-30 18:14:45.000000000 -0600 @@ -54,10 +54,10 @@ (MPI, FFT), etc. Please read this section carefully. If you are not comfortable with makefiles, or building codes on a Unix platform, or running an MPI job on your machine, please find a local expert to help -you. Many compiling, linking, and run problems users have do not -really have to do with LAMMPS - they are peculiar to the user's -system, compilers, libraries, etc. Such questions are better answered -by a local expert. +you. Many compiling, linking, and run problems that users are not +really LAMMPS issues - they are peculiar to the user's system, +compilers, libraries, etc. Such questions are better answered by a +local expert. If you have a build problem that you are convinced is a LAMMPS issue (e.g. the compiler complains about a line of LAMMPS source code), then @@ -71,7 +71,7 @@ [{Building a LAMMPS executable:}] The src directory contains the C++ source and header files for LAMMPS. -It also contains a top-level Makefile and a MAKE directory with +It also contains a top-level Makefile and a MAKE sub-directory with low-level Makefile.* files for several machines. From within the src directory, type "make" or "gmake". You should see a list of available choices. If one of those is the machine and options you want, you can @@ -102,9 +102,9 @@ (2) Other errors typically occur because the low-level Makefile isn't setup correctly for your machine. If your platform is named "foo", -you need to create a Makefile.foo in the MAKE directory. Use whatever -existing file is closest to your platform as a starting point. See -the next section for more instructions. +you need to create a Makefile.foo in the MAKE sub-directory. Use +whatever existing file is closest to your platform as a starting +point. See the next section for more instructions. [{Editing a new low-level Makefile.foo:}] @@ -120,24 +120,25 @@ (2) Set the paths and flags for your C++ compiler, including optimization flags. You can use g++, the open-source GNU compiler, which is available on all Unix systems. Vendor compilers often -produce faster code. On boxes with Intel CPUs, I use the free Intel -icc compiler, which you can download from "Intel's compiler +produce faster code. On boxes with Intel CPUs, we suggest using the +free Intel icc compiler, which you can download from "Intel's compiler site"_intel. :link(intel,http://www.intel.com/software/products/noncom) (3) If you want LAMMPS to run in parallel, you must have an MPI -library installed on your platform. Makefile.foo needs to specify -where the mpi.h file (-I switch) and the libmpi.a library (-L switch) -is found. On my Linux box, I use Argonne's MPICH 1.2 which can be -downloaded from the "Argonne MPI +library installed on your platform. If you do not use "mpicc" as your +compiler/linker, then Makefile.foo needs to specify where the mpi.h +file (-I switch) and the libmpi.a library (-L switch) is found. If +you are installing MPI yourself, we recommend Argonne's MPICH 1.2 +which can be downloaded from the "Argonne MPI site"_http://www-unix.mcs.anl.gov/mpi. LAM MPI should also work. If you are running on a big parallel platform, your system people or the vendor should have already installed a version of MPI, which will be -faster than MPICH or LAM, so find out how to link against it. If you -use MPICH or LAM, you will have to configure and build it for your -platform. The MPI configure script should have compiler options to -enable you to use the same compiler you are using for the LAMMPS +faster than MPICH or LAM, so find out how to build and link with it. +If you use MPICH or LAM, you will have to configure and build it for +your platform. The MPI configure script should have compiler options +to enable you to use the same compiler you are using for the LAMMPS build, which can avoid problems that may arise when linking LAMMPS to the MPI library. @@ -154,7 +155,7 @@ gettimeofday() . If your system doesn't support gettimeofday() , you'll need to insert code to call another timer. Note that the ANSI-standard function clock() rolls over after an hour or so, and is -therefore insufficient for timing long LAMMPS runs. +therefore insufficient for timing long LAMMPS simulations. (5) If you want to use the particle-particle particle-mesh (PPPM) option in LAMMPS for long-range Coulombics, you must have a 1d FFT @@ -163,9 +164,10 @@ but the last one are native vendor-provided libraries. FFTW is a fast, portable library that should work on any platform. You can download it from "www.fftw.org"_http://www.fftw.org. Use version -2.1.X, not the newer 3.0.X. Building FFTW for my box was as simple as -./configure; make. Whichever FFT library you have on your platform, -you'll need to set the appropriate -I and -L switches in Makefile.foo. +2.1.X, not the newer 3.0.X. Building FFTW for your box should be as +simple as ./configure; make. Whichever FFT library you have on your +platform, you'll need to set the appropriate -I and -L switches in +Makefile.foo. If you examine fft3d.c and fft3d.h you'll see it's possible to add other vendor FFT libraries via #ifdef statements in the appropriate @@ -250,12 +252,12 @@ (5) Building for MicroSoft Windows. I've never done this, but LAMMPS is just standard C++ with MPI and FFT -calls. You should be able to use cygwin to build LAMMPS with a Unix -make. Or you should be able to pull all the source files into Visual -C++ (ugh) or some similar development environment and build it. In -the src/MAKE/Windows directory are some notes from users on how they -built LAMMPS under Windows, so you can look at their instructions for -tips. Good luck - we can't help you on this one. +calls. You can use cygwin to build LAMMPS with a Unix make; see +Makefile.cygwin. Or you should be able to pull all the source files +into Visual C++ (ugh) or some similar development environment and +build it. In the src/MAKE/Windows directory are some notes from users +on how they built LAMMPS under Windows, so you can look at their +instructions for tips. Good luck - we can't help you on this one. 2.3 Making LAMMPS with optional packages :h4,link(2_3) @@ -282,7 +284,9 @@ The one exception is that to use the "opt" package, you must also be using the "molecule" and "manybody" packages. You may wish to exclude certain packages if you will never run certain kinds of simulations. -This will produce a smaller executable which may run a bit faster. +This will keep you from having to build auxiliary libraries (see +below) and will produce a smaller executable which may run a bit +faster. By default, LAMMPS includes only the "kspace", "manybody", and "molecule" packages. As described below, some packages require LAMMPS @@ -426,10 +430,10 @@ (lmp_linux) to the directory with the input files. This may not be necessary, but some versions of MPI reset the working directory to where the executable is, rather than leave it as the directory where -you launch mpirun from. If that happens, LAMMPS will look for -additional input files and write its output files to the executable -directory, rather than your working directory, which is probably not -what you want. +you launch mpirun from (if you launch lmp_linux on its own and not +under mpirun). If that happens, LAMMPS will look for additional input +files and write its output files to the executable directory, rather +than your working directory, which is probably not what you want. If LAMMPS encounters errors in the input script or while running a simulation it will print an ERROR message and stop or a WARNING @@ -483,9 +487,11 @@ processors. The input script specifies what simulation is run on which partition; -see the "variable"_variable.html and "next"_next.html commands. -Simulations running on different partitions can also communicate with -each other; see the "temper"_temper.html command. +see the "variable"_variable.html and "next"_next.html commands. "This +howto section"_Section_howto.html#4_4 gives examples of how to use +these commands in this way. Simulations running on different +partitions can also communicate with each other; see the +"temper"_temper.html command. -in file :pre @@ -530,10 +536,12 @@ single character (referenced as $x in the input script) or a full string (referenced as $\{abc\}). The value can be any string. Using this command-line option is equivalent to putting the line "variable -name index value" at the beginning of the input script. See the -"variable"_variable.html command for more info on defining variables -and "this section"_Section_commands.html#3_2 for more info on using -variables in input scripts. +name index value" at the beginning of the input script. Defining a +variable as a command-line argument overrides any setting for the same +variable in the input script, since variables cannot be re-defined. +See the "variable"_variable.html command for more info on defining +variables and "this section"_Section_commands.html#3_2 for more info +on using variables in input scripts. :line diff -Naur lammps-3May07/doc/if.html lammps-4May07/doc/if.html --- lammps-3May07/doc/if.html 2007-04-30 17:37:43.000000000 -0600 +++ lammps-4May07/doc/if.html 2007-04-30 17:54:12.000000000 -0600 @@ -25,10 +25,10 @@

Examples:

-
if $steps > 1000 then exit
+
if ${steps} > 1000 then exit
 if $x <= $y then "print X is smaller = $x" else "print Y is smaller = $y"
-if $eng > 0.0 then "timestep 0.005"
-if $eng > $eng_previous then "jump file1" else "jump file2" 
+if ${eng} > 0.0 then "timestep 0.005"
+if ${eng} > ${eng_previous} then "jump file1" else "jump file2" 
 

Description:

diff -Naur lammps-3May07/doc/if.txt lammps-4May07/doc/if.txt --- lammps-3May07/doc/if.txt 2007-04-30 17:37:43.000000000 -0600 +++ lammps-4May07/doc/if.txt 2007-04-30 17:54:12.000000000 -0600 @@ -22,10 +22,10 @@ [Examples:] -if ${steps} > 1000 then exit +if $\{steps\} > 1000 then exit if $x <= $y then "print X is smaller = $x" else "print Y is smaller = $y" -if ${eng} > 0.0 then "timestep 0.005" -if ${eng} > ${eng_previous} then "jump file1" else "jump file2" :pre +if $\{eng\} > 0.0 then "timestep 0.005" +if $\{eng\} > $\{eng_previous\} then "jump file1" else "jump file2" :pre [Description:] diff -Naur lammps-3May07/tools/restart2data.cpp lammps-4May07/tools/restart2data.cpp --- lammps-3May07/tools/restart2data.cpp 2007-04-27 10:49:36.000000000 -0600 +++ lammps-4May07/tools/restart2data.cpp 2007-05-03 09:06:03.000000000 -0600 @@ -1809,10 +1809,11 @@ } else if (strcmp(dihedral_style,"class2") == 0) { for (int i = 1; i <= ndihedraltypes; i++) fprintf(fp,"%d %g %g %g %g %g %g\n",i, - dihedral_class2_k1[i],dihedral_class2_k2[i], - dihedral_class2_k3[i], + dihedral_class2_k1[i], dihedral_class2_phi1[i]/PI*180.0, + dihedral_class2_k2[i], dihedral_class2_phi2[i]/PI*180.0, + dihedral_class2_k3[i], dihedral_class2_phi3[i]/PI*180.0); fprintf(fp,"\nMiddleBondTorsion Coeffs\n\n"); @@ -1825,18 +1826,20 @@ for (int i = 1; i <= ndihedraltypes; i++) fprintf(fp,"%d %g %g %g %g %g %g %g %g\n",i, dihedral_class2_ebt_f1_1[i],dihedral_class2_ebt_f2_1[i], - dihedral_class2_ebt_f3_1[i],dihedral_class2_ebt_r0_1[i], + dihedral_class2_ebt_f3_1[i], dihedral_class2_ebt_f1_2[i],dihedral_class2_ebt_f2_2[i], - dihedral_class2_ebt_f3_2[i],dihedral_class2_ebt_r0_2[i]); + dihedral_class2_ebt_f3_2[i], + dihedral_class2_ebt_r0_1[i], + dihedral_class2_ebt_r0_2[i]); fprintf(fp,"\nAngleTorsion Coeffs\n\n"); for (int i = 1; i <= ndihedraltypes; i++) fprintf(fp,"%d %g %g %g %g %g %g %g %g\n",i, dihedral_class2_at_f1_1[i],dihedral_class2_at_f2_1[i], dihedral_class2_at_f3_1[i], - dihedral_class2_at_theta0_1[i]/PI*180.0, dihedral_class2_at_f1_2[i],dihedral_class2_at_f2_2[i], dihedral_class2_at_f3_2[i], + dihedral_class2_at_theta0_1[i]/PI*180.0, dihedral_class2_at_theta0_2[i]/PI*180.0); fprintf(fp,"\nAngleAngleTorsion Coeffs\n\n");