ai2_kit.feat.spectrum.viber module#
- class ai2_kit.feat.spectrum.viber.Cp2kLabelTaskBuilder[source]#
Bases:
object
This a builder class to generate cp2k labeling task.
- add_cp2k_input(file_path: str, tag: str)[source]#
Add cp2k input file for dipole or polarizability calculation
- add_system(*file_path_or_glob: str, **kwargs)[source]#
Add system files to label
- Parameters:
file_path_or_glob – system files or glob pattern
kwargs – kwargs for ase.io.read
- make_scripts(prefix: str = 'cp2k-batch-{i:02d}.sub', concurrency: int = 5, template: str | None = None, ignore_error: bool = False, cp2k_cmd: str = 'cp2k.psmp')[source]#
Make batch script for cp2k labeling
- Parameters:
prefix – prefix of batch script
concurrency – concurrency of tasks
template – template of batch script
ignore_error – ignore error
cmd – command to run cp2k
- ai2_kit.feat.spectrum.viber.dpdata_read_cp2k_viber_data(data_dir: str, lumped_dict: Dict[str, int], output_file: str = 'output', wannier: str = 'wannier.xyz', wannier_x: str = 'wannier_x.xyz', wannier_y: str = 'wannier_y.xyz', wannier_z: str = 'wannier_z.xyz', wacent_symbol='X', cutoff=1.2, eps=0.001, mode='both')[source]#
read the cp2k output file and wannier functions
- Parameters:
data_dir – the directory of the data
lumped_dict – the dictionary of the element and the expected coordination number, e.g. {“O”: 4} (for water molecule)
output_file – the cp2k output file name
wannier – the wannier function file name
wannier_x – the wannier function file name of x direction electric field
wannier_y – the wannier function file name of y direction electric field
wannier_z – the wannier function file name of z direction electric field
wacent_symbol – the symbol of the wannier function centroid