From eb44cbf84871ea17066d656794b38ad92b16aade Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 9 May 2022 15:22:48 -0400 Subject: [PATCH] small updates --- doc/src/variable.rst | 13 +++++++------ src/library.cpp | 12 ++++++++++++ 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/doc/src/variable.rst b/doc/src/variable.rst index 68f5ec984c..9f76f78f45 100644 --- a/doc/src/variable.rst +++ b/doc/src/variable.rst @@ -929,13 +929,14 @@ The is_file(name) function is a test whether *name* is a (readable) file and returns 1 in this case, otherwise it returns 0. For that *name* is taken as a literal string and must not have any blanks in it. -The extract_setting(name) function enables access to basic settings -for the LAMMPS executable and the running simulation via calling the +The extract_setting(name) function enables access to basic settings for +the LAMMPS executable and the running simulation via calling the :cpp:func:`lammps_extract_setting` library function. For example, the -number of processors (MPI ranks) being used by the simulation or the -procID (for this processor) can be queried. For the full list of -available keywords *name* and their meaning, see the documentation for -extract_setting() via the link in this paragraph. +number of processors (MPI ranks) being used by the simulation or the MPI +process ID (for this processor) can be queried, or the number of atom +types, bond types and so on. For the full list of available keywords +*name* and their meaning, see the documentation for extract_setting() +via the link in this paragraph. ---------- diff --git a/src/library.cpp b/src/library.cpp index d045d08adc..079534d663 100644 --- a/src/library.cpp +++ b/src/library.cpp @@ -950,6 +950,14 @@ not recognized, the function returns -1. - number of dihedral types * - nimpropertypes - number of improper types + * - nellipsoids + - number of atoms that have ellipsoid data + * - nlines + - number of atoms that have line data (see :doc:`pair style line/lj `) + * - ntris + - number of atoms that have triangle data (see :doc:`pair style tri/lj `) + * - nbodies + - number of atoms that have body data (see :doc:`the Body particle HowTo `) .. _extract_atom_flags: @@ -1021,6 +1029,10 @@ int lammps_extract_setting(void *handle, const char *keyword) if (strcmp(keyword,"nangletypes") == 0) return lmp->atom->nangletypes; if (strcmp(keyword,"ndihedraltypes") == 0) return lmp->atom->ndihedraltypes; if (strcmp(keyword,"nimpropertypes") == 0) return lmp->atom->nimpropertypes; + if (strcmp(keyword,"nellipsoids") == 0) return lmp->atom->nellipsoids; + if (strcmp(keyword,"nlines") == 0) return lmp->atom->nlines; + if (strcmp(keyword,"ntris") == 0) return lmp->atom->ntris; + if (strcmp(keyword,"nbodies") == 0) return lmp->atom->nbodies; if (strcmp(keyword,"molecule_flag") == 0) return lmp->atom->molecule_flag; if (strcmp(keyword,"q_flag") == 0) return lmp->atom->q_flag;