How to create an input mapping file (map.in) for the `fix phonon` command in LAMMPS to calculate the phonon dispersion curve?

I want to calculate the phonon dispersion curve of my double layer (SiC+Graphene) 2D VanderWalls heterostructure (atom data file generated by QuantamATK VNL). I’d like to compute the curve using LAMMPS. To calculate the curve, I will use the fix phonon command (fix 1 all phonon 10 5000 500000 map.in GrapheneSiC nasr 100 ) to generate binary file. I’ll then use a post-processing package(Phana) to calculate the curve from this binary file. However, the fix phonon command requires a map file (map.in), which contains mapping information between atom IDs and lattice indices.
To generate map.in files, I used the latgen package, which is also able to generate atom data files. After compiling latgen on my Linux machine, I discovered that it can only generate the map.in file if it also creates the atom data file at the same time.

I tested latgen for monolayer graphene and it worked well. However, when I tested it for a multilayer structure (2 layers), I discovered that it can only create atom data files and not map.in files simultaneously.
I also noticed that latgen has an option that claims to take atom data file information and generate the desired map.in files. Unfortunately, this option did not work in my tests.

Regarding this issue, I have two questions.
1. Has anyone created a map.in file for a 2D bilayer heterostructure using latgen? If so, how did you create it?
2. Is there an alternative method for creating my desired map.in file for my 2D bilayer heterostructure?

However, my question is only indirectly related to lammps. I’ve been stuck on this issue for a few days. I also tried to generate my desired map.in by looking at the example directory from lammps: Examples\PACKAGES\phonon\4-Graphene. But unfortunately, I was undone. I also tried the default command “fix 1 all phonon 10 5000 500000 GAMMA GrapheneSiC nasr 100” to generate binary atomatically, but it produced incorrect results after post-processing by phana (included in picture). So I made a post here.

Thanks in advance for your time and help.

Best Regards
Durjoy

You are looking at an outdated repository. The current one from L.T. Kong is on GitHub.
Check out: lingtikong (LT Kong) · GitHub
And specifically: fix-phonon/tools at master · lingtikong/fix-phonon · GitHub

1 Like

Thank you for your help , and my apologies for the delay in answering. I tested the code you provided on many different kinds of structures, however it frequently failed to generate map files, including my heterostructure, due to problems during the structure detection step that resulted in the incorrect map files. Using the Graphene example from the Example directory, making the map file for a 2D hexagonal structure is very simple, however if the structure is large, manually generating it is really painful.So I developed a simple Python code that generates map files for any periodic structure based on how many times the unit cell is replicated and how many atoms are in each unit cell. My code works fine in my multiple tests.

Best Regards
Durjoy

1 Like

This is the wrong place to keep discussing this. Rather contact the author of the Phana package. LAMMPS just bundles a copy of his code.