add fortran interface for lammps_clearstep_compute()

This commit is contained in:
Axel Kohlmeyer
2025-01-27 14:18:50 -05:00
parent 6398a7c7aa
commit 5d47c417ed
2 changed files with 15 additions and 0 deletions

View File

@ -323,6 +323,8 @@ of the contents of the :f:mod:`LIBLAMMPS` Fortran interface to LAMMPS.
:ftype set_internal_variable: subroutine
:f eval: :f:func:`eval`
:ftype eval: function
:f clearstep_compute: :f:subr:`clearstep_compute`
:ftype clearstep_compute: subroutine
:f gather_atoms: :f:subr:`gather_atoms`
:ftype gather_atoms: subroutine
:f gather_atoms_concat: :f:subr:`gather_atoms_concat`

View File

@ -127,6 +127,7 @@ MODULE LIBLAMMPS
PROCEDURE :: set_string_variable => lmp_set_string_variable
PROCEDURE :: set_internal_variable => lmp_set_internal_variable
PROCEDURE :: eval => lmp_eval
PROCEDURE :: clearstep_compute => lmp_clearstep_compute
PROCEDURE, PRIVATE :: lmp_gather_atoms_int
PROCEDURE, PRIVATE :: lmp_gather_atoms_double
GENERIC :: gather_atoms => lmp_gather_atoms_int, &
@ -626,6 +627,12 @@ MODULE LIBLAMMPS
REAL(c_double) :: lammps_eval
END FUNCTION lammps_eval
SUBROUTINE lammps_clearstep_compute(handle) BIND(C)
IMPORT :: c_ptr
IMPLICIT NONE
TYPE(c_ptr), VALUE :: handle
END SUBROUTINE lammps_clearstep_compute
SUBROUTINE lammps_gather_atoms(handle, name, TYPE, count, DATA) BIND(C)
IMPORT :: c_int, c_ptr
IMPLICIT NONE
@ -1846,6 +1853,12 @@ CONTAINS
CALL lammps_free(Cexpr)
END FUNCTION lmp_eval
! equivalent subroutine to lammps_clearstep_compute
SUBROUTINE lmp_clearstep_compute(self)
CLASS(lammps), INTENT(IN) :: self
CALL lammps_clearstep_compute(self%handle)
END SUBROUTINE lmp_clearstep_compute
! equivalent function to lammps_gather_atoms (for integers)
SUBROUTINE lmp_gather_atoms_int(self, name, count, data)
CLASS(lammps), INTENT(IN) :: self