(git:db3ef62)
deepmd_wrapper Module Reference

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

Functions/Subroutines

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

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(inout)  filename)

Load DP from a model file.

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

Definition at line 43 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 84 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 151 of file deepmd_wrapper.F.

Here is the caller graph for this function: