def write(self, parent):
    group = parent.require_group(GROUP_SOURCE)
    position_group = group.require_group(GROUP_POSITIONS)
    self.position_nm.write(position_group)
    direction_group = group.require_group(GROUP_DIRECTION)
    self.direction.write(direction_group)
    group.attrs[ATTRIBUTE_KINETIC_ENERGY] = self.kinetic_energy_keV
    group.attrs[ATTRIBUTE_MASS] = self.mass_amu
    group.attrs[ATTRIBUTE_ATOMIC_NUMBER] = self.atomic_number
def write(self, parent):
    group = parent.require_group(GROUP_SOURCE)
    position_group = group.require_group(GROUP_POSITIONS)
    self.position_nm.write(position_group)
    direction_group = group.require_group(GROUP_DIRECTION)
    self.direction.write(direction_group)
    group.attrs[ATTRIBUTE_KINETIC_ENERGY] = self.kinetic_energy_keV
    group.attrs[ATTRIBUTE_MASS] = self.mass_amu
    group.attrs[ATTRIBUTE_ATOMIC_NUMBER] = self.atomic_number