deepmd.tf.modifier.dipole_charge#
Classes#
Module Contents#
- class deepmd.tf.modifier.dipole_charge.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,deepmd.tf.modifier.base_modifier.BaseModifier- 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}
- classmethod deserialize(data: dict) deepmd.tf.modifier.base_modifier.BaseModifier[source]#
Deserialize the modifier.
- Parameters:
- data
dict The serialized data
- data
- Returns:
BaseModelThe deserialized modifier
- build_fv_graph() deepmd.tf.env.tf.Tensor[source]#
Build the computational graph for the force and virial inference.
- 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_eThe energy modification
tot_fThe force modification
tot_vThe virial modification
- 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_sys
DeepmdData The data system.