Calculation of vibration frequencies and modes

Goal:
I am a complete novice about ASE, I am currently doing a shear loading via lammps and need to use ASE to get the vibrational frequencies and modes of the atoms during the loading process as well as before the loading. (The model has 5000 atoms and is simulated using LJ potential function for 2D adiabatic quasi-static shear simulation)

But now have the following questions:
1, first of all how to read the data file of lammps (before loading), and the dump file during loading.
2, there is a doubt that the dynamics matrix needs the second order derivation of the potential with respect to the position, do I still need to talk about the potential function import during the reading process using ASE.
3、Output each vibration mode with respect to the eigenfrequency, and preferably in a form that can be drawn directly in OVITO.

As I am brand new to ASE and am browsing the ASE guide content, but the above points have been bothering me for a long time, I hope to be able to get guidance, thank you very much!

To do this with the current version of ASE you should use the Vibrations class as documented. When the calculation is finished, use the get_vibrations() method to get a VibrationsData object and write it to a file with its write_json() method. This makes it a bit easier to get back later!

To get mode animations into Ovito, use the iter_animated_mode() method on VibrationsData to get a series of displaced Atoms objects for a mode index of interest. You can write these to an .extxyz file using ase.io.write; Ovito can read trajectories in this format.

Be aware that some of these features were not really tested for use with 5000 atoms so might run slowly or use a lot of memory. Hopefully it will be ok!

Thanks a lot for your reply.
I want to consult for another problem: I got a self-write “potential” file for compute in lammps. Now i don’t know how to put them into ASE as a new calculator for my later calculation.

And the format of the potential file as follow:

# Table for the INT-INT interaction from
INT
N 750
1 0.0020 9.765625E+32 5.859375E+36
2 0.0040 2.384186E+29 7.152557E+32
3 0.0060 1.837575E+27 3.675149E+30
4 0.0080 5.820766E+25 8.731149E+28
5 0.0100 4.000000E+24 4.800000E+27
750 lines

The first column is the number index, second is the distance of 2 atoms, the third is the interatomic energy and the last one is the force between atoms.

Thanks for your patience!

I suggest to open a new topic as this title might not catch the attention of a LAMMPS expert. (I have never used LAMMPS, but deal with vibrations a lot…)

If I got a dynamical matrix which output from LAMMPS directly. Could I deal with the vibration mode and frequency by ASE or other way. And the goal is also output the frequencies and corresponding vibration modes which read by OVITO finally.

I think this is a more practical way to do that.

VibrationsData takes the Hessian and solves it to find the frequencies/displacements. I don’t think there is an object in ASE to read/store the frequencies/displacements directly, or anything that parses this data from LAMMPS.

But if you have the mode displacement vectors it is not very complicated to create a series of displaced Atoms for writing to xyz. See the VibrationsData.iter_animated_method() source code for inspiration if you feel up to writing a bit of Python for this: ase/vibrations/data.py · master · ase / ase · GitLab