diff --git a/doc/src/Fortran.rst b/doc/src/Fortran.rst index 43e443f6e7..2daa7b0734 100644 --- a/doc/src/Fortran.rst +++ b/doc/src/Fortran.rst @@ -1641,9 +1641,9 @@ Procedures Bound to the :f:type:`lammps` Derived Type .. versionadded:: TBD This function copies the list of all dihedrals into an allocatable array. - The array will be filled with (dihedral type, dihedral atom 1, dihedral atom 2, - dihedral atom 3, dihedral atom 4) for each dihedral. The array is allocated to - the right length (i.e., five times the number of dihedrals). + The array will be filled with (dihedral type, dihedral atom 1, dihedral atom 2, + dihedral atom 3, dihedral atom 4) for each dihedral. The array is allocated to + the right length (i.e., five times the number of dihedrals). The array *data* must be of the same type as the LAMMPS ``tagint`` type, which is equivalent to either ``INTEGER(c_int)`` or ``INTEGER(c_int64_t)``, depending on whether ``-DLAMMPS_BIGBIG`` was used @@ -1687,9 +1687,9 @@ Procedures Bound to the :f:type:`lammps` Derived Type .. versionadded:: TBD This function copies the list of all impropers into an allocatable array. - The array will be filled with (improper type, improper atom 1, improper atom 2, - improper atom 3, improper atom 4) for each improper. The array is allocated to - the right length (i.e., five times the number of impropers). + The array will be filled with (improper type, improper atom 1, improper atom 2, + improper atom 3, improper atom 4) for each improper. The array is allocated to + the right length (i.e., five times the number of impropers). The array *data* must be of the same type as the LAMMPS ``tagint`` type, which is equivalent to either ``INTEGER(c_int)`` or ``INTEGER(c_int64_t)``, depending on whether ``-DLAMMPS_BIGBIG`` was used diff --git a/python/lammps/core.py b/python/lammps/core.py index 17c19ebded..e4f8d807b6 100644 --- a/python/lammps/core.py +++ b/python/lammps/core.py @@ -217,8 +217,8 @@ class lammps(object): self.lib.lammps_gather_dihedrals.restype = None self.lib.lammps_gather_impropers.argtypes = [c_void_p,c_void_p] - self.lib.lammps_gather_impropers.restype = None - + self.lib.lammps_gather_impropers.restype = None + self.lib.lammps_gather.argtypes = [c_void_p,c_char_p,c_int,c_int,c_void_p] self.lib.lammps_gather.restype = None @@ -1330,7 +1330,7 @@ class lammps(object): return nangles,data # ------------------------------------------------------------------------- - + def gather_dihedrals(self): """Retrieve global list of dihedrals @@ -1375,8 +1375,8 @@ class lammps(object): self.lib.lammps_gather_impropers(self.lmp,data) return nimpropers,data - # ------------------------------------------------------------------------- - + # ------------------------------------------------------------------------- + # return vector of atom/compute/fix properties gathered across procs # 3 variants to match src/library.cpp # name = atom property recognized by LAMMPS in atom->extract() diff --git a/src/library.cpp b/src/library.cpp index 17b4de44e3..3d4d2b5102 100644 --- a/src/library.cpp +++ b/src/library.cpp @@ -3275,7 +3275,7 @@ void lammps_gather_angles(void *handle, void *data) This function copies the list of all dihedrals into a buffer provided by the calling code. The buffer will be filled with dihedral type, dihedral atom 1, -dihedral atom 2, dihedral atom 3, dihedral atom 4 for each dihedral. +dihedral atom 2, dihedral atom 3, dihedral atom 4 for each dihedral. Thus the buffer has to be allocated to the dimension of 5 times the **total** number of dihedrals times the size of the LAMMPS "tagint" type, which is either 4 or 8 bytes depending on @@ -3386,7 +3386,7 @@ void lammps_gather_dihedrals(void *handle, void *data) This function copies the list of all impropers into a buffer provided by the calling code. The buffer will be filled with improper type, improper atom 1, -improper atom 2, improper atom 3, improper atom 4 for each improper. +improper atom 2, improper atom 3, improper atom 4 for each improper. Thus the buffer has to be allocated to the dimension of 5 times the **total** number of impropers times the size of the LAMMPS "tagint" type, which is either 4 or 8 bytes depending on