I just clicked the wrong button that I cancelled the post. I still want to ask the questions. So I send this mail to ask the questions again. I am very sorry about that.

I want to do EMD simulations of Si bulk materials. I want to calculate the phonon vibrational spectrum. And I also want to calculate velocity and heat current autocorrelation from a bunch of different starting points. As far as I know, LAMMPS does not do these jobs. So I’d like to ask if I can plug some programs(subroutine) that I wrote by Fortran(or other languages) in LAMMPS to compute instead of post-processing a dump file?

Thank you for taking the time for reading this mail.

I just clicked the wrong button that I cancelled the post. I still want to
ask the questions. So I send this mail to ask the questions again. I am very
sorry about that.

don't worry about it. since you cancelled, it showed up the mailing
list admin interface only once.

I want to do EMD simulations of Si bulk materials. I want to calculate the
phonon vibrational spectrum. And I also want to calculate velocity and heat
current autocorrelation from a bunch of different starting points. As far as
I know, LAMMPS does not do these jobs. So I'd like to ask if I can plug some

it is very rarely needed. the additional computational effort and the
significantly increased memory requirements make this rather
unattractive. keep in mind, that computing auto-correlation functions
from overlapping starting points will have limited gains in terms of
improving the statistics. most LAMMPS users simply choose to run
LAMMPS for a little longer.

programs(subroutine) that I wrote by Fortran(or other languages) in LAMMPS
to compute instead of post-processing a dump file?

please keep in mind, that in LAMMPS data is by its fundamental design
distributed, and thus inserting generic (post-processing) functions
will require either a significant rewrite, to make them compatible
with the data model in LAMMPS, or you have insert reduction
operations, that will collect the data from all parallel nodes to a
single MPI rank (typically rank 0) and then perform the analysis in
serial, which may significantly impede parallel efficiency, so -
depending on your system size and number of processors used - adding
your code, may not help as much as you might expect (see my comment
from above).

that said, there is no principal problem to extend LAMMPS in the way
you describe. the main limitations we see for people trying similar
things, is in their programming proficiency in general and in
understanding the data model employed in LAMMPS.

In addition to Axel’s comments, please take a look at the following commands in LAMMPS:

1. Compute vacf: computes a velocity autocorrelation function
2. Fix ave/correlate: calculates time correlations between one or more global scalar values as inputs. This can be used for your heat current autocorrelation.
3. Fix phonon: a user contributed package that calculates the dynamical matrix for a group of atoms. This can be used for your vibrational spectrum and phonon dispersion curves.

Also note that if you take the Fourier Transform of the VACF, you can obtain a power spectrum which is essentially a type of phonon vibrational spectrum.