findtde.multi_tde module#

Python module used to submit several find_tde jobs at once.

findtde.multi_tde.find_multiple_tde(directions: numpy.typing.ArrayLike, atom_type: str, atom_number: int, ke_i: int = 25, ke_cut: int = 40, mode: str = 'L', conv: str = 'standard', prog: str = 'vasp', lmp_ff: str = 'AlGaN.sw', exec_line: str | None = None, submit_cmd: str = 'sbatch', submit_filepath: pymatgen.util.typing.PathLike = PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/findtde/checkouts/latest/docs/inp/run_ftde.slurm')) None[source]#

Function used to write and submit multiple instances for findTDE.

Parameters:
  • (ArrayLike) (directions) – 2D array of lattice or spherical directions to be used to calculate velocity vectors.

  • (str) (submit_cmd) – Symbol of atom to be used for displacements. Used for specifying atom in structure file and mass used for velocity.

  • (int) (ke_cut) – Index number for which atom of the specified type in the structure file to be used for displacement simulations.

  • (int) – Initial kinetic energy (eV) to be used for findTDE. Defaults to 25.

  • (int) – Cutoff kinetic energy (eV) to stop findTDE if the TDE is found to be above this value. Defaults to 40.

  • (str) – Define directions as lattice (L) or spherical (S) directions. Defaults to L (lattice directions).

  • (str) – Define the convergence method for findTDE. Options are standard (increase by 5 until defect found, decrease by 1 to find TDE) and midpoint (increase by 8 until defect found, increase/decrease by bisection to find TDE). Defaults to standard.

  • (str) – Define which program to be used for the displacement calculations. Options are vasp (VASP only), lammpsish (VASP files, LAMMPS calculations), and lammps (LAMMPS only). Defaults to vasp.

  • (str) – If prog is lammpsish or lammps, define which interatomic potential is used. File should be in the inp directory. Defaults to AlGaN.sw (specified so it does not need to be defined for vasp program option).

  • None) (exec_line (str or) – Define the execution line for the specified program (i.e., vasp_std, vasp_gam, lmp, lmp_mpi, etc.). Defaults to None, meaning the defaults are chosen in the find_tde Bash script: ‘srun vasp_std > vasp.out || mpirun vasp_std > vasp.out’ for vasp or ‘srun lmp -in input.tde || mpiexec lmp -in input.tde’ for lammpsish/lammps.

  • (str) – Define submission command used for workload manager (e.g., Slurm, PBE) to be used to run findTDE jobs. Defaults to sbatch (Slurm submission command).

  • (PathLike) (submit_filepath) – Define submission script to be used to run findTDE jobs. Defaults to inp/run_ftde.slurm.

Return type:

Nothing.

findtde.multi_tde.find_multiple_tde_OLD(directions, atom_type, atom_number, ke_i=25, ke_cut=40, mode='L', conv='standard', prog='vasp', lmp_ff='AlGaN.sw', screen_num=0)[source]#

Function used to write and submit multiple instances for find_tde.

findtde.multi_tde.lat2sph(uvw, ai)[source]#

Function converting from lattice directions to spherical coordinates. Given two 2D arrays, one for lattice directions and one for lattice vectors, returns a 2D array of the spherical coordinates corresponding to the lattice directions.

findtde.multi_tde.read_pseudo_atom_info(pseudo_atom_filename)[source]#

Read pseudo_atom info into structured numpy array to be used for running findTDE.

findtde.multi_tde.rewrite_find_tde_calcs_keys(base_path='/home/docs/checkouts/readthedocs.org/user_builds/findtde/checkouts/latest/docs', directions_filename='latt_dirs_to_calc.csv', ke_cut=45)[source]#

Writes the text file used by find_tde to perform calculations. Requires a direction list (L or S) as well as the atom type (string) and number (int), uses 25 eV initial KE and lattice direction mode by default (can use any integer KE or spherical direction mode (S)).

findtde.multi_tde.scale_C3z_symmetry(rpt)[source]#

Function to scale all given spherical coordinates to a single zone based on threefold rotation symmetry about the c-axis. Given a 2D array of spherical coordinates, returns another 2D array of spherical coordinates with polar angle scaled by 120 deg increments to the desired range.

findtde.multi_tde.split_pseudo_atom_info(pseudo_atoms, pseudo_keyfile, savefile=False)[source]#

Function to split pseudo_atom info and determine direction associated with pseudo. Returns array with information.

findtde.multi_tde.write_find_tde_calcs(direction, atom_type, atom_number, ke_i=25, ke_cut=40, mode='L', directions_filepath='latt_dirs_to_calc.csv')[source]#

Writes the text file used by find_tde to perform calculations. Requires a direction list (L or S) as well as the atom type (string) and number (int), uses 25 eV initial KE and lattice direction mode by default (can use any integer KE or spherical direction mode (S)).

findtde.multi_tde.write_sph_dirs(rpt, directions_filepath='sph_directions.csv')[source]#

Function to write spherical directions to a text/csv file for multi_tde.py use. Given a 2D array of spherical coordinates, writes array values to the file represented by the filepath string.