Topological Material Analysis 0.5
Analyse the structures of materials using tools from TDA
Loading...
Searching...
No Matches
depracated_single_mode Namespace Reference

Functions

 read_configuration (str configuration_file, str configuration)
 import a specified structure from a configuration file
 
 read_computation_settings (str settings_file, settings_name)
 
 read_sample (str structure_file, str configuration)
 import a specified sample range from a configuration file
 
 read_oineus_settings (str structure_file, str setting_name)
 import settings for kernel/image/cokernel
 
 sample_at (str file_path, str format, sample_index, int repeat_x, int repeat_y, int repeat_z, atom_list, radius_list)
 Sample a structure at a particular time, with cell repetitions.
 
 weighted_alpha_diode (points)
 Use diode to fill the weighted alpha shapes.
 
 convert_simps_to_oineus (list simplices)
 Diode is set to create simplices for dionysus, so we need to convert them to the correct type for oineus.
 
 oineus_compare (x, y)
 Comparison to compare list of simplicies to get them in the order for oineus.
 
 sub_complex (pd.DataFrame points, float z_upper, float z_lower)
 Given the points, and the upper and lower thresholds in the 'z'-component.
 
 oineus_filtration (pd.DataFrame points, oineus.ReductionParams params)
 Given a set of points, compute the oineus.filtration of the alpha complex.
 
 oineus_pair (pd.DataFrame points, list sub)
 Given a set of points, and the points that are in the subset L, construct the complexes and map between them.
 
 oineus_process (pd.DataFrame points, oineus.ReductionParams params)
 Given some points with weights, and the number of threads to use, obtain the persistent homology of the weighted alpha complex of these points, using oineus.
 
 oineus_kernel_image_cokernel (pd.DataFrame points, oineus.ReductionParams params, float upper_threshold, float lower_threshold)
 Given points, and parameters for oineus, calculate the kernel/image/cokernel persistence as desired.
 
 calculate_APF (dgm)
 Calcualte the APF from a diagram.
 
 load_configuration_settings ()
 
 load_computation_settings ()
 
 compute ()
 

Variables

 params
 
 loaded
 
 processed
 
 plotted
 
 file_path = st.text_input("Intial structure file:",key="file_path")
 
 file_format = st.text_input("File format:", key="file_format",placeholder="Auto")
 
 manual_config = st.checkbox("Manually specify configuration", key="manual_config")
 
 config_file
 
 key
 
 config_name
 
 atoms
 
 radii
 
 sample_index
 
 repeat_x
 
 repeat_y
 
 repeat_z
 
 manual_compute = st.checkbox("Manually specify settings for the computations (i.e number of threds, and if you want to compute kernel/image/cokernel)", key="maual_comp_config")
 
 same_config_file = st.checkbox("The computation settings are in the same configuration file.", key="same_config_file")
 
 comp_file
 
 comp_name
 
 kernel
 
 image
 
 cokernel
 
 placeholder
 
 n_threads
 
 thickness
 
 pd_checks = st.columns(3)
 
 pd0 = st.session_state["pd0"]
 
 pd1 = st.session_state["pd1"]
 
 pd2 = st.session_state["pd2"]
 
 apf_checks = st.columns(3)
 
 apf0 = st.session_state["apf0"]
 
 apf1 = st.session_state["apf1"]
 
 apf2 = st.session_state["apf2"]
 
 on_click
 

Function Documentation

◆ calculate_APF()

depracated_single_mode.calculate_APF ( dgm)

Calcualte the APF from a diagram.

Parameters
dgmthe diargam you want to calculate the APF for
Returns
APF the APF as a list of coordiantes

◆ compute()

depracated_single_mode.compute ( )

◆ convert_simps_to_oineus()

depracated_single_mode.convert_simps_to_oineus ( list simplices)

Diode is set to create simplices for dionysus, so we need to convert them to the correct type for oineus.

Parameters
simplicesa list of simplices from diode
Returns
oin_simps a list of oineus simplices

◆ load_computation_settings()

depracated_single_mode.load_computation_settings ( )

◆ load_configuration_settings()

depracated_single_mode.load_configuration_settings ( )

◆ oineus_compare()

depracated_single_mode.oineus_compare ( x,
y )

Comparison to compare list of simplicies to get them in the order for oineus.

Parameters
xsimplex to compare
ysimplex to compare
Returns
-1 if x<y, 1 otherwise

◆ oineus_filtration()

depracated_single_mode.oineus_filtration ( pd.DataFrame points,
oineus.ReductionParams params )

Given a set of points, compute the oineus.filtration of the alpha complex.

Parameters
pointspd.DataFrame containing points and their weights
paramsoineus.ReductionParams which contains the settings for oineus
Returns
K oineus.filtration

◆ oineus_kernel_image_cokernel()

depracated_single_mode.oineus_kernel_image_cokernel ( pd.DataFrame points,
oineus.ReductionParams params,
float upper_threshold,
float lower_threshold )

Given points, and parameters for oineus, calculate the kernel/image/cokernel persistence as desired.

Parameters
pointspd.DataFrame of the points, with columns 'x','y','z','w' corresponding to the coordinates and weights respectively
kernelboolean parameter to set if kernel persistence is calculated
imageboolean parameter to set if image persistence is calculated
cokernelboolean parameter to set if cokernel persistence is calculated
n_threadsnumber of threads to use in oineus
upper_thresholdfloat, z-coordinate above which points are in the subcomplex
lower_thresholdfloat z-coordinate below which points are in the subcomplex
Returns
kicr oineus object which contains the kernel, image, cokernel persistence diagrams as required, can also calculate ones that weren't initially specificed

◆ oineus_pair()

depracated_single_mode.oineus_pair ( pd.DataFrame points,
list sub )

Given a set of points, and the points that are in the subset L, construct the complexes and map between them.

The subcomplex L will consists of all simplices whose vertex are in the subset.

Parameters
pointspd.DataFrame containing the points and their weights
suba list containing the indices of the points on which we construct the subcomplex
Returns
K list of simplices for the entire complex, as needed by oineus
L list of simplices for the subcomplex, as needed by oineus
L_to_K list which tells you how to map the simplices in L to the simplices in K

◆ oineus_process()

depracated_single_mode.oineus_process ( pd.DataFrame points,
oineus.ReductionParams params )

Given some points with weights, and the number of threads to use, obtain the persistent homology of the weighted alpha complex of these points, using oineus.

Parameters
pointspd.DataFrame of the points, with colums 'x','y','z','w'
paramsoineus.ReudctionParams
Returns
dgm_1 pd.DataFrame of the indexed dimension 1 diagram
dgm_2 pd.DataFrame of the indexed dimension 2 diagram

◆ read_computation_settings()

depracated_single_mode.read_computation_settings ( str settings_file,
settings_name )

◆ read_configuration()

depracated_single_mode.read_configuration ( str configuration_file,
str configuration )

import a specified structure from a configuration file

Parameters
configuration_filepath to the file to use for configurations
configurationname of the structure to use
Returns
atoms, radii, repeat_x, repeat_y, repeat_z the atom symbols, radii to use for the atoms, repetition in x-axis, repetition in y-axis, repetition in z-axis

◆ read_oineus_settings()

depracated_single_mode.read_oineus_settings ( str structure_file,
str setting_name )

import settings for kernel/image/cokernel

Parameters
file_pathpath to the ini file containing the settings
settings_namename of the settings to use
Returns
params oineus.ReductionParams with the settings to use

◆ read_sample()

depracated_single_mode.read_sample ( str structure_file,
str configuration )

import a specified sample range from a configuration file

Parameters
file_pathpath to the file to use for configurations
sample_rangename of the structure to use
Returns
sample_start, sample_end, sample_step first sample, last sample, step between each one

◆ sample_at()

depracated_single_mode.sample_at ( str file_path,
str format,
sample_index,
int repeat_x,
int repeat_y,
int repeat_z,
atom_list,
radius_list )

Sample a structure at a particular time, with cell repetitions.

Parameters
atomsinitial configuration
sample_indextime to sample at
repeat_xrepetition in x dir
repeat_yrepetition in y dir
repeat_zrepetition in z dir @parm atom_list list of atoms in the config
radius_listlist of radii to use for the atoms
Returns
points data frame of the points including the repetitions with columns 'Atom', 'x', 'y', 'z', 'w'

◆ sub_complex()

depracated_single_mode.sub_complex ( pd.DataFrame points,
float z_upper,
float z_lower )

Given the points, and the upper and lower thresholds in the 'z'-component.

Parameters
pointspd.DataFrame containing of the points.
z_upperfloat giving the upper threshold, any point above this is in the subcomplex
z_lowerfloat giving the lower threshold, any point below this is in the subcomplex
Returns
sub_comp list containing the indices of the points on which we build the subcomplex

◆ weighted_alpha_diode()

depracated_single_mode.weighted_alpha_diode ( points)

Use diode to fill the weighted alpha shapes.

Parameters
pointspd.DataFrame with columns 'x', 'y', 'z' for coordinates, and column 'w' with the weights.
Returns
weighted alpha shape from diode.

Variable Documentation

◆ apf0

depracated_single_mode.apf0 = st.session_state["apf0"]

◆ apf1

depracated_single_mode.apf1 = st.session_state["apf1"]

◆ apf2

depracated_single_mode.apf2 = st.session_state["apf2"]

◆ apf_checks

depracated_single_mode.apf_checks = st.columns(3)

◆ atoms

depracated_single_mode.atoms

◆ cokernel

depracated_single_mode.cokernel

◆ comp_file

depracated_single_mode.comp_file

◆ comp_name

depracated_single_mode.comp_name

◆ config_file

depracated_single_mode.config_file

◆ config_name

depracated_single_mode.config_name

◆ file_format

depracated_single_mode.file_format = st.text_input("File format:", key="file_format",placeholder="Auto")

◆ file_path

depracated_single_mode.file_path = st.text_input("Intial structure file:",key="file_path")

◆ image

depracated_single_mode.image

◆ kernel

depracated_single_mode.kernel

◆ key

depracated_single_mode.key

◆ loaded

depracated_single_mode.loaded

◆ manual_compute

depracated_single_mode.manual_compute = st.checkbox("Manually specify settings for the computations (i.e number of threds, and if you want to compute kernel/image/cokernel)", key="maual_comp_config")

◆ manual_config

depracated_single_mode.manual_config = st.checkbox("Manually specify configuration", key="manual_config")

◆ n_threads

depracated_single_mode.n_threads

◆ on_click

depracated_single_mode.on_click

◆ params

depracated_single_mode.params

◆ pd0

depracated_single_mode.pd0 = st.session_state["pd0"]

◆ pd1

depracated_single_mode.pd1 = st.session_state["pd1"]

◆ pd2

depracated_single_mode.pd2 = st.session_state["pd2"]

◆ pd_checks

depracated_single_mode.pd_checks = st.columns(3)

◆ placeholder

depracated_single_mode.placeholder

◆ plotted

depracated_single_mode.plotted

◆ processed

depracated_single_mode.processed

◆ radii

depracated_single_mode.radii

◆ repeat_x

depracated_single_mode.repeat_x

◆ repeat_y

depracated_single_mode.repeat_y

◆ repeat_z

depracated_single_mode.repeat_z

◆ same_config_file

depracated_single_mode.same_config_file = st.checkbox("The computation settings are in the same configuration file.", key="same_config_file")

◆ sample_index

depracated_single_mode.sample_index

◆ thickness

depracated_single_mode.thickness