deepmd.tf.infer.data_modifier

Module Contents

Classes

DipoleChargeModifier

Parameters:

class deepmd.tf.infer.data_modifier.DipoleChargeModifier(model_name: str, model_charge_map: List[float], sys_charge_map: List[float], ewald_h: float = 1, ewald_beta: float = 1)[source]

Bases: deepmd.tf.infer.deep_dipole.DeepDipoleOld

Parameters:
model_name

The model file for the DeepDipole model

model_charge_map

Gives the amount of charge for the wfcc

sys_charge_map

Gives the amount of charge for the real atoms

ewald_h

Grid spacing of the reciprocal part of Ewald sum. Unit: A

ewald_beta

Splitting parameter of the Ewald sum. Unit: A^{-1}

build_fv_graph() deepmd.tf.env.tf.Tensor[source]

Build the computational graph for the force and virial inference.

_build_fv_graph_inner()[source]
_enrich(dipole, dof=3)[source]
_slice_descrpt_deriv(deriv)[source]
eval(coord: numpy.ndarray, box: numpy.ndarray, atype: numpy.ndarray, eval_fv: bool = True) Tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray][source]

Evaluate the modification.

Parameters:
coord

The coordinates of atoms

box

The simulation region. PBC is assumed

atype

The atom types

eval_fv

Evaluate force and virial

Returns:
tot_e

The energy modification

tot_f

The force modification

tot_v

The virial modification

_eval_fv(coords, cells, atom_types, ext_f)[source]
_extend_system(coord, box, atype, charge)[source]
modify_data(data: dict, data_sys: deepmd.tf.utils.data.DeepmdData) None[source]

Modify data.

Parameters:
data

Internal data of DeepmdData. Be a dict, has the following keys - coord coordinates - box simulation box - type atom types - find_energy tells if data has energy - find_force tells if data has force - find_virial tells if data has virial - energy energy - force force - virial virial

data_sysDeepmdData

The data system.