diff --git a/src/USER-REAXC/README b/src/USER-REAXC/README index 8239788048..85ee8ed518 100644 --- a/src/USER-REAXC/README +++ b/src/USER-REAXC/README @@ -1,18 +1,9 @@ -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 diff --git a/src/USER-REAXC/fix_qeq_reax.cpp b/src/USER-REAXC/fix_qeq_reax.cpp index 102faab8bc..0c7784aadd 100644 --- a/src/USER-REAXC/fix_qeq_reax.cpp +++ b/src/USER-REAXC/fix_qeq_reax.cpp @@ -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,19 +477,20 @@ 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; ilist = list->ilist; numneigh = list->numneigh; firstneigh = list->firstneigh; - + // fill in the H matrix m_fill = 0; r_sqr = 0; @@ -495,16 +499,30 @@ void FixQEqReax::compute_H() jlist = firstneigh[i]; jnum = numneigh[i]; H.firstnbr[i] = m_fill; - + 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++; diff --git a/src/USER-REAXC/fix_qeq_reax.h b/src/USER-REAXC/fix_qeq_reax.h index ceb3814304..9bab44179b 100644 --- a/src/USER-REAXC/fix_qeq_reax.h +++ b/src/USER-REAXC/fix_qeq_reax.h @@ -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) diff --git a/src/USER-REAXC/fix_reax_c.cpp b/src/USER-REAXC/fix_reax_c.cpp index 6fb9b5c077..f979bef1e0 100644 --- a/src/USER-REAXC/fix_reax_c.cpp +++ b/src/USER-REAXC/fix_reax_c.cpp @@ -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" diff --git a/src/USER-REAXC/fix_reax_c.h b/src/USER-REAXC/fix_reax_c.h index 8f663f7327..c54636ef51 100644 --- a/src/USER-REAXC/fix_reax_c.h +++ b/src/USER-REAXC/fix_reax_c.h @@ -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) diff --git a/src/USER-REAXC/pair_reax_c.cpp b/src/USER-REAXC/pair_reax_c.cpp index d13fef914b..023dc2db36 100644 --- a/src/USER-REAXC/pair_reax_c.cpp +++ b/src/USER-REAXC/pair_reax_c.cpp @@ -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 "pair_reax_c.h" @@ -27,7 +33,6 @@ #include "fix.h" #include "fix_reax_c.h" #include "memory.h" -#include "domain.h" #include "error.h" #include "reaxc_types.h" @@ -379,9 +384,6 @@ void PairReaxC::compute(int eflag, int vflag) double evdwl,ecoul; double t_start, t_end; - if (domain->xprd < cutmax || domain->yprd < cutmax || domain->zprd < cutmax) - error->warning("PairReaxC cutoff greater than periodic dimension"); - // communicate num_bonds once every reneighboring // 2 num arrays stored by fix, grab ptr to them @@ -628,16 +630,17 @@ int PairReaxC::estimate_reax_lists() int PairReaxC::write_reax_lists() { - int itr_i, itr_j, itr_g, i, j, g; + int itr_i, itr_j, itr_g, i, j, g, flag; int nlocal, nghost, num_nbrs; - int *ilist, *jlist, *numneigh, **firstneigh, *marked; + int *ilist, *jlist, *numneigh, **firstneigh, *marked, *tag; double d_sqr, g_d, g_d_sqr; rvec dvec, g_dvec; - double *dist, **x; + double *dist, **x, SMALL = 0.0001; reax_list *far_nbrs; far_neighbor_data *far_list; x = atom->x; + tag = atom->tag; nlocal = atom->nlocal; nghost = atom->nghost; ilist = list->ilist; diff --git a/src/USER-REAXC/pair_reax_c.h b/src/USER-REAXC/pair_reax_c.h index 4bf53f91c1..89c38ef9ae 100644 --- a/src/USER-REAXC/pair_reax_c.h +++ b/src/USER-REAXC/pair_reax_c.h @@ -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 PAIR_CLASS PairStyle(reax/c,PairReaxC) diff --git a/src/USER-REAXC/reaxc_allocate.cpp b/src/USER-REAXC/reaxc_allocate.cpp index e31c86d491..5a1eb6b986 100644 --- a/src/USER-REAXC/reaxc_allocate.cpp +++ b/src/USER-REAXC/reaxc_allocate.cpp @@ -1,12 +1,17 @@ /*---------------------------------------------------------------------- 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 @@ -744,7 +749,7 @@ void ReAllocate( reax_system *system, control_params *control, { int i, j, k, p; int num_bonds, est_3body, nflag, Nflag, Hflag, mpi_flag, ret, total_send; - int renbr; + int renbr, newsize; reallocate_data *realloc; reax_list *far_nbrs; sparse_matrix *H; @@ -781,14 +786,14 @@ void ReAllocate( reax_system *system, control_params *control, if( system->n >= DANGER_ZONE * system->local_cap || (0 && system->n <= LOOSE_ZONE * system->local_cap) ) { nflag = 1; - system->local_cap = (int)(system->n * SAFE_ZONE); + system->local_cap = MAX( (int)(system->n * SAFE_ZONE), MIN_CAP ); } Nflag = 0; if( system->N >= DANGER_ZONE * system->total_cap || (0 && system->N <= LOOSE_ZONE * system->total_cap) ) { Nflag = 1; - system->total_cap = (int)(system->N * SAFE_ZONE); + system->total_cap = MAX( (int)(system->N * SAFE_ZONE), MIN_CAP ); } if( Nflag ) { @@ -831,15 +836,16 @@ void ReAllocate( reax_system *system, control_params *control, data->step, realloc->num_far, far_nbrs->num_intrs ); MPI_Abort( comm, INSUFFICIENT_MEMORY ); } + + newsize = static_cast + (MAX( realloc->num_far*SAFE_ZONE, MIN_CAP*MIN_NBRS )); #if defined(DEBUG_FOCUS) fprintf( stderr, "p%d: reallocating far_nbrs: num_fars=%d, space=%dMB\n", system->my_rank, (int)(realloc->num_far*SAFE_ZONE), - (int)(realloc->num_far*SAFE_ZONE*sizeof(far_neighbor_data)/ - (1024*1024)) ); -#endif - Reallocate_Neighbor_List( far_nbrs, system->total_cap, - (int)(realloc->num_far*SAFE_ZONE), - comm ); + (newsize*sizeof(far_neighbor_data)/(1024*1024)) ); +#endif + + Reallocate_Neighbor_List( far_nbrs, system->total_cap, newsize, comm ); realloc->num_far = 0; } } @@ -860,8 +866,11 @@ void ReAllocate( reax_system *system, control_params *control, (int)(realloc->Htop * SAFE_ZONE * sizeof(sparse_matrix_entry) / (1024*1024)) ); #endif + + newsize = static_cast + (MAX( realloc->Htop*SAFE_ZONE, MIN_CAP*MIN_NBRS )); Reallocate_Matrix( &(workspace->H), system->local_cap, - realloc->Htop*SAFE_ZONE, "H", comm ); + newsize, "H", comm ); //Deallocate_Matrix( workspace->L ); //Deallocate_Matrix( workspace->U ); workspace->L = NULL; @@ -876,7 +885,7 @@ void ReAllocate( reax_system *system, control_params *control, if( system->numH >= DANGER_ZONE * system->Hcap || (0 && system->numH <= LOOSE_ZONE * system->Hcap) ) { Hflag = 1; - system->Hcap = (int)(system->numH * SAFE_ZONE); + system->Hcap = MAX( system->numH * SAFER_ZONE, MIN_CAP ); } if( Hflag || realloc->hbonds ) { diff --git a/src/USER-REAXC/reaxc_allocate.h b/src/USER-REAXC/reaxc_allocate.h index 04e24c67ec..e3d9049c57 100644 --- a/src/USER-REAXC/reaxc_allocate.h +++ b/src/USER-REAXC/reaxc_allocate.h @@ -1,12 +1,17 @@ /*---------------------------------------------------------------------- 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 diff --git a/src/USER-REAXC/reaxc_basic_comm.cpp b/src/USER-REAXC/reaxc_basic_comm.cpp index 16a46a03d8..4be0157936 100644 --- a/src/USER-REAXC/reaxc_basic_comm.cpp +++ b/src/USER-REAXC/reaxc_basic_comm.cpp @@ -1,12 +1,17 @@ /*---------------------------------------------------------------------- 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 diff --git a/src/USER-REAXC/reaxc_basic_comm.h b/src/USER-REAXC/reaxc_basic_comm.h index 986f95a175..de9f7a5316 100644 --- a/src/USER-REAXC/reaxc_basic_comm.h +++ b/src/USER-REAXC/reaxc_basic_comm.h @@ -1,12 +1,17 @@ /*---------------------------------------------------------------------- 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 diff --git a/src/USER-REAXC/reaxc_bond_orders.cpp b/src/USER-REAXC/reaxc_bond_orders.cpp index 26c1648a77..7649181f57 100644 --- a/src/USER-REAXC/reaxc_bond_orders.cpp +++ b/src/USER-REAXC/reaxc_bond_orders.cpp @@ -1,12 +1,17 @@ /*---------------------------------------------------------------------- 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 diff --git a/src/USER-REAXC/reaxc_bond_orders.h b/src/USER-REAXC/reaxc_bond_orders.h index 0ad8e3b836..cf8b1e6f00 100644 --- a/src/USER-REAXC/reaxc_bond_orders.h +++ b/src/USER-REAXC/reaxc_bond_orders.h @@ -1,12 +1,17 @@ /*---------------------------------------------------------------------- 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 diff --git a/src/USER-REAXC/reaxc_bonds.cpp b/src/USER-REAXC/reaxc_bonds.cpp index 70e0b644f2..6c83d41105 100644 --- a/src/USER-REAXC/reaxc_bonds.cpp +++ b/src/USER-REAXC/reaxc_bonds.cpp @@ -1,12 +1,17 @@ /*---------------------------------------------------------------------- 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 diff --git a/src/USER-REAXC/reaxc_bonds.h b/src/USER-REAXC/reaxc_bonds.h index bf8c111775..5a911cb21a 100644 --- a/src/USER-REAXC/reaxc_bonds.h +++ b/src/USER-REAXC/reaxc_bonds.h @@ -1,12 +1,17 @@ /*---------------------------------------------------------------------- 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 diff --git a/src/USER-REAXC/reaxc_control.cpp b/src/USER-REAXC/reaxc_control.cpp index 7a72a1ee6f..8773f7f059 100644 --- a/src/USER-REAXC/reaxc_control.cpp +++ b/src/USER-REAXC/reaxc_control.cpp @@ -1,12 +1,17 @@ /*---------------------------------------------------------------------- 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 diff --git a/src/USER-REAXC/reaxc_control.h b/src/USER-REAXC/reaxc_control.h index 68fd33c95d..f453ed5e60 100644 --- a/src/USER-REAXC/reaxc_control.h +++ b/src/USER-REAXC/reaxc_control.h @@ -1,12 +1,17 @@ /*---------------------------------------------------------------------- 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 diff --git a/src/USER-REAXC/reaxc_defs.h b/src/USER-REAXC/reaxc_defs.h index 957816d38a..52fc5487e3 100644 --- a/src/USER-REAXC/reaxc_defs.h +++ b/src/USER-REAXC/reaxc_defs.h @@ -1,12 +1,17 @@ /*---------------------------------------------------------------------- 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 diff --git a/src/USER-REAXC/reaxc_ffield.cpp b/src/USER-REAXC/reaxc_ffield.cpp index 2d0f37123d..3dc310b841 100644 --- a/src/USER-REAXC/reaxc_ffield.cpp +++ b/src/USER-REAXC/reaxc_ffield.cpp @@ -1,12 +1,17 @@ /*---------------------------------------------------------------------- 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 diff --git a/src/USER-REAXC/reaxc_ffield.h b/src/USER-REAXC/reaxc_ffield.h index 22a580f7f8..b4632b6379 100644 --- a/src/USER-REAXC/reaxc_ffield.h +++ b/src/USER-REAXC/reaxc_ffield.h @@ -1,12 +1,17 @@ /*---------------------------------------------------------------------- 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 diff --git a/src/USER-REAXC/reaxc_forces.cpp b/src/USER-REAXC/reaxc_forces.cpp index b1d5874683..82ccebd61f 100644 --- a/src/USER-REAXC/reaxc_forces.cpp +++ b/src/USER-REAXC/reaxc_forces.cpp @@ -1,12 +1,17 @@ /*---------------------------------------------------------------------- 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 diff --git a/src/USER-REAXC/reaxc_forces.h b/src/USER-REAXC/reaxc_forces.h index 6723bc9660..fe97a7121c 100644 --- a/src/USER-REAXC/reaxc_forces.h +++ b/src/USER-REAXC/reaxc_forces.h @@ -1,12 +1,17 @@ /*---------------------------------------------------------------------- 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 diff --git a/src/USER-REAXC/reaxc_hydrogen_bonds.cpp b/src/USER-REAXC/reaxc_hydrogen_bonds.cpp index 86013abcbd..14e65ba225 100644 --- a/src/USER-REAXC/reaxc_hydrogen_bonds.cpp +++ b/src/USER-REAXC/reaxc_hydrogen_bonds.cpp @@ -1,12 +1,17 @@ /*---------------------------------------------------------------------- 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 diff --git a/src/USER-REAXC/reaxc_hydrogen_bonds.h b/src/USER-REAXC/reaxc_hydrogen_bonds.h index bb26928d62..f25b669440 100644 --- a/src/USER-REAXC/reaxc_hydrogen_bonds.h +++ b/src/USER-REAXC/reaxc_hydrogen_bonds.h @@ -1,12 +1,17 @@ /*---------------------------------------------------------------------- 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 diff --git a/src/USER-REAXC/reaxc_init_md.cpp b/src/USER-REAXC/reaxc_init_md.cpp index 52466eaec9..a2d828cd9c 100644 --- a/src/USER-REAXC/reaxc_init_md.cpp +++ b/src/USER-REAXC/reaxc_init_md.cpp @@ -1,12 +1,17 @@ /*---------------------------------------------------------------------- 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 diff --git a/src/USER-REAXC/reaxc_init_md.h b/src/USER-REAXC/reaxc_init_md.h index c7896f6821..26990dfdec 100644 --- a/src/USER-REAXC/reaxc_init_md.h +++ b/src/USER-REAXC/reaxc_init_md.h @@ -1,12 +1,17 @@ /*---------------------------------------------------------------------- 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 diff --git a/src/USER-REAXC/reaxc_io_tools.cpp b/src/USER-REAXC/reaxc_io_tools.cpp index 4020a3785e..de8830678a 100644 --- a/src/USER-REAXC/reaxc_io_tools.cpp +++ b/src/USER-REAXC/reaxc_io_tools.cpp @@ -1,12 +1,17 @@ /*---------------------------------------------------------------------- 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 diff --git a/src/USER-REAXC/reaxc_io_tools.h b/src/USER-REAXC/reaxc_io_tools.h index c009f14df7..4bca170fe5 100644 --- a/src/USER-REAXC/reaxc_io_tools.h +++ b/src/USER-REAXC/reaxc_io_tools.h @@ -1,12 +1,17 @@ /*---------------------------------------------------------------------- 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 diff --git a/src/USER-REAXC/reaxc_list.cpp b/src/USER-REAXC/reaxc_list.cpp index 0ea3d7d875..8e77fe185e 100644 --- a/src/USER-REAXC/reaxc_list.cpp +++ b/src/USER-REAXC/reaxc_list.cpp @@ -1,12 +1,17 @@ /*---------------------------------------------------------------------- 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 diff --git a/src/USER-REAXC/reaxc_list.h b/src/USER-REAXC/reaxc_list.h index cca217dbf7..39ca1b973e 100644 --- a/src/USER-REAXC/reaxc_list.h +++ b/src/USER-REAXC/reaxc_list.h @@ -1,12 +1,17 @@ /*---------------------------------------------------------------------- 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 diff --git a/src/USER-REAXC/reaxc_lookup.cpp b/src/USER-REAXC/reaxc_lookup.cpp index a4b851b9d8..0c42204610 100644 --- a/src/USER-REAXC/reaxc_lookup.cpp +++ b/src/USER-REAXC/reaxc_lookup.cpp @@ -1,12 +1,17 @@ /*---------------------------------------------------------------------- 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 diff --git a/src/USER-REAXC/reaxc_lookup.h b/src/USER-REAXC/reaxc_lookup.h index 28658386b4..437f26bc77 100644 --- a/src/USER-REAXC/reaxc_lookup.h +++ b/src/USER-REAXC/reaxc_lookup.h @@ -1,12 +1,17 @@ /*---------------------------------------------------------------------- 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 diff --git a/src/USER-REAXC/reaxc_multi_body.cpp b/src/USER-REAXC/reaxc_multi_body.cpp index 44f3b1bcf3..f53b4709c1 100644 --- a/src/USER-REAXC/reaxc_multi_body.cpp +++ b/src/USER-REAXC/reaxc_multi_body.cpp @@ -1,12 +1,17 @@ /*---------------------------------------------------------------------- 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 diff --git a/src/USER-REAXC/reaxc_multi_body.h b/src/USER-REAXC/reaxc_multi_body.h index dcd11fc7e7..ba43b31a6d 100644 --- a/src/USER-REAXC/reaxc_multi_body.h +++ b/src/USER-REAXC/reaxc_multi_body.h @@ -1,12 +1,17 @@ /*---------------------------------------------------------------------- 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 diff --git a/src/USER-REAXC/reaxc_nonbonded.cpp b/src/USER-REAXC/reaxc_nonbonded.cpp index ed475606fa..eabbc16d76 100644 --- a/src/USER-REAXC/reaxc_nonbonded.cpp +++ b/src/USER-REAXC/reaxc_nonbonded.cpp @@ -1,12 +1,17 @@ /*---------------------------------------------------------------------- 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 @@ -38,13 +43,13 @@ void vdW_Coulomb_Energy( reax_system *system, control_params *control, reax_list **lists, output_controls *out_control ) { int i, j, pj, natoms; - int start_i, end_i, orig_i, orig_j; + int start_i, end_i, orig_i, orig_j, flag; real p_vdW1, p_vdW1i; real powr_vdW1, powgi_vdW1; real tmp, r_ij, fn13, exp1, exp2; real Tap, dTap, dfn13, CEvd, CEclmb, de_core; real dr3gamij_1, dr3gamij_3; - real e_ele, e_vdW, e_core; + real e_ele, e_vdW, e_core, SMALL = 0.0001; rvec temp, ext_press; two_body_parameters *twbp; far_neighbor_data *nbr_pj; @@ -69,9 +74,27 @@ void vdW_Coulomb_Energy( reax_system *system, control_params *control, j = nbr_pj->nbr; orig_j = system->my_atoms[j].orig_id; +#if defined(PURE_REAX) if( nbr_pj->d <= control->nonb_cut && (j < natoms || orig_i < orig_j) ) { - r_ij = nbr_pj->d; - twbp = &(system->reax_param.tbp[ system->my_atoms[i].type ] +#elif defined(LAMMPS_REAX) + flag = 0; + if(nbr_pj->d <= control->nonb_cut) { + if (j < natoms) flag = 1; + else if (orig_i < orig_j) flag = 1; + else if (orig_i == orig_j) { + if (nbr_pj->dvec[2] > SMALL) flag = 1; + else if (fabs(nbr_pj->dvec[2]) < SMALL) { + if (nbr_pj->dvec[1] > SMALL) flag = 1; + else if (fabs(nbr_pj->dvec[1]) < SMALL && nbr_pj->dvec[0] > SMALL) + flag = 1; + } + } + } + + if (flag) { +#endif + r_ij = nbr_pj->d; + twbp = &(system->reax_param.tbp[ system->my_atoms[i].type ] [ system->my_atoms[j].type ]); /* Calculate Taper and its derivative */ @@ -212,10 +235,10 @@ void Tabulated_vdW_Coulomb_Energy( reax_system *system,control_params *control, { int i, j, pj, r, natoms, steps, update_freq, update_energies; int type_i, type_j, tmin, tmax; - int start_i, end_i, orig_i, orig_j; + int start_i, end_i, orig_i, orig_j, flag; real r_ij, base, dif; real e_vdW, e_ele; - real CEvd, CEclmb; + real CEvd, CEclmb, SMALL = 0.0001; rvec temp, ext_press; far_neighbor_data *nbr_pj; reax_list *far_nbrs; @@ -239,7 +262,25 @@ void Tabulated_vdW_Coulomb_Energy( reax_system *system,control_params *control, j = nbr_pj->nbr; orig_j = system->my_atoms[j].orig_id; +#if defined(PURE_REAX) if( nbr_pj->d <= control->nonb_cut && (j < natoms || orig_i < orig_j) ) { +#elif defined(LAMMPS_REAX) + flag = 0; + if(nbr_pj->d <= control->nonb_cut) { + if (j < natoms) flag = 1; + else if (orig_i < orig_j) flag = 1; + else if (orig_i == orig_j) { + if (nbr_pj->dvec[2] > SMALL) flag = 1; + else if (fabs(nbr_pj->dvec[2]) < SMALL) { + if (nbr_pj->dvec[1] > SMALL) flag = 1; + else if (fabs(nbr_pj->dvec[1]) < SMALL && nbr_pj->dvec[0] > SMALL) + flag = 1; + } + } + } + + if (flag) { +#endif j = nbr_pj->nbr; type_j = system->my_atoms[j].type; r_ij = nbr_pj->d; diff --git a/src/USER-REAXC/reaxc_nonbonded.h b/src/USER-REAXC/reaxc_nonbonded.h index 7e418d43e1..81a53d82ec 100644 --- a/src/USER-REAXC/reaxc_nonbonded.h +++ b/src/USER-REAXC/reaxc_nonbonded.h @@ -1,12 +1,17 @@ /*---------------------------------------------------------------------- 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 diff --git a/src/USER-REAXC/reaxc_reset_tools.cpp b/src/USER-REAXC/reaxc_reset_tools.cpp index 7b7141f5a5..cc74118fcb 100644 --- a/src/USER-REAXC/reaxc_reset_tools.cpp +++ b/src/USER-REAXC/reaxc_reset_tools.cpp @@ -1,12 +1,17 @@ /*---------------------------------------------------------------------- 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 diff --git a/src/USER-REAXC/reaxc_reset_tools.h b/src/USER-REAXC/reaxc_reset_tools.h index 988883dfe7..1662813a5c 100644 --- a/src/USER-REAXC/reaxc_reset_tools.h +++ b/src/USER-REAXC/reaxc_reset_tools.h @@ -1,12 +1,17 @@ /*---------------------------------------------------------------------- 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 diff --git a/src/USER-REAXC/reaxc_system_props.cpp b/src/USER-REAXC/reaxc_system_props.cpp index 9997394afa..81bee6c9d7 100644 --- a/src/USER-REAXC/reaxc_system_props.cpp +++ b/src/USER-REAXC/reaxc_system_props.cpp @@ -1,12 +1,17 @@ /*---------------------------------------------------------------------- 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 diff --git a/src/USER-REAXC/reaxc_system_props.h b/src/USER-REAXC/reaxc_system_props.h index 712a6f679f..fb1cc40e60 100644 --- a/src/USER-REAXC/reaxc_system_props.h +++ b/src/USER-REAXC/reaxc_system_props.h @@ -1,12 +1,17 @@ /*---------------------------------------------------------------------- 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 diff --git a/src/USER-REAXC/reaxc_tool_box.cpp b/src/USER-REAXC/reaxc_tool_box.cpp index 074921248c..a27b5030d4 100644 --- a/src/USER-REAXC/reaxc_tool_box.cpp +++ b/src/USER-REAXC/reaxc_tool_box.cpp @@ -1,12 +1,17 @@ /*---------------------------------------------------------------------- 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 diff --git a/src/USER-REAXC/reaxc_tool_box.h b/src/USER-REAXC/reaxc_tool_box.h index 9a0b60247b..b6666abe4f 100644 --- a/src/USER-REAXC/reaxc_tool_box.h +++ b/src/USER-REAXC/reaxc_tool_box.h @@ -1,12 +1,17 @@ /*---------------------------------------------------------------------- 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 diff --git a/src/USER-REAXC/reaxc_torsion_angles.cpp b/src/USER-REAXC/reaxc_torsion_angles.cpp index f1afe3c3a6..33b1c5568f 100644 --- a/src/USER-REAXC/reaxc_torsion_angles.cpp +++ b/src/USER-REAXC/reaxc_torsion_angles.cpp @@ -1,12 +1,17 @@ /*---------------------------------------------------------------------- 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 diff --git a/src/USER-REAXC/reaxc_torsion_angles.h b/src/USER-REAXC/reaxc_torsion_angles.h index d3c25501e6..a34ef7709e 100644 --- a/src/USER-REAXC/reaxc_torsion_angles.h +++ b/src/USER-REAXC/reaxc_torsion_angles.h @@ -1,12 +1,17 @@ /*---------------------------------------------------------------------- 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 diff --git a/src/USER-REAXC/reaxc_traj.cpp b/src/USER-REAXC/reaxc_traj.cpp index 0aaa413156..89f178b3ad 100644 --- a/src/USER-REAXC/reaxc_traj.cpp +++ b/src/USER-REAXC/reaxc_traj.cpp @@ -1,12 +1,17 @@ /*---------------------------------------------------------------------- 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 diff --git a/src/USER-REAXC/reaxc_traj.h b/src/USER-REAXC/reaxc_traj.h index 99e0c5223a..074e65df28 100644 --- a/src/USER-REAXC/reaxc_traj.h +++ b/src/USER-REAXC/reaxc_traj.h @@ -1,12 +1,17 @@ /*---------------------------------------------------------------------- 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 diff --git a/src/USER-REAXC/reaxc_types.h b/src/USER-REAXC/reaxc_types.h index be0378de39..b288ceff3f 100644 --- a/src/USER-REAXC/reaxc_types.h +++ b/src/USER-REAXC/reaxc_types.h @@ -1,12 +1,17 @@ /*---------------------------------------------------------------------- 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 diff --git a/src/USER-REAXC/reaxc_valence_angles.cpp b/src/USER-REAXC/reaxc_valence_angles.cpp index 44137cde22..c2ee9408c4 100644 --- a/src/USER-REAXC/reaxc_valence_angles.cpp +++ b/src/USER-REAXC/reaxc_valence_angles.cpp @@ -1,12 +1,17 @@ /*---------------------------------------------------------------------- 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 diff --git a/src/USER-REAXC/reaxc_valence_angles.h b/src/USER-REAXC/reaxc_valence_angles.h index ac27db483d..21cb5ec451 100644 --- a/src/USER-REAXC/reaxc_valence_angles.h +++ b/src/USER-REAXC/reaxc_valence_angles.h @@ -1,12 +1,17 @@ /*---------------------------------------------------------------------- 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 diff --git a/src/USER-REAXC/reaxc_vector.cpp b/src/USER-REAXC/reaxc_vector.cpp index 77feddf9dd..490af6ef61 100644 --- a/src/USER-REAXC/reaxc_vector.cpp +++ b/src/USER-REAXC/reaxc_vector.cpp @@ -2,11 +2,16 @@ 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 diff --git a/src/USER-REAXC/reaxc_vector.h b/src/USER-REAXC/reaxc_vector.h index 3771406478..b3bdba4025 100644 --- a/src/USER-REAXC/reaxc_vector.h +++ b/src/USER-REAXC/reaxc_vector.h @@ -1,12 +1,17 @@ /*---------------------------------------------------------------------- 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