findtde.defect_analysis module#

Python module used to characterize defects resulting from TDE calculations.

findtde.defect_analysis.PBC_distance(x0, x1, dimensions)[source]#

Source: https://stackoverflow.com/a/11109336 Function that takes 3 numpy arrays: an initial position array, a final position array, and the dimensions of the boundary. Returns an array for the distance, taking into account Periodic Boundary Conditions (PBC).

findtde.defect_analysis.average_tde_vals(defects_dict, pseudo_keys, lattice_vecs, dir_range=((0, 360), (0, 180)))[source]#

Function to average the TDE values for each atom type over the given range of directions.

findtde.defect_analysis.cart2sph(x, y, z)[source]#
findtde.defect_analysis.defect_analysis(defect_file, ref_file, verbose=False)[source]#

Perform WS analyses

findtde.defect_analysis.find_contcars(base_path, pseudo='*')[source]#

Function to create an array of post-CGM CONTCAR files for defect analysis.

findtde.defect_analysis.find_defects_multi_files(base_pos_path, cont_paths)[source]#

Given an initial POSCAR file and any number of post-AIMD, post-CGM CONTCAR files, returns the defect positions by comparing final atomic positions to initial atomic positions. File input is a string for the POSCAR filepath and an array of strings for the CONTCAR filepaths.

findtde.defect_analysis.find_dumpfiles(base_path, pseudo='*')[source]#

Function to create an array of post-MD dump files for defect analysis.

findtde.defect_analysis.fp_sep_dist(base_pos_path, cont_paths, lattice_vecs, atom_type='ga', atom_no=34)[source]#

Given an initial POSCAR file and any number of post-AIMD, post-CGM CONTCAR files, returns the Frenkel pair separation distance after determining defect positions in the structure. File input is a string for the POSCAR filepath and an array of strings for the CONTCAR filepaths.

findtde.defect_analysis.get_tde_from_datafile(data_filepath='*_data.csv', e_tol=1.0, ke_cut=45)[source]#

Scans a findTDE *_data.csv file and returns the TDE value for the specified knockout type.

findtde.defect_analysis.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.defect_analysis.parse_defect_properties(defects_dict, atom_types=['Ga', 'N'])[source]#

Function to analyze the defect properties for each calculation contained in a dictionary.

findtde.defect_analysis.pseudo_keys_from_file(pseudo_keyfile='pseudo_keys.csv')[source]#

Function to convert a CSV file of pseudo keys to a dictionary.