modifications in dihedral & dihedral_hybrid

This commit is contained in:
Evangelos Voyiatzis
2025-04-04 17:00:52 +02:00
committed by GitHub
parent ccd6eeb8af
commit 54d7f46151
4 changed files with 28 additions and 0 deletions

View File

@ -33,6 +33,7 @@ Dihedral::Dihedral(LAMMPS *_lmp) : Pointers(_lmp)
{
energy = 0.0;
writedata = 0;
reinitflag = 1;
allocated = 0;
suffix_flag = Suffix::NONE;
@ -428,3 +429,15 @@ double Dihedral::memory_usage()
bytes += (double) comm->nthreads * maxcvatom * 9 * sizeof(double);
return bytes;
}
/* -----------------------------------------------------------------------
reset all type-based dihedral params via init()
-------------------------------------------------------------------------- */
void Dihedral::reinit()
{
if (!reinitflag)
error->all(FLERR, "Fix adapt interface to this dihedral style not supported");
init();
}