diff -Naur lammps-19May09/doc/Section_start.html lammps-1Jun09/doc/Section_start.html --- lammps-19May09/doc/Section_start.html 2009-02-12 14:19:44.000000000 -0700 +++ lammps-1Jun09/doc/Section_start.html 2009-06-03 13:59:51.000000000 -0600 @@ -367,13 +367,26 @@ method potential, which is a generalization of EAM potentials that can be used to model a wider variety of materials. This MEAM implementation was written by Greg Wagner at Sandia. It requires a -F90 compiler to build. +F90 compiler to build. The C++ to FORTRAN function calls in pair_meam.cpp +assumes that FORTRAN object names are converted to C object names by +appending an underscore character. This is generally the case, but +on machines that do not conform to this convention, you will need to +modify either the C++ code or your compiler settings.
The "reax" library in lib/reax computes the Reactive Force Field (ReaxFF) potential, developed by Adri van Duin in Bill Goddard's group at CalTech. This implementation in LAMMPS uses many of Adri's files and was developed by Aidan Thompson at Sandia and Hansohl Cho at MIT. -It requires a F77 or F90 compiler to build. +It requires a F77 or F90 compiler to build. +The C++ to FORTRAN function calls in pair_reax.cpp +assume that FORTRAN object names are converted to C object names by +appending an underscore character. This is generally the case, but +on machines that do not conform to this convention, you will need to +modify either the C++ code or your compiler settings. The name conversion +is handled by the preprocessor macro called FORTRAN in pair_reax_fortran.h. +Different definitions of this macro can be obtained by adding a +machine-specific macro definition to the CCFLAGS variable in your Makefile +e.g. -D_IBM. See pair_reax_fortran.h for more info.
The "poems" library in lib/poems computes the constrained rigid-body motion of articulated (jointed) multibody systems. POEMS was written diff -Naur lammps-19May09/doc/Section_start.txt lammps-1Jun09/doc/Section_start.txt --- lammps-19May09/doc/Section_start.txt 2009-02-12 14:19:44.000000000 -0700 +++ lammps-1Jun09/doc/Section_start.txt 2009-06-02 11:52:25.000000000 -0600 @@ -360,13 +360,26 @@ method potential, which is a generalization of EAM potentials that can be used to model a wider variety of materials. This MEAM implementation was written by Greg Wagner at Sandia. It requires a -F90 compiler to build. +F90 compiler to build. The C++ to FORTRAN function calls in pair_meam.cpp +assumes that FORTRAN object names are converted to C object names by +appending an underscore character. This is generally the case, but +on machines that do not conform to this convention, you will need to +modify either the C++ code or your compiler settings. The "reax" library in lib/reax computes the Reactive Force Field (ReaxFF) potential, developed by Adri van Duin in Bill Goddard's group at CalTech. This implementation in LAMMPS uses many of Adri's files and was developed by Aidan Thompson at Sandia and Hansohl Cho at MIT. -It requires a F77 or F90 compiler to build. +It requires a F77 or F90 compiler to build. +The C++ to FORTRAN function calls in pair_reax.cpp +assume that FORTRAN object names are converted to C object names by +appending an underscore character. This is generally the case, but +on machines that do not conform to this convention, you will need to +modify either the C++ code or your compiler settings. The name conversion +is handled by the preprocessor macro called FORTRAN in pair_reax_fortran.h. +Different definitions of this macro can be obtained by adding a +machine-specific macro definition to the CCFLAGS variable in your Makefile +e.g. -D_IBM. See pair_reax_fortran.h for more info. The "poems" library in lib/poems computes the constrained rigid-body motion of articulated (jointed) multibody systems. POEMS was written diff -Naur lammps-19May09/doc/pair_reax.html lammps-1Jun09/doc/pair_reax.html --- lammps-19May09/doc/pair_reax.html 2009-02-12 13:45:46.000000000 -0700 +++ lammps-1Jun09/doc/pair_reax.html 2009-06-03 13:59:51.000000000 -0600 @@ -1,5 +1,5 @@ -
The pair style computes the ReaxFF potential of van Duin, Goddard and co-workers. ReaxFF uses distance-dependent bond-order functions to represent the contributions of chemical bonding to the potential -energy. Details of the ReaxFF and its interatomic potential energy -calculation are given in the following publications: (van Duin -2001) and (van Duin 2003). +energy. There is more than one version of ReaxFF. The version implemented +in LAMMPS uses the functional forms documented in the +supplemental information of the following paper: (Chenoweth et al., + 2008). The parameter values in +the file ffield.reax provided with the ReaxFF examples are based on those +used in: (Strachan et al., 2005).
LAMMPS provides a ReaxFF potential file in its potentials dir, namely potentials/ffield.reax. Its format is identical to that used by van @@ -131,14 +134,14 @@
(van Duin 2001) van Duin, Dasgupta, Lorant, Goddard -Journal of Physical Chemistry A, 105, 9396-9409 (2001). +
(Chenoweth) Chenoweth, van Duin and Goddard III, +Journal of Physical Chemistry A, 112, 1040-1053 (2008).
- + -(van Duin 2003) van Duin, Strachan, Stewman, Zhang, Xu, Goddard, -Journal of Physical Chemistry A, 107, 3803-3811 (2003). +
(Strachan) Strachan, Kober, van Duin, Oxgaard, and Goddard, +Journal of Chemical Physics, 122, 054502 (2005).
diff -Naur lammps-19May09/doc/pair_reax.txt lammps-1Jun09/doc/pair_reax.txt --- lammps-19May09/doc/pair_reax.txt 2009-02-12 13:45:46.000000000 -0700 +++ lammps-1Jun09/doc/pair_reax.txt 2009-06-02 11:52:25.000000000 -0600 @@ -1,4 +1,4 @@ -"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c +M"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) @@ -26,9 +26,12 @@ The pair style computes the ReaxFF potential of van Duin, Goddard and co-workers. ReaxFF uses distance-dependent bond-order functions to represent the contributions of chemical bonding to the potential -energy. Details of the ReaxFF and its interatomic potential energy -calculation are given in the following publications: "(van Duin -2001)"_#van_Duin_2001 and "(van Duin 2003)"_#van_Duin_2003. +energy. There is more than one version of ReaxFF. The version implemented +in LAMMPS uses the functional forms documented in the +supplemental information of the following paper: "(Chenoweth et al., + 2008)"_#Chenoweth_2008. The parameter values in +the file ffield.reax provided with the ReaxFF examples are based on those +used in: "(Strachan et al., 2005)"_#Strachan_2005. LAMMPS provides a ReaxFF potential file in its potentials dir, namely potentials/ffield.reax. Its format is identical to that used by van @@ -128,10 +131,11 @@ :line -:link(van_Duin_2001) -[(van Duin 2001)] van Duin, Dasgupta, Lorant, Goddard -Journal of Physical Chemistry A, 105, 9396-9409 (2001). - -:link(van_Duin_2003) -[(van Duin 2003)] van Duin, Strachan, Stewman, Zhang, Xu, Goddard, -Journal of Physical Chemistry A, 107, 3803-3811 (2003). +:link(Chenoweth_2008) +[(Chenoweth)] Chenoweth, van Duin and Goddard III, +Journal of Physical Chemistry A, 112, 1040-1053 (2008). + +:link(Strachan_2005) +[(Strachan)] Strachan, Kober, van Duin, Oxgaard, and Goddard, +Journal of Chemical Physics, 122, 054502 (2005). + diff -Naur lammps-19May09/examples/reax/ffield.reax lammps-1Jun09/examples/reax/ffield.reax --- lammps-19May09/examples/reax/ffield.reax 2009-02-12 14:03:10.000000000 -0700 +++ lammps-1Jun09/examples/reax/ffield.reax 2009-06-01 14:16:04.000000000 -0600 @@ -1,4 +1,4 @@ -Reactive MD-force field +Reactive MD-force field [Strachan et al, JCP 122 054502 (2005).] 39 ! Number of general parameters 50.0000 !Overcoordination parameter 9.5469 !Overcoordination parameter diff -Naur lammps-19May09/lib/reax/README lammps-1Jun09/lib/reax/README --- lammps-19May09/lib/reax/README 2009-02-12 09:09:50.000000000 -0700 +++ lammps-1Jun09/lib/reax/README 2009-06-02 11:51:22.000000000 -0600 @@ -32,3 +32,15 @@ the values in reax_defs.h, you must first rebuild the library and then rebuild LAMMPS. +This library is called by functions in pair_reax.cpp. +The C++ to FORTRAN function calls in pair_reax.cpp +assume that FORTRAN object names are converted to C object names by +appending an underscore character. This is generally the case, but +on machines that do not conform to this convention, you will need to +modify either the C++ code or your compiler settings. The name conversion +is handled by the preprocessor macro called FORTRAN in the file +pair_reax_fortran.h, which is included by pair_reax.cpp. +Different definitions of this macro can be obtained by adding a +machine-specific macro definition to the CCFLAGS variable in your +your LAMMPS Makefile e.g. -D_IBM. See pair_reax_fortran.h for more info. + diff -Naur lammps-19May09/lib/reax/reax_reac.F lammps-1Jun09/lib/reax/reax_reac.F --- lammps-19May09/lib/reax/reax_reac.F 2009-02-12 14:03:20.000000000 -0700 +++ lammps-1Jun09/lib/reax/reax_reac.F 2009-06-02 11:51:22.000000000 -0600 @@ -138,7 +138,7 @@ ********************************************************************** ********************************************************************** - subroutine init + subroutine reaxinit ********************************************************************** #include "cbka.blk" diff -Naur lammps-19May09/potentials/ffield.reax lammps-1Jun09/potentials/ffield.reax --- lammps-19May09/potentials/ffield.reax 2009-02-06 09:10:15.000000000 -0700 +++ lammps-1Jun09/potentials/ffield.reax 2009-06-03 13:59:19.000000000 -0600 @@ -1,4 +1,4 @@ -Reactive MD-force field +Reactive MD-force field [Strachan et al, JCP 122 054502 (2005).] 39 ! Number of general parameters 50.0000 !Overcoordination parameter 9.5469 !Overcoordination parameter diff -Naur lammps-19May09/src/REAX/pair_reax.cpp lammps-1Jun09/src/REAX/pair_reax.cpp --- lammps-19May09/src/REAX/pair_reax.cpp 2009-02-12 14:13:22.000000000 -0700 +++ lammps-1Jun09/src/REAX/pair_reax.cpp 2009-06-02 12:09:07.000000000 -0600 @@ -527,7 +527,7 @@ neighbor->requests[irequest]->newton = 2; FORTRAN(readc, READC)(); - FORTRAN(init, INIT)(); + FORTRAN(reaxinit, REAXINIT)(); FORTRAN(ffinpt, FFINPT)(); FORTRAN(tap7th, TAP7TH)(); diff -Naur lammps-19May09/src/REAX/pair_reax_fortran.h lammps-1Jun09/src/REAX/pair_reax_fortran.h --- lammps-19May09/src/REAX/pair_reax_fortran.h 2009-02-11 15:30:27.000000000 -0700 +++ lammps-1Jun09/src/REAX/pair_reax_fortran.h 2009-06-02 12:12:05.000000000 -0600 @@ -12,26 +12,33 @@ ------------------------------------------------------------------------- */ // machine-specific C++ -> Fortran calling syntax -// CONS(a,b) should return ab, the concatenation of its arguments +// It defines the FORTRAN macro for converting variable and function +// names from FORTRAN to C. Different compilers do this in different +// ways. The default is add an underscore to the lower case string. +// Other definitions of the macro can be invoked by defining the +// corresponding macro at compile time using -D e.g. -D_IBM + +// CONS(a,b) should return ab, the concatenation of its arguments. +// If compiler is using strict ISO C standards, the ## works. +// Otherwise try the old /**/ trick and test. +// If that fails, you will need to figure out +// a definition for the FORTRAN macro that works on your machine. #if __STDC__ #define CONS(a,b) a##b #else #define CONS(a,b) a/**/b +#warning "The following declaration is a test of the CONS macro." +#warning "If it fails with an error, pair_reax_fortran.h must be modified by hand." +static int my_apples_my_oranges = 1; +static int my_applesoroanges = CONS(my_apples,_my_oranges); #endif -#ifdef _ARDENT -#define FORTRAN(lcname,ucname) ucname -#endif #ifdef _IBM #define FORTRAN(lcname,ucname) lcname #endif -#ifdef _HP -#define FORTRAN(lcname,ucname) lcname -#endif - #ifdef _F2C_LINUX #define FORTRAN(lcname,ucname) CONS(lcname,__) #endif @@ -167,7 +174,7 @@ // external routines provided by Fortran library extern "C" void FORTRAN(readc,READC)(); -extern "C" void FORTRAN(init,INIT)(); +extern "C" void FORTRAN(reaxinit,REAXINIT)(); extern "C" void FORTRAN(ffinpt,FFINPT)(); extern "C" void FORTRAN(tap7th,TAP7TH)(); extern "C" void FORTRAN(taper,TAPER)(double*,double*);