If the --file-prefix argument to janus phonons includes a new directory e.g. phonons/system, Janus will calculate the forces and then fail to write anything as Phonopy complains it cannot write to a file in a non-existent directory.
We can avoid this situation by using Pathlib to create the new filename and make the directory if necessary before moving on:
If the
--file-prefix
argument tojanus phonons
includes a new directory e.g.phonons/system
, Janus will calculate the forces and then fail to write anything as Phonopy complains it cannot write to a file in a non-existent directory.We can avoid this situation by using Pathlib to create the new filename and make the directory if necessary before moving on: