ai2_kit.domain.dplr module#
- ai2_kit.domain.dplr.dpdata_read_cp2k_dplr_data(cp2k_dir: str, cp2k_output: str, wannier_file: str, type_map: List[str], sel_type: List[int], wannier_cutoff: float = 1.0, wannier_spread_file: Optional[str] = None, model_charge_map: Optional[List[int]] = 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]
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
model_charge_map – the charge map of wannier in model, for example, [-8]
- Return dp_sys:
dpdata.LabeledSystem In addition to the common energy data, atomic_dipole data is added.
- ai2_kit.domain.dplr.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.dplr.get_atomic_dipole(dp_sys, sel_ids, wannier_atoms, wannier_cutoff=1.0, wannier_spread_file=None, cns_ref=None)[source]#
- ai2_kit.domain.dplr.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