ai2_kit.domain.dpff module#
- ai2_kit.domain.dpff.dpdata_read_cp2k_dpff_data(cp2k_dir: str, cp2k_output: str, wannier_file: str, type_map: List[str], sys_charge_map: List[int], model_charge_map: List[int], ewald_h: float, ewald_beta: float, ext_efield, sel_type: List[int], wannier_cutoff: float = 1.0, wannier_spread_file: Optional[str] = None)[source]#
Gnereate dpdata from cp2k output and wannier file for DPLR
- Parameters:
cp2k_dir – the directory of cp2k output and wannier file
cp2k_output – the cp2k output file
wannier_file – the wannier file
type_map – the type map of atom type, for example, [O,H]
sys_charge_map – the charge map of atom in system, for example, [6, 1]
model_charge_map – the charge map of wannier in model, for example, [-8]
ewald_h – the ewald_h parameter used in dplr/dpff model
ewald_beta – the ewald_beta parameter used in dplr/dpff model
ext_efield – the external electric field
sel_type – the selected type of atom, for example, [0] means atom type 0, aka O is selected
wannier_cutoff – the cutoff to allocate wannier centers around atoms
wannier_spread_file – the wannier spread file, if provided, the spread data will be added to dp_sys
- Return dp_sys:
dpdata.LabeledSystem In addition to the common energy data, the following data are added: - atomic_dipole: the atomic dipole of selected atoms - ext_efield: the external electric field - efield: the direction vector of atomic electric field - aparam: the atomic electric field magnitude
- ai2_kit.domain.dpff.get_pbc_atomic_efield(dp_sys, extended_coords, extended_charges, ewald_h, ewald_beta)[source]#
- ai2_kit.domain.dpff.set_dpff_ext_from_cp2k_output(dp_sys: LabeledSystem, cp2k_output: str, wannier_file: str, type_map: List[str], sys_charge_map: List[int], model_charge_map: List[int], ewald_h: float, ewald_beta: float, ext_efield, sel_type: List[int], wannier_cutoff: float = 1.0, wannier_spread_file: Optional[str] = None)[source]#