Commit ef7e03bb authored by sjplimp's avatar sjplimp
Browse files

git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@6963 f3b2605a-c512-4ea7-a41b-209d697bcdaa
parent b73d5517
Loading
Loading
Loading
Loading
+38 −26
Original line number Diff line number Diff line
This package contains a implementation for LAMMPS of the ReaxFF force
field.  ReaxFF uses distance-dependent bond-order functions to
represent the contributions of chemical bonding to the potential
energy.  It was originally developed by Adri van Duin and the Goddard
group at CalTech.
The files in this directory are a user-contributed package for LAMMPS.

The USER-REAXC version of ReaxFF (pair_style reax/c), implemented in
C, should give identical or very similar results to pair_style reax,
which is a ReaxFF implementation on top of a Fortran library, a
version of which library was originally authored by Adri van Duin.

The reax/c version should be somewhat faster and more scalable,
particularly with respect to the charge equilibration calculation.  It
should also be easier to build and use since there are no complicating
issues with Fortran memory allocation or linking to a Fortran library.
The person who created this package is Hasan Metin Aktulga, hmaktulga
at lbl.gov, while at Purdue University.  Contact him directly,
or Aidan Thompson (Sandia) at athomps at sandia.gov, if you have
questions.

For technical details about this implemention of ReaxFF, see
this paper:
@@ -21,34 +12,55 @@ Parallel and Scalable Reactive Molecular Dynamics: Numerical Methods
and Algorithmic Techniques, H. M. Aktulga, J. C. Fogarty,
S. A. Pandit, A. Y. Grama, Parallel Computing, to appear (2011).

See the doc page for the pair_style reax/c command for details
of how to use it in LAMMPS.
--------------------------------------

The person who created this package is Hasan Metin Aktulga (hmaktulga
at lbl.gov), while at Purdue University.  Contact him directly, or
Aidan Thompson at Sandia (athomps at sandia.gov), if you have
questions.
Note that the files with names starting with "reaxc" in this package
are from PuReMD, the Purdue ReaxFF Molecular Dynamics Program.  Its
copyright info and authorship info are listed below.
  
--------------------------------------
PACKAGE DESCRIPTION:

Contains a implementation for LAMMPS of the ReaxFF force field.
ReaxFF uses distance-dependent bond-order functions to represent the
contributions of chemical bonding to the potential energy.  It was
originally developed by Adri van Duin and the Goddard group at
CalTech.

The USER-REAXC version of ReaxFF (pair_style reax/c), implemented in
C, should give identical or very similar results to pair_style reax,
which is a ReaxFF implementation on top of a Fortran library, a
version of which was originally authored by Adri van Duin.

The reax/c version should be somewhat faster and more scalable,
particularly with respect to the charge equilibration calculation.  It
should also be easier to build and use since there are no complicating
issues due to linking to a Fortran library.

OTHERS FILES INCLUDED:

User examples for pair_style reax/c are in examples/reax.

Thanks to Steve Plimpton and Aidan Thompson for their input on the
LAMMPS architecture and for their help in understanding and
customizing some of the required LAMMPS interfaces.

Note that files in the package with names starting with "reaxc" are
from PuReMD, the Purdue ReaxFF Molecular Dynamics Program.  Its
copyright info and authorship info are listed below.
--------------------------------------

The reaxc files in this directory have the following header:

  PuReMD - Purdue ReaxFF Molecular Dynamics Program

  Copyright (2010) Purdue University
  Hasan Metin Aktulga, haktulga@cs.purdue.edu
  Hasan Metin Aktulga, hmaktulga@lbl.gov
  Joseph Fogarty, jcfogart@mail.usf.edu
  Sagar Pandit, pandit@usf.edu
  Ananth Y Grama, ayg@cs.purdue.edu

  Please cite the related publication:
  H. M. Aktulga, J. C. Fogarty, S. A. Pandit, A. Y. Grama,
  "Parallel Reactive Molecular Dynamics: Numerical Methods and
  Algorithmic Techniques", Parallel Computing, in press.
  
  This program is free software; you can redistribute it and/or
  modify it under the terms of the GNU General Public License as
  published by the Free Software Foundation; either version 2 of 
+31 −13
Original line number Diff line number Diff line
@@ -13,6 +13,12 @@

/* ----------------------------------------------------------------------
   Contributing author: Hasan Metin Aktulga, Purdue University
   (now at Lawrence Berkeley National Laboratory, hmaktulga@lbl.gov)

   Please cite the related publication:
   H. M. Aktulga, J. C. Fogarty, S. A. Pandit, A. Y. Grama,
   "Parallel Reactive Molecular Dynamics: Numerical Methods and
   Algorithmic Techniques", Parallel Computing, in press.
------------------------------------------------------------------------- */

#include "math.h"
@@ -401,9 +407,6 @@ void FixQEqReax::pre_force(int vflag)
  if (update->ntimestep % nevery) return;
  if( comm->me == 0 ) t_start = MPI_Wtime();

  if (domain->xprd < swb || domain->yprd < swb || domain->zprd < swb) 
    error->warning("FixQEqReax cutoff greater than periodic dimension");

  n = atom->nlocal;
  N = atom->nlocal + atom->nghost;
  // grow arrays if necessary
@@ -474,12 +477,13 @@ void FixQEqReax::init_matvec()
void FixQEqReax::compute_H()
{
  int inum, jnum, *ilist, *jlist, *numneigh, **firstneigh;
  int i, j, ii, jj, temp, newnbr;
  int *type;
  double **x;
  int i, j, ii, jj, temp, newnbr, flag;
  int *type, *tag;
  double **x, SMALL = 0.0001;
  double dx, dy, dz, r_sqr;

  type = atom->type;
  tag = atom->tag;
  x = atom->x;

  inum = list->inum;
@@ -499,12 +503,26 @@ void FixQEqReax::compute_H()
    for( jj = 0; jj < jnum; jj++ ) {
      j = jlist[jj];
      
      dx = x[i][0] - x[j][0];
      dy = x[i][1] - x[j][1];
      dz = x[i][2] - x[j][2];
      dx = x[j][0] - x[i][0];
      dy = x[j][1] - x[i][1];
      dz = x[j][2] - x[i][2];
      r_sqr = SQR(dx) + SQR(dy) + SQR(dz);
      
      if( r_sqr <= SQR(swb) && (j < n || atom->tag[i] <= atom->tag[j]) ) {
      flag = 0;
      if (r_sqr <= SQR(swb)) {
        if (j < n) flag = 1;
        else if (tag[i] < tag[j]) flag = 1;
	else if (tag[i] == tag[j]) {
          if (dz > SMALL) flag = 1;
          else if (fabs(dz) < SMALL) {
            if (dy > SMALL) flag = 1;
            else if (fabs(dy) < SMALL && dx > SMALL)
              flag = 1;
          }
        }
      }
      
      if( flag ) {
	H.jlist[m_fill] = j;
	H.val[m_fill] = calculate_H( sqrt(r_sqr), shld[type[i]][type[j]] );
	m_fill++;
+10 −0
Original line number Diff line number Diff line
@@ -11,6 +11,16 @@
   See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */

/* ----------------------------------------------------------------------
   Contributing author: Hasan Metin Aktulga, Purdue University
   (now at Lawrence Berkeley National Laboratory, hmaktulga@lbl.gov)

   Please cite the related publication:
   H. M. Aktulga, J. C. Fogarty, S. A. Pandit, A. Y. Grama,
   "Parallel Reactive Molecular Dynamics: Numerical Methods and
   Algorithmic Techniques", Parallel Computing, in press.
------------------------------------------------------------------------- */

#ifdef FIX_CLASS

FixStyle(qeq/reax,FixQEqReax)
+6 −0
Original line number Diff line number Diff line
@@ -13,6 +13,12 @@

/* ----------------------------------------------------------------------
   Contributing author: Hasan Metin Aktulga, Purdue University
   (now at Lawrence Berkeley National Laboratory, hmaktulga@lbl.gov)

   Please cite the related publication:
   H. M. Aktulga, J. C. Fogarty, S. A. Pandit, A. Y. Grama,
   "Parallel Reactive Molecular Dynamics: Numerical Methods and
   Algorithmic Techniques", Parallel Computing, in press.
------------------------------------------------------------------------- */

#include "fix_reax_c.h"
+10 −0
Original line number Diff line number Diff line
@@ -11,6 +11,16 @@
   See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */

/* ----------------------------------------------------------------------
   Contributing author: Hasan Metin Aktulga, Purdue University
   (now at Lawrence Berkeley National Laboratory, hmaktulga@lbl.gov)

   Please cite the related publication:
   H. M. Aktulga, J. C. Fogarty, S. A. Pandit, A. Y. Grama,
   "Parallel Reactive Molecular Dynamics: Numerical Methods and
   Algorithmic Techniques", Parallel Computing, in press.
------------------------------------------------------------------------- */

#ifdef FIX_CLASS

FixStyle(REAXC,FixReaxC)
Loading