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

This commit is contained in:
sjplimp
2015-07-24 15:50:34 +00:00
parent 303d9b9f54
commit e91bd244af
10 changed files with 254 additions and 5 deletions

View File

@ -18,6 +18,8 @@
#include "atom_vec.h"
#include "force.h"
#include "comm.h"
#include "modify.h"
#include "fix.h"
#include "accelerator_kokkos.h"
#include "memory.h"
#include "error.h"
@ -191,6 +193,7 @@ void Special::build()
force->special_lj[3] == 1.0 && force->special_coul[3] == 1.0) {
dedup();
combine();
fix_alteration();
return;
}
@ -307,6 +310,7 @@ void Special::build()
dedup();
if (force->special_angle) angle_trim();
combine();
fix_alteration();
return;
}
@ -419,6 +423,7 @@ void Special::build()
if (force->special_angle) angle_trim();
if (force->special_dihedral) dihedral_trim();
combine();
fix_alteration();
}
/* ----------------------------------------------------------------------
@ -1127,3 +1132,17 @@ void Special::ring_eight(int ndatum, char *cbuf)
i += 2;
}
}
/* ----------------------------------------------------------------------
allow fixes to alter special list
currently, only fix drude does this
so that both the Drude core and electron are same level of neighbor
------------------------------------------------------------------------- */
void Special::fix_alteration()
{
for (int ifix = 0; ifix < modify->nfix; ifix++)
if (modify->fix[ifix]->special_alter_flag)
modify->fix[ifix]->rebuild_special();
}