fix phonon restart


I’d like to address this question to users in the lammps community who have used the fix phonon package, and specifically to Dr. Lingti Kong.

I’m curious about running fix phonon in separate sequential runs using restart files,
and I was wondering how I would go about combining the phonon-bin files which could be subsequently processed by phana. Should I simply try concatenating, or
is there some other way?

Thank you,

I am CCing Ling-ti with the email I have for him.

I think if you understand the format of the phonon-bin files you should be

able to post-process them and combine them however you wish. I don’t

think there is any functionality in fix phonon itself to do that kind

of post-processing.


This is maybe a naive solution, but you could try calling phana (or your own postprocessing tool) on the different binary outputs, and average the results. You can also check the consistency of this method by using multiple fix phonon commands in a single run, say one that’ll output the dynamical matrix twice, and the other only once.


Dear Steve and Anirban,

Thanks for your message.

Steve is right, there is no option to restart with fix-phonon now; a concatenation of the bin file
of fix-phonon does not work either.

As an alternative, when one really need to use multiple runs, a variant of fix-phonon, dump2phonon
() can be used: one pass the dump files from consecutive runs of lammps to the code and it will generate the same bin file as fix-phonon. It should be noted that with dump2phonon, trajectories from other MD code can also be used to evaluate the phonons, but one needs to convert into the lammps dump format. Hope it helps. Regards, LT Kong

Thank you for your help. I wanted to ask you a follow-up question if you may be so kind.

It seems to me that the binary file that fix phonon generates is not platform independent, i.e.
the binary file that I generate using BG/q cannot be read by phana on my ubuntu laptop,
probably due to different sizes of INT, double, etc.

I was curious if you had run into this problem before, and if you could suggest a solution.
Should I try adjusting the fix_phonon.cpp code to write platform independent binary files,
or is there a way to convert the BG/q binary file to a binary file that can read by phana on
my ubuntu laptop?

I tried installing phana on the bgq but I had difficulties installing the prerequisite libraries.


You are right, the binary file written by fix-phonon is not system independent.

One possible solution, as you suggested, is to revise the code. Alternatively, you
can also check the log file of fix-phonon, the Phi matrix was also written as plain
text in that file.

LT Kong

I’m considering altering the code, if that fails I’ll check the log file.

I changed the fix_phonon.cpp file to correct for the sizeof(int) and sizeof(double) and
they matched so that is not the issue. The difference lies in the endianness, where the
bgq platform is big endian and my laptop platform is little endian. I’m considering writing
a swap function but if that fails I’ll try and use the log file.

Thank you for your help.