Force sets

This object contains the information about the supercells with displacements generated by phonopy ( displacement, directions and atomic forces). Atomic forces are optional. This can be used to store either 2nd order or 3rd order displacements data. When containing 3rd order displacements data, it also can be used for 2nd order phonon calculations.

Setters and getters are provided to store and get the data in phonopy format:

example of use in phonopy

data_sets = phonon.get_displacement_dataset()
data_sets_data = ForceSetsData(data_sets=data_sets)

...

force_sets_data = ForceSetsData(data_sets=data_sets_data.get_data_sets())

forces = []
for i in range(force_sets_data.get_number_of_displacements()):
    forces.append(forces_of_supercell_with_displacement[i])

force_sets_data.set_forces(forces)

...

phonon.set_displacement_dataset(force_sets_data.get_force_sets())
phonon.produce_force_constants()