skelton-group / phonopy-spectroscopy Goto Github PK
View Code? Open in Web Editor NEWA collection of tools for simulating vibrational spectra, which interfaces with the Phonopy package.
License: MIT License
A collection of tools for simulating vibrational spectra, which interfaces with the Phonopy package.
License: MIT License
when I run a kind of structure, the Raman activity in irreps.yaml and https://www.cryst.ehu.es/cgi-bin/cryst/programs/nph-sam is coincident. But the comment "phonopy-raman -d -c POSCAR-unitcell --bands="1 2 3 4 8 9 10 11 12 13 14 15"" has "Irreducible representations read from "irreps.yaml"" error. I wonder if I have miss out some details?
Hello,
This is an offer of help, but before I get started I want to know if the contribution would be welcome: I suggest creating documentation for this project using mkdocs (https://www.mkdocs.org/). This allows webpage generation from Python docstrings. It can be ran using Github Actions, so that every time a change is pushed to master the documentation will be automatically updated. It is also possible to include tutorials written as a Jupyter Notebook. We implemented similar for ThermoPot (https://github.com/NU-CEM/ThermoPot).
If @JMSkelton and team would welcome the contribution, I will fork the master branch and then put in a PR once implemented.
The other day, I was using VASP+Phonopy with Phonopy-Spectroscopy to calculate the raman spectrum of a 2D materials. When I run phonopy-raman -p --ir_reps
, such error TypeError: load() missing 1 required positional argument: 'Loader'
came out. I think this is a little bug originated from line 212 in file ~/Phonopy-Spectroscopy/SpectroscoPy/Interfaces/Phonopy.py: inputYAML = yaml.load(inputReader)
. When I change this line to inputYAML = yaml.load(inputReader, Loader=yaml.FullLoader)
, the package was normal agian. Here is some extra information for this problem:
https://www.icode9.com/content-4-1189057.html
Hope this message could help perfect this package.
Dear all,
I am experiencing some weird red-shift when using PWSCF as calculator. I know that this was developed with VASP in mind but I was hoping someone here could help me out.
I have compared the DFPT results of PWSCF with the VASP results of the benzene example (using the same unit cell, but relaxed geometry) and I find them in excellent agreement but when using phonopy and phonopy-spectroscopy the modes are red-shifted by a factor of sqrt(2) (at least it seems that way). This does not happen for any extended system but for all the molecules-in-vacuum-box I tested.
Has anyone experienced this? Any command line input I might have missed...?
As an example I attach the highest modes (first the DFPT results and then phonopy)
mode cm-1 THz IR Phonopy
31 3073.41 92.1384 0.0000 127.3836904483
32 3082.09 92.3987 0.0000 127.7387235024
33 3082.23 92.4028 0.0000 127.8205031638
34 3095.56 92.8026 0.7386 128.3666018221
35 3095.73 92.8077 0.7432 128.4551561033
36 3104.16 93.0603 0.0000 128.8032547943
to get to these numbers I used exactly the procedure outlined in the bezene example
phonopy --qe -d --dim="1 1 1" -c scf.in -v
phonopy --qe -f supercell-{1..048}.out
Dielectric constant and Born charges are basically identical with the ones given in the example.
phonopy --dim="1 1 1" --fc-symmetry --mesh="1 1 1" --eigenvectors --qe -c scf.in
_Python version 3.7.3
Spglib version 1.13.0
Calculator interface: qe
Crystal structure was read from "scf.in".
Mesh sampling mode
Settings:
Force constants symmetrization: on
Sampling mesh: [1 1 1]
Supercell: [1 1 1]
Spacegroup: Pm (6)
Use -v option to watch primitive cell, unit cell, and supercell structures.
Forces and displacements are read from "FORCE_SETS".
Computing force constants...
Max drift of force constants: -0.000244 (xx) 0.000000 (zz)
Max drift after symmetrization: -0.000000 (xx) -0.000000 (xx)
Mesh numbers: [1 1 1]
Number of irreducible q-points on sampling mesh: 1/1
Calculating phonons on sampling mesh..._
phonopy-ir --linewidth=16.5 --spectrum_range="000 6000"
I understand that this is not really an issue of Phonopy-Spectroscopy so please feel free to close it at any time. Any help would be much appreciated!
Best,
Chris
Hello,
I am trying to get IR of phenol using Quantum Espresso, phonopy, and phonopy-ir. I calculated the "mesh.yaml" file for phenol using QE+phonopy, and I can see that there is an excellent match for the Gamma point frequencies between my "mesh.yaml" and the one in the phenol example directory. However, the values of lattice parameters in the "mesh.yaml" created by QE+phonopy are in Bohr unit, and thus are very different from the lattice parameters in "mesh.yaml" in the example directory.
With the same BORN file as the example, as I got the IR plots with my "mesh.yaml" file, I can see that there are differences between the result I get, and the plot in the example directory. So, I was wondering which information in the "mesh.yaml" file is important/used by the phonopy-ir code to calculate the IR. Shouldn't similar gamma point frequencies and the same BORN file lead to the same IR plot?
I have attached my calculated IR and a few lines of my "mesh.yaml" file if these can help. Any suggestion will be appreciated!
"mesh.yaml" file:
mesh: [ 1, 1, 1 ]
nqpoint: 1
reciprocal_lattice:
phonon:
By typing " phonopy --dim="6 6 3" --readfc --hdf5 --fc-symmetry --mesh="1 1 1" --eigenvectors", I got a mesh.hdf5 file but not mesh.yaml file. Anyone knows how to solve this?
Phonopy and phono3py have been successfully installed. But installing Phonopy-spectroscopy on the installation website, we encountered problems.
(phonopy) [weitao@mars ~]$ phono3py
_ _____
_ __ | |__ ___ _ __ | / _ __ _ _
| '_ | '_ \ / _ | '_ \ / _ \ |_ | '_ | | | |
| |) | | | | () | | | | () |__) | |) | || |
| .__/|| ||___/|| ||___//| .__/ _, |
|| || |___/
2.6.0
-------------------------[time 2023-05-28 22:32:24]-------------------------
Compiled with OpenMP support (max 112 threads).
Python version 3.9.16
Spglib version 2.0.2
(phonopy) [weitao@mars ~]$ phonopy
_
_ __ | |__ ___ _ __ ___ _ __ _ _
| '_ | '_ \ / _ | '_ \ / _ \ | '_ | | | |
| |) | | | | () | | | | () || |) | || |
| .__/|| ||___/|| ||___() ./ _, |
|| || |/
2.18.0
Compiled with OpenMP support (max 112 threads).
Python version 3.9.16
Spglib version 2.0.2
(phonopy) [weitao@mars ~]$ phonopy-ir -h
Traceback (most recent call last):
File "/home/weitao/software/anaconda3/envs/phonopy/lib/python3.9/site-packages/Phonopy-Spectroscopy/scripts/phonopy-ir", line 10, in
from spectroscopy.utilities import eigenvectors_to_eigendisplacements
ModuleNotFoundError: No module named 'spectroscopy'
and I also tried to the command pip install spectrum_utils[iplot] , but it does not work
Hi,
One of our project students was trying to run your software using the provided instructions, but ran into some issues because some of these seem to be outdated.
Just wanted to alert you to this, if it hadn't been brought up by anyone else. The corrections would be the following;
The PYTHONPATH addition should now read:
export PYTHONPATH=${PYTHONPATH}:/Volumes/Data/Repositories/Phonopy-Spectroscopy**/lib**
Also, the instructions regarding the scripts should refer to this folder in small letters as the capital S in Scripts has been dropped.
Many thanks in advance,
Thijs
Hi
I am trying to install the phonopy-spectroscopy, I followed the method that is mention here(https://github.com/skelton-group/Phonopy-Spectroscopy) and I installed all the dependency packages(via pip)
But, I am getting following error when I am trying to run phonopy-ir from the terminal
bash: /home/condmat2/SOFTWARE/Phonopy-Spectroscopy-master/scripts/phonopy-ir: Permission denied
I request you to suggest the proper method for installation and the reason for this error.
Thank you in advance.
Thanks&Regards
Suneetha N
Research Scholar.
Dept of Physics.
NITK, India.
Hi,
I tried to follow the alpha-SiO2 steps for MgO (one of the examples of phonopy). The input files fc2.hdf5 and fc3.hdf5 were generated using phono3py with dimension for fc2 "2 2 2" and fc3 "1 1 1".
While using the following command. I got the error.
phonopy-ir --ir_reps --linewidth_hdf5="kappa-m484848-g0.hdf5" --linewidth_temperature=300
The error looks like:
Frequencies and eigenvectors read from "mesh.hdf5"
Structure read from "phonopy.yaml"
Atomic masses read from "phonopy.yaml"
Linewidths read from "kappa-m484848-g0.hdf5" (T = 300.00 K)
Irreducible representations read from "irreps.yaml"
Traceback (most recent call last):
File "/global/homes/a/adhikari/Phonopy-Spectroscopy/Scripts/phonopy-ir", line 72, in
frequencies, 'thz', eigendisplacements, becTensors, args, linewidths = linewidths, irRepData = irRepData
File "/global/homes/a/adhikari/Phonopy-Spectroscopy/SpectroscoPy/CLI/Runtime.py", line 93, in RunMode_IR
'ir', frequencies, frequencyUnits, irIntensities, _IR_IntensityUnits, args, linewidths = linewidths, irRepData = irRepData
File "/global/homes/a/adhikari/Phonopy-Spectroscopy/SpectroscoPy/CLI/Runtime.py", line 465, in RunMode_Output
ptFrequencies, ptIntensities, ptIrRepSymbols, ptLinewidths = GroupForPeakTable(frequencies, intensities, irRepData, linewidths = linewidths);
File "/global/homes/a/adhikari/Phonopy-Spectroscopy/SpectroscoPy/TextExport.py", line 174, in GroupForPeakTable
raise Exception("Error: The number of bands references in the ir. rep. groups is more than # modes = {0}.".format(numModes));
Exception: Error: The number of bands references in the ir. rep. groups is more than # modes = 24.
Please help me in this matter.
Thank you,
Puja
Hello,
This is an offer of help, but before I get started I want to know if the contribution would be welcome: I suggest packaging this project so that it can be distributed via PYPI. Not only will it make it easier for people to download, but it will also allow tracking of download stats (https://pypistats.org/) to understand how widely Phonopy-Spectroscopy is being used. It will include creating a pyproject.toml
file and then uploading to PyPI (a good outline of the process can be found at https://carpentries-incubator.github.io/python_packaging/).
If @JMSkelton and team would welcome the contribution, I will fork the master branch and then put in a PR once implemented.
I have installed all the needed packages and have setup the scrip properly.
My question is on generating the Raman and IR spectrum.
I have setup a set of 2x2x2 supercells using phonopy and have done the calculation.
I have generated the irreps.yaml, mesh.yaml, FORCE_SETS.
Do I need to do another set of calculations with phono3py? or can I proccess just with the phonopy calculation output files?
Can you please provide me with instruction on how to proceed from here.
Dear Admin,
My name is Zohan Syah Fatomi.
I am currently graduate student and study vibration in phenol.
I would like to ask, how to get experimental data from this image:
example/Benzene-Derivatives/Phenol/Expt-Comparison.png
Thank you very much.
Sincerely yours,
Zohan
When I calculate the Raman spectrum of glycine, a warning is displayed:invalid value encountered in divide
intensities = np.divide(intensities, norm)
The I(v) [Ang^4 amu^-1] in Raman-Spectrum.dat is 0.00000,but the data in Raman is normalRaman-PeakTable.dat is right,
Could you give me some help?
Hi,
I tried to follow the example alpha-SiO2. While using the following command I get the error.
phonopy-ir --ir_reps --linewidth_hdf5="kappa-m484848-g0.hdf5" --linewidth_temperature=300
The error looks like:
Frequencies and eigenvectors read from "mesh.hdf5"
Structure read from "phonopy.yaml"
Atomic masses read from "phonopy.yaml"
Linewidths read from "kappa-m484848-g0.hdf5" (T = 300.00 K)
Traceback (most recent call last):
File "/global/homes/a/adhikari/Phonopy-Spectroscopy/Scripts/phonopy-ir", line 67, in
linewidths, irRepData = Phonopy_LoadData_Optional(args);
File "/global/homes/a/adhikari/Phonopy-Spectroscopy/SpectroscoPy/CLI/Phonopy.py", line 296, in Phonopy_LoadData_Optional
irRepData = ReadIrRepsYAML(filePath = args.IrRepsYAML);
File "/global/homes/a/adhikari/Phonopy-Spectroscopy/SpectroscoPy/Interfaces/Phonopy.py", line 219, in ReadIrRepsYAML
raise Exception("Error: Ir. reps. are required for the Gamma point modes.");
Exception: Error: Ir. reps. are required for the Gamma point modes.
Please help me in this matter.
Thank you,
Puja
Dear all,
I am trying to calculate the angle resolved spectrum of a 2-atom cell with the command
phonopy-raman -p --mesh-yaml=mesh.yaml --irreps-yaml=irreps.yaml --linewidth=0.1 --theta-step=2.5 --surface="0 1 1"
but I get the following error:
Traceback (most recent call last):
File "/home/antonio/software/phonons/Phonopy-Spectroscopy/scripts/phonopy-raman", line 96, in
run_mode_raman_postproc(
File "/home/antonio/software/phonons/Phonopy-Spectroscopy/lib/spectroscopy/cli/runtime.py", line 473, in run_mode_raman_postproc
_raman_postproc_pol(
File "/home/antonio/software/phonons/Phonopy-Spectroscopy/lib/spectroscopy/cli/runtime.py", line 652, in _raman_postproc_pol
_output_2d_polarised_raman_spectrum(
File "/home/antonio/software/phonons/Phonopy-Spectroscopy/lib/spectroscopy/cli/runtime.py", line 860, in _output_2d_polarised_raman_spectrum
save_raman_intensity_theta(
File "/home/antonio/software/phonons/Phonopy-Spectroscopy/lib/spectroscopy/text_export.py", line 475, in save_raman_intensity_theta
data_rows.append([theta] + [intensity_set[i] for intensity_set in intensity_sets])
File "/home/antonio/software/phonons/Phonopy-Spectroscopy/lib/spectroscopy/text_export.py", line 475, in
data_rows.append([theta] + [intensity_set[i] for intensity_set in intensity_sets])
IndexError: list index out of range
I am using phonopy v 2.21.2 with Python 3.9.13 and Spglib 2.3.1. What can be the source of this error?
Thanks a lot in advance for your help.
Antonio
I am attempting Phonon Spectroscopy with a cubic diamond structure, but I'm encountering an issue where both the peak table and spectrum data return all zero values. I followed the exact process from tutorials and was able to replicate the results successfully for more complex systems like benzene. However, it seems not to be working for simpler systems like diamond. Could you please check this and provide proper guidance?
POSCAR
C2
1.0
0.0000000000000003 1.7803725545451614 1.7803725545451614
1.7803725545451614 0.0000000000000000 1.7803725545451614
1.7803725545451616 1.7803725545451614 0.0000000000000002
C
2
direct
0.4999999999999999 0.5000000000000000 0.4999999999999999 C
0.7500000000000000 0.7500000000000000 0.7500000000000000 C
Rest I am using same command from example.
Hello,
This is an offer of help, but before I get started I want to know if the contribution would be welcome: I suggest creating a unit test suite for this project using pytest (https://docs.pytest.org/en/7.3.x/). The tests would be placed in a folder test
on the master branch. A Github Action can be used to automatically run the tests every time something is pushed to master or a PR is made. They are useful as they can catch (some but not all) breaking changes. I'm don't think I have capacity for writing unit tests for every function/method in this project, but I could make a start and then perhaps others will chip in (and 100% coverage is rarely seen....)
If @JMSkelton and team would welcome the contribution, I will fork the master branch and then put in a PR once implemented.
[irreps.txt] (https://github.com/skelton-group/Phonopy-Spectroscopy/files/12142027/irreps.txt)
Executing the following command:
$ phonopy --dim="2 2 1" --readfc --hdf5 --fc-symmetry --irreps="0 0 0"
the output file "Irreps.yaml" where rotations matrix symbol obtained are E, C3, C3, sgv, sgv, sgv. What is meant by "sgv"? For this file the Raman and IR spectra obtained have all the modes except 3 acoustical modes, both Raman+IR active in monolayer Transition metal dichalcogenide (TMD) system. The examples provided has been reproduced without errors. In previous literature, Xin Zhang et al. has been reported that monolayer TMDs must have E+A2 mode which are IR active, and E+A1 mode which are Raman active. But in the present calculation, no A2 mode is obtained, only A1 and E modes are obtained. The corresponding irreps.yaml is attached here as "irreps.txt" for reference.
Kindly suggest corrections.
when i use the command line "phonopy-ir --ir-reps --linewidth-hdf5="kappa-m484848-g0.hdf5" --linewidth-temperature=300",it tell me"phonopy-ir: error: unrecognized arguments: --ir-reps",what is the problem?
Dear Jonathan,
I tried to mimic the example you provided for alpha-SiO2.
In the last step, I get the error when using the following command:
phonopy-raman -p --ir-reps --linewidth-hdf5="kappa-m484848-g0.hdf5" --linewidth-temperature=300
An error is reported:
usage: phonopy-raman [-h] [--mesh_yaml <file_path>] [--mesh_hdf5 <file_path>]
[--phonopy_yaml <file_path>] [-c <file_path>]
[--ir_reps_yaml <file_path>]
[--linewidth_hdf5 <file_path>]
[--linewidth_temperature ] [-d]
[-r [ ...]] [-p] [--amplitude ]
[--step_type < delta_q | max_r | norm_x >]
[--bands <band_indices>]
[--freq_units < thz | inv_cm | mev | um >] [--ir_reps]
[--linewidth ] [--spectrum_range , ]
[--spectrum_resolution ]
[--instrument_broadening ]
[--instrument_broadening_shape ] [-o ]
[--data_format dat | csv]
phonopy-raman: error: unrecognized arguments: --ir-reps --linewidth-hdf5=kappa-m484848-g0.hdf5 --linewidth-temperature=300
It seems that the parameters after -p are not well recognized.
When I remove the unrecognizable parameters, I get the correct peak position and the wrong linewidth.
That at least means I didn't make a mistake before, right?
Very much looking forward to your reply.
Best wishes,
FlareFun
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.