https://github.com/simongravelle/dos-vacf-lammps
Python script for calculating vibrational density of states (DOS) from LAMMPS dump file
https://github.com/simongravelle/dos-vacf-lammps
Last synced: 6 months ago
JSON representation
Python script for calculating vibrational density of states (DOS) from LAMMPS dump file
- Host: GitHub
- URL: https://github.com/simongravelle/dos-vacf-lammps
- Owner: simongravelle
- License: gpl-3.0
- Created: 2024-04-09T08:47:56.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-19T11:57:41.000Z (about 1 year ago)
- Last Synced: 2024-08-20T09:13:47.316Z (about 1 year ago)
- Language: Jupyter Notebook
- Homepage:
- Size: 2.16 MB
- Stars: 6
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://zenodo.org/doi/10.5281/zenodo.13340970)
[](https://www.gnu.org/licenses/gpl-3.0)# DOS and VACF from LAMMPS dump
Python script for calculating the vibrational density of states (DOS) from LAMMPS dump file.
## Cite this repository
You can cite this repository using its DOI: [10.5281/zenodo.13340970](https://zenodo.org/doi/10.5281/zenodo.13340970).
## Theory
The density of state (DoS) has units of time and reads [1]
$$ S(\nu) = \dfrac{2}{k_\text{B} T} \sum_{j = 1}^N \sum_{k = 1}^3 s_j^k (\nu) $$
where $k_\text{B}$ is the Boltzmann constant, $T$ the temperature, $\nu$ the frequency, $N$ the
total number of atoms, and k = x, y, and z in the Cartesian coordinate. $s_j^k$ is the spectral density
of atom $j$ in the $k$ coordinate, has the units of distance$^2$ / time, and can be obtained by the Fourier Transform (FT) of $c_j^k$$$ s_j^k (\nu) = \text{FT} (c_j^k) $$
where $c_j^k$ is the velocity autocorrelation of atom $j$ in the $k$ direction:
$$ c_j^k = \left< v_j^k (t) v_j^k (t + \tau) \right>. $$
$c_j^k$ has the units of distance^2 / time^2.
The total velocity autocorrelation function $C(t)$ is the mass weighted sum of the atom velocity autocorrelation functions, it has the units of mass distance^2 / time, and reads$$ C(t) = \sum_{j = 1}^N \sum_{k = 1}^3 m_j c_j^k (t). $$
$S(\nu)$ can be obtained from the Fourier transform of $C(t)$,
$$ S(\nu) = \dfrac{2}{k_B T} \text{FT} (C(t)).$$
## Example
An example of LAMMPS trajectory file can be obtained by running the LAMMPS input file contained
within the LAMMPS-input/ folder. Run the LAMMPS input file using:```bash
mpirun -np 8 lmp -in input.lammps
```
where `lmp` is your LAMMPS executable.## VACS and DOS
An example of calculation can be found in the Notebook [calculateDOS](calculateDOS.ipynb).




## Sources
Inspired by [dump2VDOS](https://zenodo.org/records/10573320), please cite them if you use this script.
## Reference
[1] Lin, Blanco, and Goddard, J. Chem. Phys., 2003, 119, 22
## Acknowledgement
S.G. acknowledges funding from the European Union's Horizon 2020 research and innovation programme under the Marie Skłodowska-Curie grant agreement N°101065060$, project NanoSep.