rohskopf / modecode

Massively parallel vibrational mode calculator.
21 stars 8 forks source link

LAMMPS installation #14

Open Dexter5166 opened 1 year ago

Dexter5166 commented 1 year ago

Hello Drew. I came across your paper and hence, the mode code. Thank you for providing this powerful tool. I intend to use it in my research activities. I am interested in redoing the interface problem. You have already provided the files in the example folder. However, I cannot use the files in the folder <2_simulate_energy_transfer> because the files use some fix and compute commands that are not present in the standard installation of LAMMPS. I have installed LAMMPS as you gave in the readme file using the command <make yes-MANYBODY mode=shlib g++_openmpi>. But I think I need to make further changes in the src files to include the fix_mode and compute_keA etc., commands and then reinstall the LAMMPS. Is this the case, or what is the way around this?

rohskopf commented 1 year ago

Hi @Dexter5166 , thanks for your interest.

The LAMMPS computes are not a supported part of ModeCode, as ModeCode is primarily concerned with the modes and their coupling constants. These LAMMPS computes may therefore require some tinkering or bringing up to date with the current LAMMPS version, if LAMMPS simulations are desired using ModeCode outputs like eigenvectors and coupling constants.

Regarding that interface example:

  1. Use ModeCode to get eigenvectors and spatial coupling constants: https://github.com/rohskopf/modecode/tree/main/examples/interface_transfer/1_get_modes. These quantities correspond to couplings for transport across the interface using these equations in the SI: image

  2. Now regarding the LAMMPS computes. The only compute needed for that example is here: https://github.com/rohskopf/modecode/blob/18b0a27a8b83fbdf1521faea6ca33b1d199dda1a/examples/interface_transfer/2_simulate_energy_transfer/in.run#L64C1-L64C85 which uses this compute: https://github.com/rohskopf/modecode/blob/main/lammps/compute_mode_heatflux2.cpp to simulate Equation 11 above.

Again the LAMMPS computes may require bringing up to date in order to work. Maybe some day these can become an official part of LAMMPS.

Dexter5166 commented 1 year ago

Thank you for your reply, Drew. I am pretty new to LAMMPS and still understanding its functions, but your explanation makes sense. I will do what you have suggested.

Dexter5166 commented 1 year ago

Hello Drew, I am beginning to understand your work and I think you have done a great job here. I was going through the interface problem, and somehow still not see how you are implementing the Gaussian shape wave packet initiation in your codes. I can see the coordinate transform using Fourier series in the computes but I can't find where you have initialized a Gaussian wavepacket. Please make me aware. Thank you.

rohskopf commented 1 year ago

@Dexter5166 ModeCode does not perform Gaussian wave-packets in LAMMPS.

rohskopf commented 1 year ago

The wave packet was formed by initializing positions and velocities according to the common method: https://pubs.aip.org/aip/apl/article-abstract/80/14/2484/514819

If you initialize a wave packet correctly, you will see a Gaussian in mode space :D

Dexter5166 commented 1 year ago

Oh yes, I was following this paper before following your work. As I mentioned before, I am new to using LAMMPS and this field. I was thinking of initialising the velocity field as Gaussian using the velocity command of LAMMPS and then seeing how total energy changes. But for that, I think all atoms should have zero velocity and only a few should have this velocity field. But as mentioned in your Supplementary Info you have done something else, I think. BTW thank you for your reply.

rohskopf commented 1 year ago

Yes the SI has a procedure for making WPs at finite temperature.

There are many ways to do this, it doesn't need to use LAMMPS commands.

E.g. I had a long gone Python script to just apply these equations and make a LAMMPS data file (which includes velocities as well).

Unfortunately making a general wave-packet program that works for all atomic systems is a lot of work, so this must be done on a case-by-case for now.

Dexter5166 commented 1 year ago

Okay thank you so much Drew for replying to me on my queries.