(git:6344619)
Loading...
Searching...
No Matches
deepmd_wrapper Module Reference

Interface to the DeePMD-kit or a c++ wrapper. More...

Data Types

type  deepmd_model_type

Functions/Subroutines

type(deepmd_model_type) function, public deepmd_model_load (filename)
 Load DP from a model file.
subroutine, public deepmd_model_compute (model, natom, coord, atype, cell, energy, force, virial, atomic_energy, atomic_virial)
 Compute energy, force and virial from DP.
subroutine, public deepmd_model_release (model)
 Releases a deepmd model and all its ressources.

Detailed Description

Interface to the DeePMD-kit or a c++ wrapper.

History
07.2019 created [Yongbin Zhuang] 06.2021 refactored [Yunpei Liu] 10.2023 adapt to DeePMD-kit C Interface [Yunpei Liu]
Author
Yongbin Zhuang

Function/Subroutine Documentation

◆ deepmd_model_load()

type(deepmd_model_type) function, public deepmd_wrapper::deepmd_model_load ( character(len=*), intent(in) filename)

Load DP from a model file.

Parameters
filenamePath to the model file.
Returns
Pointer to the DP model.

Definition at line 46 of file deepmd_wrapper.F.

Here is the caller graph for this function:

◆ deepmd_model_compute()

subroutine, public deepmd_wrapper::deepmd_model_compute ( type(deepmd_model_type) model,
integer natom,
real(kind=dp), dimension(natom, 3), intent(in) coord,
integer, dimension(natom), intent(in) atype,
real(kind=dp), dimension(9), intent(in) cell,
real(kind=dp), intent(out) energy,
real(kind=dp), dimension(natom, 3), intent(out) force,
real(kind=dp), dimension(9), intent(out) virial,
real(kind=dp), dimension(natom), intent(out) atomic_energy,
real(kind=dp), dimension(natom, 9), intent(out) atomic_virial )

Compute energy, force and virial from DP.

Parameters
modelPointer to the DP model.
natomNumber of atoms.
coordCoordinates of the atoms.
atypeAtom types.
cellCell vectors.
energyPotential energy.
forceForces.
virialVirial tensor.
atomic_energyAtomic energies.
atomic_virialAtomic virial tensors.

Definition at line 122 of file deepmd_wrapper.F.

Here is the caller graph for this function:

◆ deepmd_model_release()

subroutine, public deepmd_wrapper::deepmd_model_release ( type(deepmd_model_type) model)

Releases a deepmd model and all its ressources.

Parameters
modelPointer to the DP model.

Definition at line 190 of file deepmd_wrapper.F.

Here is the caller graph for this function: