always return integers for counts

previously, atom, bond, angles, dihedral and improper counts were normalized by natoms when using LJ units
This commit is contained in:
Jacob Gissinger
2024-04-18 11:00:02 -04:00
parent 6836bca5f8
commit 931417da0a
2 changed files with 8 additions and 7 deletions

View File

@ -112,7 +112,8 @@ These values can be used by any command that uses global scalar or
vector values from a compute as input. See the :doc:`Howto output
<Howto_output>` page for an overview of LAMMPS output options.
The scalar and vector values calculated by this compute are "extensive".
The scalar and vector values returned by this compute are non-negative
integers.
Restrictions
""""""""""""

View File

@ -62,24 +62,24 @@ ComputeCountType::ComputeCountType(LAMMPS *lmp, int narg, char **arg) :
if (mode == ATOM) {
vector_flag = 1;
size_vector = atom->ntypes;
extvector = 1;
extvector = 0;
} else if (mode == BOND) {
scalar_flag = vector_flag = 1;
size_vector = atom->nbondtypes;
extscalar = 1;
extvector = 1;
extscalar = 0;
extvector = 0;
} else if (mode == ANGLE) {
vector_flag = 1;
size_vector = atom->nangletypes;
extvector = 1;
extvector = 0;
} else if (mode == DIHEDRAL) {
vector_flag = 1;
size_vector = atom->ndihedraltypes;
extvector = 1;
extvector = 0;
} else if (mode == IMPROPER) {
vector_flag = 1;
size_vector = atom->nimpropertypes;
extvector = 1;
extvector = 0;
}
// output vector