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:
@ -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
|
||||
""""""""""""
|
||||
|
||||
@ -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
|
||||
|
||||
Reference in New Issue
Block a user