{"id":23820956,"url":"https://github.com/june976/vibration-plot-mode-in-vesta-2","last_synced_at":"2025-10-20T07:58:59.422Z","repository":{"id":206140024,"uuid":"715947457","full_name":"June976/vibration-plot-mode-in-vesta-2","owner":"June976","description":"Automatically generates visualizations of vibrational modes from vasp calcualtion results or Phonopy calculation results.","archived":false,"fork":false,"pushed_at":"2023-12-05T02:35:34.000Z","size":315,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-07T17:25:05.569Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/June976.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-11-08T06:46:47.000Z","updated_at":"2024-10-26T01:39:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"af3d1236-9bae-4406-9f76-0a2efb1918c8","html_url":"https://github.com/June976/vibration-plot-mode-in-vesta-2","commit_stats":null,"previous_names":["june976/vibration-plot-mode-in-vesta--"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/June976/vibration-plot-mode-in-vesta-2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/June976%2Fvibration-plot-mode-in-vesta-2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/June976%2Fvibration-plot-mode-in-vesta-2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/June976%2Fvibration-plot-mode-in-vesta-2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/June976%2Fvibration-plot-mode-in-vesta-2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/June976","download_url":"https://codeload.github.com/June976/vibration-plot-mode-in-vesta-2/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/June976%2Fvibration-plot-mode-in-vesta-2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273992353,"owners_count":25203724,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-02T08:19:20.745Z","updated_at":"2025-10-20T07:58:54.403Z","avatar_url":"https://github.com/June976.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vibration-plot-mode-in-vesta-2\n\n## Abstract\n\nThis is an updated version of [vibration-plot-mode-in-vesta](https://github.com/faradaymahe/vibration-plot-mode-in-vesta) code. The main function is the same as older version, which is to automatically convert the vibration modes at **Γ point** calculated by other software to Vesta format file to visualize it. The improvements include:\n\n- Simplify operating procedures and make it more automated: No more manual generation of initial Vesta files.\n- More complete information: Beside the vibration modes in vesta file, other information such as vibration frequency, atoms cartesian coordinate etc is also exported to a csv file.\n- **Supports converting results from more calculation software: Not only the results of vasp calculation, the calculation results of phonopy are also supported.**\n\n## Usage\n\n### **1.** Generate VESTA mode files from VASP calculation\n\n\u003e a. Perform phonons calculation in vasp\n\nThere are two methods to calculate phonons at Γ point in vasp. The first is [finite differences](https://www.vasp.at/wiki/index.php/Phonons_from_finite_differences).For [finite differences](https://www.vasp.at/wiki/index.php/Phonons_from_finite_differences) calculation, **IBRION** should be set 5 or 6, **NSW=1**, and **ISIF**, **POTIM**, **NFREE** should be set carefully.\n\nThe second method is [density-functional-perturbation theory](https://www.vasp.at/wiki/index.php/Phonons_from_density-functional-perturbation_theory), For [density-functional-perturbation theory](https://www.vasp.at/wiki/index.php/Phonons_from_density-functional-perturbation_theory) calculation, **IBRION** should be set 7 or 8, **NSW=1**.\n\nAfter this step, you can get the **OUTCAR** from the calculation. Also, the input file **POSCAR** is needed for next step.\n\n\u003e b. Run python script\n\nWith **POSCAR** file and **OUTCAR** file from previous step, now run command \n```bash\npython vasp_modes_to_vesta.py\n```\nand you can get the result.\n\nThe dependent libraries for running the python script are:\n- [numpy](https://numpy.org/)\n- [pandas](https://pandas.pydata.org/)\n- [pymatgen](https://pymatgen.org/)\n- sys, os, re\n\nThe parameters that need to be set in the python script are:\n```python\ndir_out_file = 'out'                                        # The directory for saving result file   \nscaling_factor = 3                                          # The scale factor of the length of vector in VESTA file     \nposcar_filename = './POSCAR'                                # The full path of POSCAR for VASP frequency calculation\noutcar_filename = './OUTCAR'                                # The full path of OUTCAR generated in VASP frequency calculation\ncmd_vesta_path = 'D:\\VESTA-win64\\VESTA-win64\\VESTA.exe'     # The full path of VESTA command\n```\n\n---\n\n### **2.** Generate VESTA mode files from Phonopy calculation\n\n\u003e a. Perform force sets calculation in phonopy\n\nSince phonopy itself cannot perform DFT calculation, this step requires the use of DFT software. vasp, quantum-espresso, abinit, etc. are all ok. Here is the referencce:\n- vasp: [https://phonopy.github.io/phonopy/vasp.html#vasp-interface](https://phonopy.github.io/phonopy/vasp.html#vasp-interface)\n- qe: [https://phonopy.github.io/phonopy/qe.html](https://phonopy.github.io/phonopy/qe.html)\n- cp2k: [https://phonopy.github.io/phonopy/cp2k.html](https://phonopy.github.io/phonopy/cp2k.html)\n- ...\n\nBefore calculating force sets, the input parameters of **supercell_matrix** and initial unitcell are also needed for next step, together with the force sets file generated in this step.\n\n\u003e b. Run python script\n\nWith **unitcell** file , **force sets** file and **supercell_matrix** from previous step, now run command \n```bash\npython phonopy_modes_to_vesta.py\n```\nand you can get the result.\n\nThe dependent libraries for running the python script are:\n- [numpy](https://numpy.org/)\n- [pandas](https://pandas.pydata.org/)\n- [pymatgen](https://pymatgen.org/)\n- [phonopy](https://phonopy.github.io/phonopy/#)\n- sys, os\n\nThe parameters that need to be set in the python script are:\n```python\ndir_out_file = 'out'                                        # The directory for saving result file  \nscaling_factor = 3                                          # The scale factor of the length of vector in VESTA file             \nsupercell_matrix = [4, 4, 1]                                # The supercell matrix used for force sets calculation\nunitcell_filename = './CONTCAR'                             # The unit cell used for force sets calculation\nforce_sets_filename = './FORCE_SETS'                        # The force sets file path calculated by Phonopy\ncmd_vesta_path = 'D:\\VESTA-win64\\VESTA-win64\\VESTA.exe'     # The full path of VESTA command\n```\n\n## Tips\n\n### **1.**  How to read phonons calculation results from OUTCAR file\n\n![outcar](./figs/outcar.png)\n\n\u003e [https://www.vasp.at/wiki/index.php/Phonons_from_finite_differences](https://www.vasp.at/wiki/index.php/Phonons_from_finite_differences)\n\n### **2.**  How to read eigenvectors from phonopy calculation\n\n\u003csection id=\"general\"\u003e\n\u003ch4\u003eGeneral\u003ca class=\"headerlink\" href=\"#general\" title=\"Permalink to this heading\"\u003e#\u003c/a\u003e\u003c/h4\u003e\n\u003ctable class=\"table\"\u003e\n\u003ccolgroup\u003e\n\u003ccol style=\"width: 20.0%\"\u003e\n\u003ccol style=\"width: 80.0%\"\u003e\n\u003c/colgroup\u003e\n\u003cthead\u003e\n\u003ctr class=\"row-odd\"\u003e\u003cth class=\"head\"\u003e\u003cp\u003eKey\u003c/p\u003e\u003c/th\u003e\n\u003cth class=\"head\"\u003e\u003cp\u003eDescription\u003c/p\u003e\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr class=\"row-even\"\u003e\u003ctd\u003e\u003cp\u003enqpoint\u003c/p\u003e\u003c/td\u003e\n\u003ctd\u003e\u003cp\u003eNumber of q-points calculated.\u003c/p\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr class=\"row-odd\"\u003e\u003ctd\u003e\u003cp\u003enatom\u003c/p\u003e\u003c/td\u003e\n\u003ctd\u003e\u003cp\u003eNumber of atoms in the primitive cell.\u003c/p\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr class=\"row-even\"\u003e\u003ctd\u003e\u003cp\u003ephonon\u003c/p\u003e\u003c/td\u003e\n\u003ctd\u003e\u003cp\u003eKey name of list for q-points.\u003c/p\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr class=\"row-odd\"\u003e\u003ctd\u003e\u003cp\u003eq-position\u003c/p\u003e\u003c/td\u003e\n\u003ctd\u003e\u003cp\u003ePosition of q-vector in reduced coordinates.\u003c/p\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr class=\"row-even\"\u003e\u003ctd\u003e\u003cp\u003eband\u003c/p\u003e\u003c/td\u003e\n\u003ctd\u003e\u003cp\u003eKey name of list for bands.\u003c/p\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr class=\"row-odd\"\u003e\u003ctd\u003e\u003cp\u003efrequency\u003c/p\u003e\u003c/td\u003e\n\u003ctd\u003e\u003cp\u003ePhonon frequency in a specified unit at each phonon mode\u003c/p\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr class=\"row-even\"\u003e\u003ctd\u003e\u003cp\u003eeigenvector\u003c/p\u003e\u003c/td\u003e\n\u003ctd\u003e\u003cp\u003eEigenvector at each phonon mode.\nEach eigenvector :math:\u003ccode class=\"docutils literal notranslate\"\u003e\u003cspan class=\"pre\"\u003e\\mathbf{e}\u003c/span\u003e\u003c/code\u003e of\n\u003ca class=\"reference internal\" href=\"formulation.html#dynacmial-matrix-theory\"\u003e\u003cspan class=\"std std-ref\"\u003edynamical matrix\u003c/span\u003e\u003c/a\u003e\nis shown as sets of three\ncomplex values of each atom along the Cartesian axes in\nthe primitive cell. The real and imaginary values\ncorrespond to the left and right, respectively.\nA set of eigenvectors comprising all bands at a q-point\nforms a unitary matrix obtained as the result of\nnumpy.linalg.eigh, i.e., LAPACK of routine _heevd.\nTherefore eigenvectors correspond to the column vectors\nof the unitary matrix.\u003c/p\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr class=\"row-odd\"\u003e\u003ctd\u003e\u003cp\u003egroup_velocity\u003c/p\u003e\u003c/td\u003e\n\u003ctd\u003e\u003cp\u003eGroup velocity at each phonon mode in the\nCartesian coordinates defined in the unit cell.\u003c/p\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/section\u003e\n\n\u003e [https://phonopy.github.io/phonopy/output-files.html#general](https://phonopy.github.io/phonopy/output-files.html#general)\n\nThe form of eigenvector output by phonopy\n\n|  | Band #1 | Band #2 | ... | Band #3N|\n| :---: | :---: | :---: | :---: | :---: | \n| Atom #1 | Eig_X | Eig_X | ... | Eig_X |\n| Atom #1 | Eig_Y | Eig_Y | ... | Eig_Y |\n| Atom #1 | Eig_Z | Eig_Z | ... | Eig_Z |\n| ... | ... | ... | ... | ... |\n| Atom #N | Eig_X | Eig_X | ... | Eig_X |\n| Atom #N | Eig_Y | Eig_Y | ... | Eig_Y |\n| Atom #N | Eig_Z | Eig_Z | ... | Eig_Z |\n\n\n## References\n\nRefers to the examples of [Si](https://github.com/June976/vibration-plot-mode-in-vesta-2/tree/main/Si) for more details.\n\nSome related repositories in Github:\n- [vibration-plot-mode-in-vesta](https://github.com/faradaymahe/vibration-plot-mode-in-vesta)\n- [Phonopy_VESTA](https://github.com/AdityaRoy-1996/Phonopy_VESTA)\n- [VASP-plot-modes](https://github.com/Stanford-MCTG/VASP-plot-modes)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjune976%2Fvibration-plot-mode-in-vesta-2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjune976%2Fvibration-plot-mode-in-vesta-2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjune976%2Fvibration-plot-mode-in-vesta-2/lists"}