DeltaMatrix

ParallelTemperingMonteCarlo.MachineLearningPotential.DeltaMatrix.adjust_angular_symm_val!Method
adjust_angular_symm_val!(g_value,θ_new,θ_old,exp_new,exp_old,tpz)
adjust_angular_symm_val!(g_value,exp_old,exp_new,θ_old,θ_new,λ,ζ,tpz)

Functions for adjusting angular symmetry function value from g_value by calculating the exponential component exp_old,exp_new, theta components θ_val_old,θ_val_new from the angles θ_old,θ_new and the normalisaiton factor tpz These are used to subtract the old g value and add the new one.

source
ParallelTemperingMonteCarlo.MachineLearningPotential.DeltaMatrix.calc_delta_symm_val!Method
calc_delta_symm_val!(g_vector,atomindex,dist2_mat,new_dist2_vector,f_matrix,new_f_vector,n1,n2,η,g_norm)
calc_delta_symm_val!(g_vector,positions,newposition,atomindex,dist2_mat,new_dist2_vector,f_matrix,new_f_vector,n1,n2,η,λ,ζ,tpz)

Generic function to calculate the total update to the vector of symmetry values having moved a single atom defined by atomindex. The first method calculates the changes to a vector of radial symmetry values, the second calculates the changes to a vector of angular symmetry values.

source
ParallelTemperingMonteCarlo.MachineLearningPotential.DeltaMatrix.calc_new_symmetry_value!Method
calc_new_symmetry_value!(g_vector,indices,newposition,position1,position2,position3,rnew_ij,rnew_ik,r2_ij,r2_ik,r2_jk,fnew_ij,fnew_ik,f_ij,f_ik,f_jk,η,λ,ζ,tpz)
calc_new_symmetry_value!(g_vector,indexi,indexj,indexk,newposition,position,dist2_mat,new_dist2_vector,f_matrix,new_f_vector,η,λ,ζ,tpz)

Currying functions from higher-level data structures such as the radial distances in dist2_mat,new_dist2_vector and cutoff functions f_matrix,new_f_vector as well as positions in newposition,position and passes these to lower level functions along with hyperparameters η,λ,ζ,tpz to adjust the values in g_vector at positions indexi,indexj,indexk calculates the required exponential component and angles to pass down to adjust_angular_symm_val!

source
ParallelTemperingMonteCarlo.MachineLearningPotential.DeltaMatrix.calc_new_symmetry_value!Method
calc_new_symmetry_value!(g_vector,indexi,indexj,dist2_mat,new_dist2_vector,f_matrix,new_f_vector,η,g_norm)

Call for the radial symmetry value designed to curry the input from g_vector at positions indexi,indexj to the adjust_radial_symm_val! function. It unpacks the radial distances from dist2_mat,new_dist2_vector and the cutoff functions from f_matrix,new_f_vec as well as the hyperparameters η,g_norm and gives these values to the lower level functions.

source
ParallelTemperingMonteCarlo.MachineLearningPotential.DeltaMatrix.calc_swap_matrixMethod
calc_swap_matrix(g_mat,positions,atomindex1,atomindex2,dist2_mat,f_mat,radsymmfunctions,angsymmfunctions,nrad,nang,n1,n2)

having swapped atom at atomindex1 and atomindex2 in a system with n1 atoms of type 1 and n2 atoms of type 2, with nrad radial and nang angular symmetry functions, we calculate the changes to g_mat based on the swap.

source
ParallelTemperingMonteCarlo.MachineLearningPotential.DeltaMatrix.calc_swap_symm_valMethod
calc_swap_symm_val(g_vector,atomindex1,atomindex2,dist2_mat,f_mat,n1,n2,η,g_norm)
calc_swap_symm_val(g_vector,positions,atomindex1,atomindex2,dist2_mat,f_mat,n1,n2,η,λ,ζ,tpz)

function to calculate the changes to a symmetry vector gvector assuming we have swapped the positions of atomindex1 and atomindex2. The first method is defined for a radial symmetry function with parameters η and gnorm. Works for a system with n1 atoms of type 1 and n2 atoms of type 2.

source
ParallelTemperingMonteCarlo.MachineLearningPotential.DeltaMatrix.new_angular_symm_valsMethod
new_angular_symm_vals(newposition,position1,position2,position3,rnew_ij,rnew_ik,r2_ij,r2_ik,r2_jk,fnew_ij,fnew_ik,f_ij,f_ik,f_jk,η,λ,ζ)

Function to calculate the updated value of an angular symmetry function: Using the old and new interatomic distances and positions along with cutoff values and parameters, we calculate the old and new symmetry value and return a static vector of the three new angular symmetry value, one for each atom i,j,k being the centre of the calculation.

source
ParallelTemperingMonteCarlo.MachineLearningPotential.DeltaMatrix.radial_symmetry_calculation!Method
radial_symmetry_calculation!(g_vector, atomindex, dist2_mat, new_dist2_vector, f_matrix, new_f_vector, symmetry_function::RadialType2)
symmetry_calculation!(g_vector,atomindex,newposition,position,dist2_mat,new_dis_vector,f_matrix,new_f_vector,symmetry_function::AngularType3)

This method is designed for radial symmetry functions. Given an atom at atomindex along with high level data structures: dist2_mat,new_dist2_vector,f_matrix,new_f_vector containing the new and old positions, distances and cutoff functions. We iterate over all other atoms and pass their index to lower level currying functions. The positions newposition,position are included for consistency with the higher-level function.

source
ParallelTemperingMonteCarlo.MachineLearningPotential.DeltaMatrix.total_symm!Method
total_symm!(g_matrix,position,new_position,dist2_matrix,new_dist_vector,f_matrix,new_f_vector,atomindex,total_symmetry_vector)

Top level function to calculate the total change to the matrix of symmetry function values g_matrix. Given position,dist2_matrix,f_matrix containing the original state of the system, and new_position,new_dist_vector,new_f_vector the change to this state based on the motion of atomindex, we iterate over the total_symmetry_vector using the defined radial_symmetry_calculation! and angular_symmetry_calculation! functions.

source