deepmd.jax.atomic_model.pairtab_atomic_model#
Classes#
Pairwise tabulation energy model. |
Module Contents#
- class deepmd.jax.atomic_model.pairtab_atomic_model.PairTabAtomicModel(tab_file: str, rcut: float, sel: int | list[int], type_map: list[str], rcond: float | None = None, atom_ener: list[float] | None = None, **kwargs)[source]#
Bases:
deepmd.dpmodel.atomic_model.pairtab_atomic_model.PairTabAtomicModelPairwise tabulation energy model.
This model can be used to tabulate the pairwise energy between atoms for either short-range or long-range interactions, such as D3, LJ, ZBL, etc. It should not be used alone, but rather as one submodel of a linear (sum) model, such as DP+D3.
Do not put the model on the first model of a linear model, since the linear model fetches the type map from the first model.
At this moment, the model does not smooth the energy at the cutoff radius, so one needs to make sure the energy has been smoothed to zero.
- Parameters:
- forward_common_atomic(extended_coord: deepmd.jax.env.jnp.ndarray, extended_atype: deepmd.jax.env.jnp.ndarray, nlist: deepmd.jax.env.jnp.ndarray, mapping: deepmd.jax.env.jnp.ndarray | None = None, fparam: deepmd.jax.env.jnp.ndarray | None = None, aparam: deepmd.jax.env.jnp.ndarray | None = None) dict[str, deepmd.jax.env.jnp.ndarray][source]#
Common interface for atomic inference.
This method accept extended coordinates, extended atom typs, neighbor list, and predict the atomic contribution of the fit property.
- Parameters:
- extended_coord
extended coordinates, shape: nf x (nall x 3)
- extended_atype
extended atom typs, shape: nf x nall for a type < 0 indicating the atomic is virtual.
- nlist
neighbor list, shape: nf x nloc x nsel
- mapping
extended to local index mapping, shape: nf x nall
- fparam
frame parameters, shape: nf x dim_fparam
- aparam
atomic parameter, shape: nf x nloc x dim_aparam
- Returns:
ret_dictdict of output atomic properties. should implement the definition of fitting_output_def. ret_dict[“mask”] of shape nf x nloc will be provided. ret_dict[“mask”][ff,ii] == 1 indicating the ii-th atom of the ff-th frame is real. ret_dict[“mask”][ff,ii] == 0 indicating the ii-th atom of the ff-th frame is virtual.