deepmd.tf.descriptor.se_a_ebd

Module Contents

Classes

DescrptSeAEbd

DeepPot-SE descriptor with type embedding approach.

class deepmd.tf.descriptor.se_a_ebd.DescrptSeAEbd(rcut: float, rcut_smth: float, sel: List[int], neuron: List[int] = [24, 48, 96], axis_neuron: int = 8, resnet_dt: bool = False, trainable: bool = True, seed: int | None = None, type_one_side: bool = True, type_nchanl: int = 2, type_nlayer: int = 1, numb_aparam: int = 0, set_davg_zero: bool = False, activation_function: str = 'tanh', precision: str = 'default', exclude_types: List[List[int]] = [], **kwargs)[source]

Bases: deepmd.tf.descriptor.se_a.DescrptSeA

DeepPot-SE descriptor with type embedding approach.

Parameters:
rcut

The cut-off radius

rcut_smth

From where the environment matrix should be smoothed

sellist[int]

sel[i] specifies the maxmum number of type i atoms in the cut-off radius

neuronlist[int]

Number of neurons in each hidden layers of the embedding net

axis_neuron

Number of the axis neuron (number of columns of the sub-matrix of the embedding matrix)

resnet_dt

Time-step dt in the resnet construction: y = x + dt * phi (Wx + b)

trainable

If the weights of embedding net are trainable.

seed

Random seed for initializing the network parameters.

type_one_side

Try to build N_types embedding nets. Otherwise, building N_types^2 embedding nets

type_nchanl

Number of channels for type representation

type_nlayer

Number of hidden layers for the type embedding net (skip connected).

numb_aparam

Number of atomic parameters. If >0 it will be embedded with atom types.

set_davg_zero

Set the shift of embedding net input to zero.

activation_function

The activation function in the embedding net. Supported options are {0}

precision

The precision of the embedding net parameters. Supported options are {1}

exclude_typesList[List[int]]

The excluded pairs of types which have no interaction with each other. For example, [[0, 1]] means no interaction between type 0 and type 1.

build(coord_: deepmd.tf.env.tf.Tensor, atype_: deepmd.tf.env.tf.Tensor, natoms: deepmd.tf.env.tf.Tensor, box_: deepmd.tf.env.tf.Tensor, mesh: deepmd.tf.env.tf.Tensor, input_dict: dict, reuse: bool | None = None, suffix: str = '') deepmd.tf.env.tf.Tensor[source]

Build the computational graph for the descriptor.

Parameters:
coord_

The coordinate of atoms

atype_

The type of atoms

natoms

The number of atoms. This tensor has the length of Ntypes + 2 natoms[0]: number of local atoms natoms[1]: total number of atoms held by this processor natoms[i]: 2 <= i < Ntypes+2, number of type i atoms

box_tf.Tensor

The box of the system

mesh

For historical reasons, only the length of the Tensor matters. if size of mesh == 6, pbc is assumed. if size of mesh == 0, no-pbc is assumed.

input_dict

Dictionary for additional inputs

reuse

The weights in the networks should be reused when get the variable.

suffix

Name suffix to identify this descriptor

Returns:
descriptor

The output descriptor

_type_embed(atype, ndim=1, reuse=None, suffix='', trainable=True)[source]
_embedding_net(inputs, natoms, filter_neuron, activation_fn=tf.nn.tanh, stddev=1.0, bavg=0.0, name='linear', reuse=None, seed=None, trainable=True)[source]

inputs: nf x na x (nei x 4) outputs: nf x na x nei x output_size.

_type_embedding_net_two_sides(mat_g, atype, natoms, name='', reuse=None, seed=None, trainable=True)[source]
_type_embedding_net_one_side(mat_g, atype, natoms, name='', reuse=None, seed=None, trainable=True)[source]
_type_embedding_net_one_side_aparam(mat_g, atype, natoms, aparam, name='', reuse=None, seed=None, trainable=True)[source]
_pass_filter(inputs, atype, natoms, input_dict, reuse=None, suffix='', trainable=True)[source]
_ebd_filter(inputs, atype, natoms, input_dict, activation_fn=tf.nn.tanh, stddev=1.0, bavg=0.0, name='linear', reuse=None, seed=None, trainable=True)[source]