git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@9977 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2013-05-30 19:58:20 +00:00
parent 5da43fc24a
commit c95b44619c

View File

@ -1,74 +1,73 @@
ReaxFF library
Aidan Thompson, Sandia National Labs
athomps at sandia.gov
Jan 2008
This library is an implementation of the ReaxFF potential,
specifically designed to work with LAMMPS. It is derived from Adri van
Duin's original serial code, with intervening incarnations in CMDF and
GRASP.
-------------------------------------------------
This directory has source files to build a library that LAMMPS
links against when using the REAX package.
This library must be built with a F90 compiler, before LAMMPS is
built, so LAMMPS can link against it.
Build the library using one of the provided Makefile.* files or create
your own, specific to your compiler and system. For example:
make -f Makefile.gfortran
When you are done building this library, two files should
exist in this directory:
libreax.a the library LAMMPS will link against
Makefile.lammps settings the LAMMPS Makefile will import
The latter file will have settings like this (can be omitted if blank):
Makefile.lammps is created by the make command, by copying one of the
Makefile.lammps.* files. See the EXTRAMAKE setting at the top of the
Makefile.* files.
reax_SYSINC =
reax_SYSLIB = -lgfortran
reax_SYSPATH =
IMPORTANT: You must examine the final Makefile.lammps to insure it is
correct for your system, else the LAMMPS build will likely fail.
SYSINC is for settings needed to compile LAMMPS source files
SYSLIB is for additional system libraries needed by this package
SYSPATH is the path(s) to where those libraries are
Makefile.lammps has settings for 3 variables:
You must insure these settings are correct for your system, else
the LAMMPS build will likely fail.
user-reax_SYSINC = leave blank for this package
user-reax_SYSLIB = auxiliary F90 libs needed to link a F90 lib with
a C++ program (LAMMPS) via a C++ compiler
user-reax_SYSPATH = path(s) to where those libraries are
Note that the source files for this library are Fortran. LAMMPS is
built with a C++ compiler/linker. Thus you need to insure the
settings above enable usage of a Fortran library by a C++ program.
Because you have a F90 compiler on your system, you should have these
libraries. But you will have to figure out which ones are needed and
where they are. Examples of common configurations are in the
Makefile.lammps.* files.
-------------------------------------------------------------------------
-------------------------------------------------
ReaxFF library
Additional build notes:
Aidan Thompson, Sandia National Labs
athomps at sandia.gov
Jan 2008
--------------
This library is an implementation of the ReaxFF potential,
specifically designed to work with LAMMPS. It is derived from Adri van
Duin's original serial code, with intervening incarnations in CMDF and
GRASP.
This library can be built with any decent Fortran compiler, before
LAMMPS is built, so LAMMPS can link against it. The compiler must
produce object files compatible with the LAMMPS C++ compiler. If not,
the LAMMPS build will fail during linking.
Build the library using one of the provided Makefiles or create your
own, specific to your compiler and system. For example:
make -f Makefile.g95
If the build is successful, you should end up with a libreax.a file.
Note that the include file reax_defs.h is used by both the ReaxFF
library source files and the LAMMPS pair_reax.cpp source file (from
module REAX). It contains dimensions of statically-allocated arrays
created by the ReaxFF library. The size of these arrays must be set
small enough to avoid exceeding the available machine memory, and
large enough to fit the actual data generated by ReaxFF. If you change
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.
The include file reax_defs.h is used by both the ReaxFF library source
files and the LAMMPS pair_reax.cpp source file (in package src/REAX).
It contains dimensions of statically-allocated arrays created by the
ReaxFF library. The size of these arrays must be set small enough to
avoid exceeding the available machine memory, and large enough to fit
the actual data generated by ReaxFF. If you change 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.