Phonopy and Phono3py installation from wheels and usage is now modified to assure consistent installation on all clusters including narval: 1) Go to home directory 2)After phonopy is installed: go to home dir and install phon3py for the same environment and python version~ module purge module load StdEnv/2023 module load python/3.13.2 virtualenv --no-download ~/phonopy_env source ~/phonopy_env/bin/activate virtualenv --no-download ~/phono3py_env source ~/phono3py_env/bin/activate Uninstall old version if exists pip uninstall --no-index phono3py pip install h5py==3.13.0 avail_wheels h5py -p 3.13 --all-version name version python arch ------ --------- -------- --------- h5py 3.13.0 cp313 x86-64-v3 h5py 3.12.1 cp313 x86-64-v3 pip install --no-index phono3py avail_wheels phono3py name version python arch -------- --------- -------- --------- phono3py 3.19.2 cp313 x86-64-v3 pip install --no-index --upgrade pip pip freeze --local > requirements.txt deactivate Note creation of requirements.txt file due to change for slurm running (from ticket created by Dhanish) as described on https://docs.alliancecan.ca/wiki/Python#Creating_virtual_environments_inside_of_your_jobs vi requirements.txt contourpy==1.3.1+computecanada cycler==0.12.1+computecanada fonttools==4.60.0+computecanada h5py==3.13.0+computecanada kiwisolver==1.4.8+computecanada matplotlib==3.10.0+computecanada numpy==2.2.2+computecanada packaging==25.0+computecanada phono3py==3.19.2+computecanada phonopy==2.43.2+computecanada pillow==11.1.0+computecanada pyparsing==3.2.4+computecanada python_dateutil==2.9.0.post0+computecanada PyYAML==6.0.2+computecanada scipy==1.15.1+computecanada six==1.17.0+computecanada spglib==2.6.0+computecanada symfc==1.5.4+computecanada Example to run VASP with cutoff of 2 on cedar: vi phonpydispfc2fc3cut2.sh #!/bin/bash -l #SBATCH --job-name=VASP_phonopy_UO2 #SBATCH --account=rrg-szpunarb-ad #SBATCH --nodes=1 #SBATCH --tasks-per-node=1 #SBATCH --mem=0 #SBATCH --time=1:00:00 module load StdEnv/2023 module load python/3.13.2 source ~/phono3py_env/bin/activate #generate displacements phono3py --cutoff-pair=2 -d --dim-fc2="1 1 1" --dim="1 1 1" -c POSCAR #generate displacements phono3py -d --dim="2 2 2" -c POSCAR Example to calc. conductivity VASP on fir (note whole memory used on node): vi phonpythconductQE.sh #!/bin/bash -l #SBATCH --job-name=QE_ThN #SBATCH --account=rrg-szpunarb-ad #SBATCH --nodes=1 #SBATCH --tasks-per-node=64 #SBATCH --mem=0 #SBATCH --time=8:00:00 # Load the modules: module load StdEnv/2023 module load python/3.13.2 source ~/phono3py_env/bin/activate #Calculate conductivity phono3py --mesh 12 12 12 --br Example to run QE on narval (note only required memory used per precessor and can be check using the portal: https://portail.narval.calculquebec.ca/): vi phonpythconductQE.sh #!/bin/bash -l #SBATCH --job-name=QE_ThN #SBATCH --account=rrg-szpunarb-ad #SBATCH --nodes=1 #SBATCH --tasks-per-node=64 #SBATCH --mem-per-cpu=256M #SBATCH --time=48:00:00 # Load the modules: module load StdEnv/2023 module load python/3.13.2 source ~/phono3py_env/bin/activate #Calculate conductivity phono3py --mesh 12 12 12 --br Web with example for running phonopy and phono3py using VASP: https://phonopy.github.io/phonopy/vasp.html Note changes in new version how to run: https://phonopy.github.io/phono3py/vasp.html and using QE: https://phonopy.github.io/phono3py/qe.html https://phonopy.github.io/phono3py/qe.html Comments and tests on thermal conductivity (K) convergence calculations: ThN QE --pa= Grid 300K 300K 1000000 100 104.952 512000 80 106.423 125000 50 111.2 27000 30 121.405 1728 12 827.194 729 9 335.492 125 5 905.177 905.994 Above third and fourt columns present calculations by using the first and second command listed below, respectively: phono3py --mesh="5 5 5" --fc3 --fc2 --br phono3py --qe --dim="2 2 2" -c ThN.in --pa="0 1/2 1/2 1/2 0 1/2 1/2 1/2 0" --mesh="5 5 5" --fc3 --fc2 --br However although results are the same using the primitive cell option (--pa) is faster. Next testing, large sigma for rough mesh: : phono3py --mesh="5 5 5" --sigma 0.9 0.5 0.1 0.01 --fc3 --fc2 --b Grid 125 5 Sigma K at 300K 0.9 25.598 0.5 43.495 0.1 6398550.464 0.01 453202502.3 phono3py --mesh="9 9 9" --sigma 0.9 0.5 0.1 0.01 --fc3 --fc2 --b Grid 729 9 Sigma K at 300K 0.9 24.168 0.5 35.834 0.1 20829.625 0.01 60339490.73 What is acceptable the largest value to be used for sigma? Sigma should be as small as possible while sampling mesh should be as dense as possible. If you plot DOS with a small sigma, you can see the DOS will show spikes, but at dense sampling, DOS shows a roughly smooth curve. A smooth curve can be obtained by large sigma, but the detailed structure of DOS will be lost. What we want is the limit, which is expected to be smooth while detailed. The tetrahedron method has no parameter like sigma, but it's an interpolation scheme. Therefore, you have to check convergence over density of sampling mesh. In both cases, the convergence behaviour depends on the system (crystals). Togo Other comments on installation: In the event your environment was setup incorrectly please do the following before installation: module purge module load StdEnv/2023 module load python/3.13.2 rm -rf $HOME/phono3py_env virtualenv $HOME/phono3py_env source $HOME/phono3py_env/bin/activate pip install --no-index phono3py deactivate ``` To use the env: ``` module purge module load StdEnv/2023 module load python/3.13.2 source $HOME/phono3py_env/bin/activate ``` Do use above installation instructions to unistall the previous version if you want to install a new one by replacing installation line, respectively with: pip uninstall phonopy pip uninstall phono3py Note there may be different environment loaded on different clusters when using not explicit specification in comands on cluster like e.g.: module load StdEnv/2020 scipy-stack and observed (Barbara, Jaya) on narval therefore it is recommended to avoid it and in general: To make absolutely sure that Python environment is reproducible, please use: `pip freeze > requirements.txt` when the environment is activated to generate a file that contains all installed packages and their versions. Then, to recreate the environment please use: ``` source ~/phono3py_env/bin/activate pip install --no-index -r requirements.txt ``` Reference: Python documentation [https://docs.alliancecan.ca/wiki/Python].