ai2_kit.domain.dpff module#

ai2_kit.domain.dpff.build_sel_type_assertion(sel_type, model_path: str, py_cmd='python')[source]#
ai2_kit.domain.dpff.dump_dplr_lammps_data(fp, atoms: Atoms, type_map: List[str], sel_type: List[int], sys_charge_map: List[float], model_charge_map: List[float])[source]#

dump atoms to LAMMPS data file for DPLR the naming convention of params follows Deepmd-Kit’s

about dplr: https://docs.deepmodeling.com/projects/deepmd/en/master/model/dplr.html about fitting tensor: https://docs.deepmodeling.com/projects/deepmd/en/master/model/train-fitting-tensor.html

Parameters:
  • fp – file pointer

  • type_map – the type map of atom type, for example, [O,H]

  • sel_type – the selected type of atom, for example, [0] means atom type 0, aka O is selected

  • sys_charge_map – the charge map of atom in system, for example, [6, 1]

  • model_charge_map – the charge map of atom in model, for example, [-8]

ai2_kit.domain.dpff.get_atomic_dipole(dp_sys, sel_ids, wannier_atoms, wannier_cutoff=1.0)[source]#
ai2_kit.domain.dpff.get_cp2k_output_total_energy(fp)[source]#
ai2_kit.domain.dpff.get_pbc_atomic_efield(dp_sys, extended_coords, extended_charges, ewald_h, ewald_beta)[source]#
ai2_kit.domain.dpff.get_sel_ids(dp_sys, type_map, sel_type)[source]#
ai2_kit.domain.dpff.get_sel_type(model_path) List[int][source]#
ai2_kit.domain.dpff.get_unused_symbols(used_symbols: List[str], size: int)[source]#

Get unused symbols from ase

Parameters:
  • used_symbols – symbols that are already used

  • size – number of unused symbols to get

ai2_kit.domain.dpff.set_dplr_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])[source]#