deepmd.tf
Root of the deepmd package, exposes all public classes and submodules. TensorFlow backend implementation for DeepEval. Factory function that forwards to DeepEval (for compatbility). Bases: TensorFlow backend implementation for DeepEval. The name of the frozen model file. The output definition of the model. Positional arguments. The prefix in the load computational graph If uses the default tf graph, otherwise build a new tf graph for evaluation If True, automatic batch size will be used. If int, it will be used as the initial batch size. The input map for tf.import_graph_def. Only work with default tf graph The ASE neighbor list class to produce the neighbor list. If None, the neighbor list will be built natively in the model. Keyword arguments. Get type of model. :type:str Get TF session. Check the model compatability. If the model stored in the graph file is compatable with the current code Sort atoms in the system according their types. The coordinates of atoms. Should be of shape [nframes, natoms, 3] The type of atoms Should be of shape [natoms] The selected atoms by type The coordinates after sorting The atom types after sorting The index mapping from the input to the output. For example coord_out = coord[:,idx_map,:] Only output if sel_atoms is not None The sorted selected atom types Only output if sel_atoms is not None The index mapping from the selected atoms to sorted selected atoms. Reverse mapping of a vector according to the index map. Input vector. Be of shape [nframes, natoms, -1] Index map. Be of shape [natoms] Reverse mapped vector. Make the natom vector used by deepmd-kit. The type of atoms 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 Evaluate output of type embedding network by using this model. The output of type embedding network. The shape is [ntypes, o_size], where ntypes is the number of types, and o_size is the number of nodes in the output layer. If the model does not enable type embedding. See also The type embedding network. Examples Get the output of type embedding network of graph.pb: Make the mesh with neighbor list for a single frame. The coordinates of atoms. Should be of shape [natoms, 3] The cell of the system. Should be of shape [3, 3] The type of atoms. Should be of shape [natoms] The index map of atoms. Should be of shape [natoms] ASE neighbor list. The following method or attribute will be used/set: bothways, self_interaction, update, build, first_neigh, pair_second, offset_vec. The number of atoms. This tensor has the length of Ntypes + 2 natoms[0]: nloc natoms[1]: nall natoms[i]: 2 <= i < Ntypes+2, number of type i atoms for nloc The coordinates of atoms, including ghost atoms. Should be of shape [nframes, nall, 3] The type of atoms, including ghost atoms. Should be of shape [nall] The mesh in nei_mode=4. The index map of atoms. Should be of shape [nall] The index map of ghost atoms. Should be of shape [nghost] Get the selected atom types of this model. Only atoms with selected atom types have atomic contribution to the result of the model. If returning an empty list, all atom types are selected. Wrapper method with auto batch size. Evaluate the energy, force and virial by using this DP. The coordinates of atoms. The array should be of size nframes x natoms x 3 The cell of the region. If None then non-PBC is assumed, otherwise using PBC. The array should be of size nframes x 9 The atom types The list should contain natoms ints Calculate the atomic energy and virial The frame parameter. The array can be of size : - nframes x dim_fparam. - dim_fparam. Then all frames are assumed to be provided with the same fparam. The atomic parameter The array can be of size : - nframes x natoms x dim_aparam. - natoms x dim_aparam. Then all frames are assumed to be provided with the same aparam. - dim_aparam. Then all frames and atoms are provided with the same aparam. The external field on atoms. The array should be of size nframes x natoms x 3 Other parameters The output of the evaluation. The keys are the names of the output variables, and the values are the corresponding output arrays. Evaluate descriptors by using this DP. The coordinates of atoms. The array should be of size nframes x natoms x 3 The cell of the region. If None then non-PBC is assumed, otherwise using PBC. The array should be of size nframes x 9 The atom types The list should contain natoms ints The frame parameter. The array can be of size : - nframes x dim_fparam. - dim_fparam. Then all frames are assumed to be provided with the same fparam. The atomic parameter The array can be of size : - nframes x natoms x dim_aparam. - natoms x dim_aparam. Then all frames are assumed to be provided with the same aparam. - dim_aparam. Then all frames and atoms are provided with the same aparam. The external field on atoms. The array should be of size nframes x natoms x 3 Descriptors. Factory function that forwards to DeepEval (for compatbility). positional arguments keyword arguments potentials Bases: The model file for the DeepDipole model Gives the amount of charge for the wfcc Gives the amount of charge for the real atoms Grid spacing of the reciprocal part of Ewald sum. Unit: A Splitting parameter of the Ewald sum. Unit: A^{-1} Build the computational graph for the force and virial inference. Evaluate the modification. The coordinates of atoms The simulation region. PBC is assumed The atom types Evaluate force and virial The energy modification The force modification The virial modification Modify 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 The data system.Subpackages
deepmd.tf.cluster
deepmd.tf.descriptor
deepmd.tf.descriptor.descriptor
deepmd.tf.descriptor.hybrid
deepmd.tf.descriptor.loc_frame
deepmd.tf.descriptor.se
deepmd.tf.descriptor.se_a
deepmd.tf.descriptor.se_a_ebd
deepmd.tf.descriptor.se_a_ebd_v2
deepmd.tf.descriptor.se_a_ef
deepmd.tf.descriptor.se_a_mask
deepmd.tf.descriptor.se_atten
deepmd.tf.descriptor.se_atten_v2
deepmd.tf.descriptor.se_r
deepmd.tf.descriptor.se_t
deepmd.tf.entrypoints
deepmd.tf.entrypoints.compress
deepmd.tf.entrypoints.convert
deepmd.tf.entrypoints.doc
deepmd.tf.entrypoints.freeze
deepmd.tf.entrypoints.gui
deepmd.tf.entrypoints.ipi
deepmd.tf.entrypoints.main
deepmd.tf.entrypoints.neighbor_stat
deepmd.tf.entrypoints.test
deepmd.tf.entrypoints.train
deepmd.tf.entrypoints.transfer
deepmd.tf.fit
deepmd.tf.infer
deepmd.tf.loggers
deepmd.tf.loss
deepmd.tf.model
deepmd.tf.nvnmd
deepmd.tf.op
deepmd.tf.op._add_flt_nvnmd_grad
deepmd.tf.op._copy_flt_nvnmd_grad
deepmd.tf.op._dotmul_flt_nvnmd_grad
deepmd.tf.op._flt_nvnmd_grad
deepmd.tf.op._gelu
deepmd.tf.op._map_flt_nvnmd_grad
deepmd.tf.op._matmul_fitnet_nvnmd_grad
deepmd.tf.op._matmul_flt2fix_nvnmd
deepmd.tf.op._matmul_flt_nvnmd_grad
deepmd.tf.op._mul_flt_nvnmd_grad
deepmd.tf.op._prod_force_grad
deepmd.tf.op._prod_force_se_a_grad
deepmd.tf.op._prod_force_se_a_mask_grad
deepmd.tf.op._prod_force_se_r_grad
deepmd.tf.op._prod_virial_grad
deepmd.tf.op._prod_virial_se_a_grad
deepmd.tf.op._prod_virial_se_r_grad
deepmd.tf.op._quantize_nvnmd_grad
deepmd.tf.op._soft_min_force_grad
deepmd.tf.op._soft_min_virial_grad
deepmd.tf.op._tabulate_grad
deepmd.tf.op._tanh4_flt_nvnmd_grad
deepmd.tf.train
deepmd.tf.utils
deepmd.tf.utils.argcheck
deepmd.tf.utils.batch_size
deepmd.tf.utils.compat
deepmd.tf.utils.compress
deepmd.tf.utils.convert
deepmd.tf.utils.data
deepmd.tf.utils.data_system
deepmd.tf.utils.errors
deepmd.tf.utils.finetune
deepmd.tf.utils.graph
deepmd.tf.utils.learning_rate
deepmd.tf.utils.neighbor_stat
deepmd.tf.utils.network
deepmd.tf.utils.nlist
deepmd.tf.utils.pair_tab
deepmd.tf.utils.parallel_op
deepmd.tf.utils.path
deepmd.tf.utils.plugin
deepmd.tf.utils.random
deepmd.tf.utils.region
deepmd.tf.utils.serialization
deepmd.tf.utils.sess
deepmd.tf.utils.spin
deepmd.tf.utils.tabulate
deepmd.tf.utils.type_embed
deepmd.tf.utils.update_sel
deepmd.tf.utils.weight_avg
Submodules
Package Contents
Classes
Functions
DeepPotential
(→ deep_eval.DeepEval)deepmd.infer.deep_eval.DeepEvalBackend
Path
ModelOutputDef
list
int
or AutomaticBatchSize
, default: False
dict
, optional
ase.neighborlist.NewPrimitiveNeighborList
, optional
dict
coord_out
atom_type_out
idx_map
sel_atom_type
sel_idx_map
vec_out
natoms
np.ndarray
KeyError
deepmd.tf.utils.type_embed.TypeEmbedNet
>>> from deepmd.tf.infer import DeepPotential
>>> dp = DeepPotential("graph.pb")
>>> dp.eval_typeebd()
np.ndarray
Optional
[np.ndarray
]np.ndarray
np.ndarray
ase.neighborlist.NewPrimitiveNeighborList
np.ndarray
np.ndarray
np.ndarray
np.ndarray
np.ndarray
np.ndarray
dict
descriptor
DeepEval
deepmd.tf.infer.deep_dipole.DeepDipoleOld
tot_e
tot_f
tot_v
DeepmdData