deepmd.utils.finetune

Module Contents

Functions

change_energy_bias_lower(data, dp, origin_type_map, ...)

Change the energy bias according to the input data and the pretrained model.

Attributes

log

deepmd.utils.finetune.log[source]
deepmd.utils.finetune.change_energy_bias_lower(data: deepmd.utils.data_system.DeepmdDataSystem, dp: deepmd.infer.deep_eval.DeepEval, origin_type_map: List[str], full_type_map: List[str], bias_atom_e: numpy.ndarray, bias_adjust_mode='change-by-statistic', ntest=10)[source]

Change the energy bias according to the input data and the pretrained model.

Parameters:
dataDeepmdDataSystem

The training data.

dpstr

The DeepEval object.

origin_type_maplist

The original type_map in dataset, they are targets to change the energy bias.

full_type_mapstr

The full type_map in pretrained model

bias_atom_enp.ndarray

The old energy bias in the pretrained model.

bias_adjust_modestr

The mode for changing energy bias : [‘change-by-statistic’, ‘set-by-statistic’] ‘change-by-statistic’ : perform predictions on energies of target dataset,

and do least sqaure on the errors to obtain the target shift as bias.

‘set-by-statistic’ : directly use the statistic energy bias in the target dataset.

ntestint

The number of test samples in a system to change the energy bias.