forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@12631 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
13ebe937e2
commit
a9906d1023
|
@ -188,6 +188,8 @@ FixAdaptFEP::~FixAdaptFEP()
|
|||
}
|
||||
delete [] adapt;
|
||||
|
||||
if (force->kspace) force->kspace->qsum_update_flag = 0;
|
||||
|
||||
// check nfix in case all fixes have already been deleted
|
||||
|
||||
if (id_fix_diam && modify->nfix) modify->delete_fix(id_fix_diam);
|
||||
|
@ -289,7 +291,9 @@ void FixAdaptFEP::init()
|
|||
if (adapt[i].which == ATOM)
|
||||
error->all(FLERR,"Cannot use dynamic group with fix adapt/fep atom");
|
||||
|
||||
// when using kspace, we need to recompute some additional parameters in kspace->setup()
|
||||
// when using kspace, we need to recompute
|
||||
// some additional parameters in kspace->setup()
|
||||
|
||||
if (force->kspace) force->kspace->qsum_update_flag = 1;
|
||||
|
||||
// setup and error checks
|
||||
|
@ -506,13 +510,13 @@ void FixAdaptFEP::change_settings()
|
|||
|
||||
if (anypair) force->pair->reinit();
|
||||
|
||||
if (force->kspace)
|
||||
force->kspace->setup();
|
||||
// re-setup KSpace if using it, since charges may have changed
|
||||
|
||||
if (force->kspace) force->kspace->setup();
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
restore pair,kspace.atom parameters to original values
|
||||
restore pair,kspace,atom parameters to original values
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void FixAdaptFEP::restore_settings()
|
||||
|
@ -561,6 +565,5 @@ void FixAdaptFEP::restore_settings()
|
|||
}
|
||||
|
||||
if (anypair) force->pair->reinit();
|
||||
|
||||
if (force->kspace) force->kspace->setup();
|
||||
}
|
||||
|
|
|
@ -174,6 +174,8 @@ FixAdapt::~FixAdapt()
|
|||
}
|
||||
delete [] adapt;
|
||||
|
||||
if (chgflag && force->kspace) force->kspace->qsum_update_flag = 0;
|
||||
|
||||
// check nfix in case all fixes have already been deleted
|
||||
|
||||
if (id_fix_diam && modify->nfix) modify->delete_fix(id_fix_diam);
|
||||
|
@ -349,6 +351,11 @@ void FixAdapt::init()
|
|||
}
|
||||
}
|
||||
|
||||
// when adapting charge and using kspace,
|
||||
// need to recompute additional params in kspace->setup()
|
||||
|
||||
if (chgflag && force->kspace) force->kspace->qsum_update_flag = 1;
|
||||
|
||||
// fixes that store initial per-atom values
|
||||
|
||||
if (id_fix_diam) {
|
||||
|
@ -475,6 +482,11 @@ void FixAdapt::change_settings()
|
|||
// and also offset and tail corrections
|
||||
|
||||
if (anypair) force->pair->reinit();
|
||||
|
||||
// re-setup KSpace if it exists and adapting charges
|
||||
// since charges have changed
|
||||
|
||||
if (chgflag && force->kspace) force->kspace->setup();
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
@ -527,4 +539,5 @@ void FixAdapt::restore_settings()
|
|||
}
|
||||
|
||||
if (anypair) force->pair->reinit();
|
||||
if (chgflag && force->kspace) force->kspace->setup();
|
||||
}
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "force.h"
|
||||
#include "group.h"
|
||||
#include "comm.h"
|
||||
#include "neighbor.h"
|
||||
#include "irregular.h"
|
||||
#include "modify.h"
|
||||
#include "fix_deform.h"
|
||||
|
|
Loading…
Reference in New Issue