From 931417da0ae4c27bce30e87a72ebb19bb145139b Mon Sep 17 00:00:00 2001 From: Jacob Gissinger Date: Thu, 18 Apr 2024 11:00:02 -0400 Subject: [PATCH] always return integers for counts previously, atom, bond, angles, dihedral and improper counts were normalized by natoms when using LJ units --- doc/src/compute_count_type.rst | 3 ++- src/compute_count_type.cpp | 12 ++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/doc/src/compute_count_type.rst b/doc/src/compute_count_type.rst index ca3b02ecdb..de28be75e9 100644 --- a/doc/src/compute_count_type.rst +++ b/doc/src/compute_count_type.rst @@ -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 ` 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 """""""""""" diff --git a/src/compute_count_type.cpp b/src/compute_count_type.cpp index d430b23e11..7b1651b61c 100644 --- a/src/compute_count_type.cpp +++ b/src/compute_count_type.cpp @@ -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