The seekpath code automatically standardized the primitive cell, which caused the structure to change and the expected energy band path could not be obtained

Dear all,
I am calculating the energy bands and wannier TB of a particular structure using aiida-wannier90-workflows , but I cannot get the expected results because the seekpath automatically changes the crystal structure. Is there any way to achieve this? How to modify the seekpath.py file to achieve this goal?

I would be very grateful if you could give me some help.

Thank you every much.

Q Li

Hi!

do I understand correctly that you essentially want to disable the seekpath analysis in the workflow to avoid that the structure gets refined?

Could you please provide a few more details about the workflows that you are using? (Personally, I’m not running aiida-wannier90-workflows, but if you point me to the workflows/code, I can have a look)

Best,
Timo

Hi,
Thank you. The new seekpath code can obtain a k-point path for a non-standardized cell using seekpath.get_path_orig_cell functions, but the aiida-wannier90-workflows seems to use an algorithm for automatically modifying primitive cells ( get_path and get_explicit_k_path functions).

Q Li

The aiida-wannier90-workflows as following:
conda activate aiida
verdi daemon start
tot_num_mpiprocs=12
export OMP_NUM_THREADS=1
ulimit -s unlimited
./launch_wannier.py pb_cell.xsf >scdm_1.out

launch_wannier.py.txt (1.7 KB)
Pb_cell.xsf.txt (542 Bytes)

Hi,

thanks for the clarification.

You can circumvent the call of seekpath inside the workflow by explicitly providing the Kpoints as inputs to the Wannier90BandsWorkChain.
Just to give you some context, the workflow calls the following method to determine whether seekpath should be used (aiida-wannier90-workflows/src/aiida_wannier90_workflows/workflows/bands.py at main · aiidateam/aiida-wannier90-workflows · GitHub):

    def should_run_seekpath(self):
        """Seekpath should only be run if the `kpoint_path` or `bands_kpoints` input is not specified."""
        return not any(_ in self.inputs for _ in ("kpoint_path", "bands_kpoints"))

I would suggest you use seekpath.get_path_orig_cell in the beginning (before creating the builder of the workflow) to get the Kpoints of you original cell. When constructing the builder, you can explicitly set the Kpoints (either by using the overrides of the get_builder_from_protocol or by simply setting it afterwards builder.bands_kpoints = points_orig_cell).
Note, there is also the option to only provide the high symmetry Kpoints and Wannier90 will generate the Kpoints (aiida-wannier90-workflows/src/aiida_wannier90_workflows/workflows/bands.py at main · aiidateam/aiida-wannier90-workflows · GitHub). However, since I’m not a Wannier90 user, you probably know which of the options would work best for you.

Hope that helps.