tp.setup package

Module contents

Tools for setting up calculations and inputs.

Submodules

tp.setup.vasp module

Helps set up VASP calculations.

tp.setup.vasp.gen_ibz(mesh, poscar='POSCAR', symprec=1e-05)[source]

Generates the irreducible kpoints and weights for a mesh and material.

Parameters
  • mesh (array-like) – 3x1 kpoint mesh.

  • poscar (str or pmg.io.vasp.inputs.Poscar, optional) – path to POSCAR file or pmg Poscar object. Default: POSCAR.

  • symprec (float, optional) – symmetry precision. Default: 1e-5.

Returns

  • np.array – irreducible kpoints.

  • np.array – weights.

tp.setup.vasp.get_kpar(kpoints, poscar='POSCAR', symprec=1e-05)[source]

Suggests KPARs for a set of kpoints and material.

Ignores zero-weighted kpoints.

Parameters
  • kpoints (array-like or str or pmg.io.vasp.inputs.Kpoints) – path to KPOINTS or IBZKPT file or 3x1 kpoint mesh or list of kpoint weights or list of kpoints or pmg Kpoints object. Lists of kpoints or weights should be 2D, and zero-weighted kpoints cannot be ignored in the case of lists of kpoints or KPOINTS files without weights.

  • poscar (str or pmg.io.vasp.inputs.Poscar, optional) – path to POSCAR file or pmg Poscar object. Default: POSCAR.

  • symprec (float, optional) – symmetry precision if mesh given. Default: 1e-5.

Returns

potential KPARs in ascending order.

Return type

np.array

tp.setup.vasp.get_kpoints(kpoints, zero_weighted=None, poscar='POSCAR', output='KPOINTS')[source]

Generates a KPOINTS file.

Includes optional zero-weighted kpoints. This will create a file if you supply it with KPOINTS meshes, however this is purportedly not necessarily the same as what vasp would do. To avoid this possibility, we recommend supplying two IBZKPT files, which this will stitch together.

Parameters
  • kpoints (str or array-like or pmg.io.vasp.inputs.Kpoints) – IBZKPT file path or pmg Kpoints object or 3x1 kpoint mesh.

  • zero-weighted (str or array-like or pmg.io.vasp.inputs.Kpoints, optional) – IBZKPT file path or pmg Kpoints object or 3x1 kpoint mesh. Default: no zero-weighted kpoints.

  • poscar (str or pmg.io.vasp.inputs.Poscar, optional) – path to POSCAR file or pmg Poscar object. Default: POSCAR.

  • output (str, optional) – output filename. Default: KPOINTS.

Returns

writes to file

Return type

None