def _set_forces_fc2( ph3py: Phono3py, ph3py_yaml: typing.Union[Phono3pyYaml, None], force_filename, disp_filename, produce_fc, symmetrize_fc, is_compact_fc, fc_calculator, fc_calculator_options, fc_type, log_level, ): dataset = parse_forces( ph3py, ph3py_yaml=ph3py_yaml, force_filename=force_filename, disp_filename=disp_filename, fc_type=fc_type, log_level=log_level, ) if fc_type == "phonon_fc2": ph3py.phonon_dataset = dataset else: ph3py.dataset = dataset if produce_fc: ph3py.produce_fc2( symmetrize_fc2=symmetrize_fc, is_compact_fc=is_compact_fc, fc_calculator=fc_calculator, fc_calculator_options=fc_calculator_options, ) if log_level and symmetrize_fc: print("fc2 was symmetrized.")
def _set_forces_fc3( ph3py: Phono3py, ph3py_yaml: typing.Union[Phono3pyYaml, None], force_filename, disp_filename, produce_fc, symmetrize_fc, is_compact_fc, fc_calculator, fc_calculator_options, cutoff_pair_distance, log_level, ): ph3py.dataset = parse_forces( ph3py, ph3py_yaml=ph3py_yaml, cutoff_pair_distance=cutoff_pair_distance, force_filename=force_filename, disp_filename=disp_filename, fc_type="fc3", log_level=log_level, ) if produce_fc: ph3py.produce_fc3( symmetrize_fc3r=symmetrize_fc, is_compact_fc=is_compact_fc, fc_calculator=fc_calculator, fc_calculator_options=fc_calculator_options, ) if log_level and symmetrize_fc: print("fc3 was symmetrized.")
def _set_forces_fc3(ph3py, ph3py_yaml, force_filename, disp_filename, produce_fc, symmetrize_fc, is_compact_fc, fc_calculator, fc_calculator_options, cutoff_pair_distance, log_level): ph3py.dataset = parse_forces(ph3py, ph3py_yaml=ph3py_yaml, cutoff_pair_distance=cutoff_pair_distance, force_filename=force_filename, disp_filename=disp_filename, fc_type='fc3', log_level=log_level) if produce_fc: ph3py.produce_fc3(symmetrize_fc3r=symmetrize_fc, is_compact_fc=is_compact_fc, fc_calculator=fc_calculator, fc_calculator_options=fc_calculator_options) if log_level and symmetrize_fc: print("fc3 was symmetrized.")
def _set_fc3(ph3py, units, force_filename, disp_filename, symmetrize_fc, is_compact_fc, fc_calculator, fc_calculator_options, log_level): dataset = parse_forces(ph3py.supercell.get_number_of_atoms(), units['force_to_eVperA'], units['distance_to_A'], force_filename=force_filename, disp_filename=disp_filename, log_level=log_level) ph3py.produce_fc3(displacement_dataset=dataset, symmetrize_fc3r=symmetrize_fc, is_compact_fc=is_compact_fc, fc_calculator=fc_calculator, fc_calculator_options=fc_calculator_options) if log_level and symmetrize_fc: print("Force constants were symmetrized.")