small updates

This commit is contained in:
Axel Kohlmeyer
2022-05-09 15:22:48 -04:00
parent 23e17363f9
commit eb44cbf848
2 changed files with 19 additions and 6 deletions

View File

@ -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.
----------

View File

@ -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 <pair_line_lj>`)
* - ntris
- number of atoms that have triangle data (see :doc:`pair style tri/lj <pair_tri_lj>`)
* - nbodies
- number of atoms that have body data (see :doc:`the Body particle HowTo <Howto_body>`)
.. _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;