Added atom map into example, enforce atom map added to fix_numdiff, added error statement to fix_numdiff.h

This commit is contained in:
Sievers 2020-03-09 10:33:04 -06:00
parent 606eaf61f7
commit 903e33d86e
3 changed files with 8 additions and 0 deletions

View File

@ -3,6 +3,7 @@
units metal
atom_style atomic
atom_modify map yes
lattice fcc 5.358000
region box block 0 6 0 6 0 6
create_box 1 box

View File

@ -72,6 +72,9 @@ FixNumDiff::FixNumDiff(LAMMPS *lmp, int narg, char **arg) :
temp_x = NULL;
temp_f = NULL;
if (atom->map_style == 0)
error->all(FLERR,"Fix_numdiff requires an atom map, see atom_modify");
// perform initial allocation of atom-based arrays
// zero numdiff_forces since dump may access it on timestep 0
// zero numdiff_forces since a variable may access it before first run

View File

@ -73,6 +73,10 @@ Self-explanatory. Check the input script syntax and compare to the
documentation for the command. You can use -echo screen as a
command-line option when running LAMMPS to see the offending line.
E: Fix_numdiff requires an atom map, see atom_modify
Self-explanatory.
E: Compute ID for fix numdiff does not exist
Self-explanatory.