Peace be upon you.
Grand Ayatollah Sayyid Sistani (may Allah protect him):
It is not obligatory if they are used throughout the year.
Grand Ayatollah Sayyid Khamenei (may Allah protect him):
If the books are necessary for reference and study at the time of purchase and are suitable for their status, then there is no khums on them, even if they are not utilized after the first year.
However, if obtaining the needed volume depends on purchasing a complete set, then there is no khums on it, even if it is not currently needed.
May you be successful in all good.