yuzie007 / upho

Band unfolding for phonons
http://yuzie007.github.io/upho/
MIT License
48 stars 22 forks source link

There is an error in api_unfolding.py #2

Closed 373Kice closed 4 years ago

373Kice commented 4 years ago

upho-0.6.1-py3.7.egg/upho/api_unfolding.py", line 52, in init NameError: name 'primitive_matrix' is not defined

when I run upho_weights band.conf, it return an NameError;

elif primitive_matrix is not None:
            self._primitive_matrix_ideal = np.array(primitive_matrix_ideal,
                                              dtype='double', order='c')

in line 52, does the primitive_matrix means primitive_matrix_ideal ? After I change primitive_matrix to primitive_matrix_ideal, it can work.

yuzie007 commented 4 years ago

Thank you for trying the code as well as the issue. Unfortunately, without details of your calculations, I cannot provide you concrete advices. Maybe you can first check if you correctly have "PRIMITIVE_AXIS" tag in your band.conf. Changing the code and working does NOT immediately mean we do the correct thing.

Niloou commented 4 years ago

Dear all, I also face such error. I am doing calculation on a distorted structure with body centered orthorhombic crystal (space group i4/mcm , # 140) and I want to unfold the phonon band of this structure on to the main cubic structure (with space group # 221) . I would be thankful for any help in advance. This is the exact error :

UPHO version. 0.6.1

dict_input: {'force_constants': 'FORCE_CONSTANTS', 'projection': 'eigenvectors', 'run_mode': 'band', 'star': 'sym', 'structure': 'POSCAR', 'structure_ideal': 'POSCAR_ideal'}

run_mode: band star: sym projection: eigenvectors fc_filename: FORCE_CONSTANTS supercell_matrix: [[2 0 0] [0 2 0] [0 0 2]] primitive_matrix: [[ 1. 1. 0.] [-1. 1. 0.] [ 0. 0. 2.]] Traceback (most recent call last): File "/home/nh84temy/anaconda3/envs/phonopy/bin/upho_weights", line 255, in main() File "/home/nh84temy/anaconda3/envs/phonopy/bin/upho_weights", line 164, in main log_level=log_level) File "/home/nh84temy/anaconda3/envs/phonopy/lib/python3.7/site-packages/upho/api_unfolding.py", line 52, in init elif primitive_matrix is not None: NameError: name 'primitive_matrix' is not defined

Bests,