diff --git a/doc/src/fix_adapt_fep.rst b/doc/src/fix_adapt_fep.rst index c35986de49..1b2298cd96 100644 --- a/doc/src/fix_adapt_fep.rst +++ b/doc/src/fix_adapt_fep.rst @@ -307,7 +307,9 @@ the :doc:`run ` command. This fix is not invoked during Restrictions """""""""""" - none + +The keyword "scale yes" is not supported for scaling per-atom parameters +diameter and change. You can use :doc:`fix adapt ` for those. Related commands """""""""""""""" diff --git a/src/FEP/fix_adapt_fep.cpp b/src/FEP/fix_adapt_fep.cpp index e050b8cf21..c32b44b081 100644 --- a/src/FEP/fix_adapt_fep.cpp +++ b/src/FEP/fix_adapt_fep.cpp @@ -40,8 +40,8 @@ using namespace LAMMPS_NS; using namespace FixConst; using namespace MathConst; -enum{PAIR,KSPACE,ATOM}; -enum{DIAMETER,CHARGE}; +enum{PAIR, KSPACE, ATOM}; +enum{DIAMETER, CHARGE}; /* ---------------------------------------------------------------------- */ @@ -165,21 +165,21 @@ FixAdaptFEP::FixAdaptFEP(LAMMPS *lmp, int narg, char **arg) : FixAdaptFEP::~FixAdaptFEP() { for (int m = 0; m < nadapt; m++) { - delete [] adapt[m].var; + delete[] adapt[m].var; if (adapt[m].which == PAIR) { - delete [] adapt[m].pstyle; - delete [] adapt[m].pparam; + delete[] adapt[m].pstyle; + delete[] adapt[m].pparam; memory->destroy(adapt[m].array_orig); } } - delete [] adapt; + delete[] adapt; // check nfix in case all fixes have already been deleted if (id_fix_diam && modify->nfix) modify->delete_fix(id_fix_diam); if (id_fix_chg && modify->nfix) modify->delete_fix(id_fix_chg); - delete [] id_fix_diam; - delete [] id_fix_chg; + delete[] id_fix_diam; + delete[] id_fix_chg; } /* ---------------------------------------------------------------------- */ @@ -434,6 +434,8 @@ void FixAdaptFEP::change_settings() } else if (ad->which == ATOM) { + if (scaleflag) + error->all(FLERR, "Keyword 'scale yes' is not supported with fix adapt/fep for 'atom'"); // reset radius from diameter // also scale rmass to new value diff --git a/src/fix_adapt.cpp b/src/fix_adapt.cpp index 660e3f6107..996597ab8b 100644 --- a/src/fix_adapt.cpp +++ b/src/fix_adapt.cpp @@ -39,8 +39,8 @@ using namespace LAMMPS_NS; using namespace FixConst; using namespace MathConst; -enum{PAIR,KSPACE,ATOM,BOND,ANGLE}; -enum{DIAMETER,CHARGE}; +enum{PAIR, KSPACE, ATOM, BOND, ANGLE}; +enum{DIAMETER, CHARGE}; /* ---------------------------------------------------------------------- */