TCC source code function listing and descriptions¶
This page lists function names and descriptions which are scraped from the TCC source code using doxygen.
- 
file 
bonds.c Functions
- 
double 
Get_Interparticle_Distance(int i, int j)¶ 
- 
void 
enforce_PBCs(double * dx, double * dy, double * dz)¶ 
- 
void 
get_distance_components(int i, int j, double * dx, double * dy, double * dz)¶ 
- 
void 
Are_All_Bonds_Symmetric()¶ 
- 
void 
build_bond_network(int frame_number)¶ 
- 
void 
Get_Simple_Bonds()¶ 
- 
void 
Check_For_Valid_Bond(int particle_1, int particle_2, double squared_distance)¶ 
- 
void 
Check_Num_Bonds(int particle_1, int particle_2, double squared_distance)¶ 
- 
void 
too_many_bonds(int particle_1, int particle_2, const char * method_name)¶ 
- 
void 
Add_New_Bond(int particle_1, int particle_2, double squared_distance)¶ 
- 
int 
Bonds_BondCheck(int particle_1_id, int particle_2_id)¶ 
- 
double 
 
- 
file 
cell_list.c Functions
- 
int 
cell_list_get_particle_1_neighbours(int i, int * particle_1_neighbours, int * particle_1_bonds, double * particle_1_bond_lengths, double * store_dr2)¶ 
- 
void 
get_all_particle_neighbours()¶ 
- 
void 
loop_over_neighbouring_cells(int cell_x, int cell_y, int cell_z, int current_cell_index)¶ 
- 
void 
loop_over_particles_in_cell(int current_cell_index, int neighbour_cell_index)¶ 
- 
void 
fill_cell_list()¶ 
- 
int 
get_scalar_cell_index(int x_index, int y_index, int z_index)¶ 
- 
void 
set_up_cell_list()¶ 
- 
void 
free_cell_list()¶ 
- 
int 
 
- 
file 
10A.c Functions
- 
void 
Clusters_Get10A()¶ An 10A cluster is the two bonded sp4b clusters with no common particles.
Find 10A clusters An 10A is 2 sp4b clusters where:
- There are no common particles.
 - The spindles are not bonded.
 - Each particle in each sp4 ring is bonded to exactly two particles in the other sp4 ring
 
Cluster output: BBBBBBBOO Storage order: first_sp4b_ring x 4, second_sp4b_ring x 4, firrst_sp4b_spindle, second_sp4b_spindle
- 
void 
zero_used_array(int * used_sp4b)¶ 
- 
void 
Cluster_Write_10A(int * first_sp4b_cluster, int * second_sp4b_cluster)¶ 
- 
void 
 
- 
file 
10B.c Functions
- 
void 
Clusters_Get10B(int j)¶ An 10B cluster is the intersection of a 9B and a 7A cluster.
Find 10B clusters An 10A is a 9B and 7A cluster where:
- One spindle from 7A is common to the common spindle particle of the 9B cluster
 - The other spindle from 7A is bonded to the two distinct spindles of 9B.
 - Both of the distinct spindles of 9B are in the ring of the 7A.
 - Two 7A ring particles are common with the distinct sp5 particles of 9B.
 - There is one 7A ring particle which is distinct from the 9B cluster.
 
Cluster output: BBBBBBOOOS Storage order: ordered_shell_particles x 6, spindles x 3, common_spindle
- 
void 
Cluster_Write_10B(int trial[10])¶ 
- 
void 
 
- 
file 
10K.c Functions
- 
void 
Clusters_Get10K()¶ An 10K cluster is 9K with a SINGLE particle bonded to the common spindle of 9K.
Find 10K clusters An 10K is a 9K with one extra particle where:
- The extra particle is bonded to common spindle of 9K.
 - The 9K common spindle has no other extra neighbours.
 
Cluster output: BBBBBOOOO Storage order: as_for_9K x 9, extra_particle
- 
int 
count_extra_particles(const int * first_9K_cluster, int first_9K_common_id, int * extra_particle_id)¶ 
- 
void 
Cluster_Write_10K(int id_9k, int extra_particle)¶ 
- 
void 
 
- 
file 
10W.c Functions
- 
void 
Clusters_Get10W()¶ An 10W cluster is the intersection six sp5b which all share one spindle.
Find 10W clusters An 10W is six sp5b clusters where:
- All clusters share the same spindle
 - The coordination number of this common spindle is 9. The reason this construction is chosen over simpler ones is that it is robust to different values of the voronoi parameter from 0.82 to 1.
 
Cluster output: SBBBBBBBB Storage order: central_spindle_particle, shell_particles x 9
- 
int 
get_shell_particle_ids(int * shell_ids, const int * neighbouring_sp5_ids)¶ 
- 
void 
Cluster_Write_10W(int center_id, int * shell_ids)¶ 
- 
void 
 
- 
file 
11A.c Functions
- 
void 
Clusters_Get11A()¶ An 11A cluster is the intersection two 6A clusters with a common spindle.
Find 11A clusters An 11A is two 6A clusters where:
- There is one common spindle particle
 - All other particles are distinct.
 - Each particle in each ring is bonded to exactly 2 particles in the other ring
 
Cluster output: BBBBBBBBOOS Storage order: sp4_i x 4, sp4_j x 4, uncommon_spindles x 2, common_spindle
- 
int 
Check_6A_rings_bonded(const int * first_6A_cluster, const int * second_6A_cluster)¶ 
- 
void 
Cluster_Write_11A(const int * first_6A, const int * second_6A, const int * sother, const int scom)¶ 
- 
void 
 
- 
file 
11B.c Functions
- 
void 
Clusters_Get11B()¶ An 11B cluster is 9B with two additional particles.
Find 11B clusters An 11A is a 9B and two extra particles where:
- The common spindle particle from the 9B cluster has coordination number 10.
 - The two additional particles (a1 and a2) are bonded to each other and to the common spindle particle of 9B.
 - a1 is bonded to two particles in the shell of the 9B cluster (b1 and b2).
 - a2 is bonded to two particles in the shell of the 9B cluster (c1 and c2).
 - b1 and b2 are not bonded. c1 and c2 are not bonded.
 - One of b1 or b2 is bonded to one of c1 or c2. The other pair are also bonded.
 
Cluster output: BBBBBBOOSBB Storage order: as_for_9B x 9, extra_particles x 2
- 
void 
Cluster_Write_11B(const int * extra_particles, int parent_9B_id)¶ 
- 
void 
 
- 
file 
11C.c Functions
- 
void 
Clusters_Get11C()¶ An 11C cluster is the intersection of two 7A clusters with a common spindle.
Find 11C clusters An 11C is two 7A clusters where:
- There are two common particles between the two sp5 rings. These are a bonded pair.
 - There are two more bonds between two pairs of distinct particles in the sp5 ring.
 
Cluster output: SOOBBBBBBBB Storage order: common_spindle x 1, uncommon_spindles x 2, common_ring_1, common_ring_2, uncommon_bonded_ring_1_i, uncommon_bonded_ring_2_i, uncommon_bonded_ring_1_j, uncommon_bonded_ring_2_j, uncommon_unbonded x 2
- 
int 
count_particles_bonded_to_common(const int * cluster, const int * common_particles, int * bonded_particles)¶ 
- 
int 
count_bonded_ring_particles_11C(const int * common_ring_particles, const int * first_7A_cluster, const int * second_7A_cluster)¶ 
- 
void 
Cluster_Write_11C(int * trial)¶ 
- 
void 
 
- 
file 
11E.c Functions
- 
void 
Clusters_Get11E_12D(int i, int j, int sp1, int sp2i, int sp2j)¶ An 11E cluster is the intersection of a 9B and a 7A.
Find 11E clusters An 11E is a 9B and a 7A where:
- One 7A spindle particle is common to one of the uncommon spindle particles, sd1, in the 7A clusters constituting the 9B cluster.
 - The other spindle particle of the additional 7A is labeled sd3 and is bonded to the other uncommon spindle particle sd2 in 9B and the common spindle particle sc of 9B. Of the 7A cluster sp5 ring particles, one is common to the common with sc, one is common with sd2, and one is common to one of the uncommon sp5 ring particles of the 9B cluster. The final two sp5 ring particles are distinct from the 9B cluster.
 
Cluster output: OOOOBBBBBBB Storage order: unknown
- 
void 
Clust_Write_11E()¶ 
- 
void 
 
- 
file 
11F.c Functions
- 
void 
Clusters_Get11F_13K()¶ An 11F cluster is the intersection of two 5A and two 6A clusters.
Find 11F clusters An 11F is constructed from two 5A and two 6A clusters where:
- Each spindle of 5Ai is bonded to a spindle of 5Aj.
 - There is one common ring particle between the 5A clusters.
 - There is one bonded pair of ring particle between the 5A clusters.
 - 6A_i has a distinct spindle and a spindle which is the common ring particle of the 5As
 - 6A_j has a distinct spindle and a spindle which is the common ring particle of the 5As
 - Each 6A has two bonded 5A spindles and two bonded 5A ring particles as its ring.
 
Cluster output: BOOOOOOBBBB Storage order: 5A_common particle, 6A_uncommon_spindle x 2, 5A_spindles x 4, 5A_ring_particles x 4
- 
void 
get_unbonded_5A_particles(int * trial_cluster, const int * first_5A_cluster, const int * second_5A_cluster)¶ 
- 
int 
are_spindles_bonded(int first_5A_id, int second_5A_id, int * trial_cluster)¶ 
- 
int 
count_bonded_ring_particles_11F(const int * first_5A, const int * second_5A, int * trial_cluster)¶ 
- 
int 
get_bonded_6As(int * bonded_6A_id, int * trial_cluster)¶ 
- 
int 
check_6A(int * trial_cluster, const int * potential_6A_cluster, const int * ring_particles, int which_6A)¶ 
- 
void 
setup_6A_rings(const int * trial_cluster, int * first_6A_ring, int * second_6A_ring)¶ 
- 
void 
write_11F(const int * trial_cluster)¶ 
- 
void 
 
- 
file 
11W.c Functions
- 
void 
Clusters_Get11W()¶ An 11W cluster is a 10B with an extra particle.
Find 11W clusters An 11W is constructed from a 10B and an extra particle where:
- The common spindle of the 10B cluster has coordination number 10.
 - The additional particle is not bonded to any of the distinct spindles of the 7A clusters constituting the 10B cluster.
 
Cluster output: BBBBBBBBBBO Storage order: as_for_10B x 10, extra_particle
- 
int 
is_particle_bonded_to_7As(int id_10B, int extra_particle)¶ 
- 
int 
get_11W_extra_particle(int * parent_10B_cluster, int spindle_10B)¶ 
- 
void 
Write_11W(int id_10B, int extra_particle)¶ 
- 
void 
 
- 
file 
12A.c Functions
- 
void 
Clusters_Get12A()¶ A 12A is an 11C with an extra particle bonded to only 3 specific particles in the 11C.
Find 12A clusters An 12A is an 11C and an extra particle where:
- The common spindle particle of the 11C has coordination number 11.
 - The extra particle is bonded to the common spindle.
 - The extra particle is bonded to the two unbonded ring particles of 11C.
 - The exrtra particle is not bonded to other particles in the 11C.
 
Cluster output: SOOBBBBBBBBB Storage order: as_for_11C x 11, extra_particle
- 
int 
check_extra_particle_bonds(int extra_particle, int * first_11C_cluster)¶ 
- 
int 
get_12A_extra_particle(int * parent_11C_cluster)¶ 
- 
int 
bond_check_12A_extra_particle(int * first_11C_cluster, int extra_particle)¶ 
- 
void 
Write_12A(const int * first_11C_cluster, int ep)¶ 
- 
void 
 
- 
file 
12B.c Functions
- 
void 
Clusters_Get12B_13A()¶ A 12B is the intersection of 6 7A clusters.
Find 12B clusters A 12B is 6 7A clusters where:
- There is one central 7A with spindles A and B
 - Every other 7A has a spindle common with the 7A spindle A and a spindle common with a ring particle of the first 7A
 
Cluster output: SBOOOOOBBBBB Storage order: unknown
- 
int 
count_7A_spindle_bonds(int * sj1, const int first_7A)¶ 
- 
void 
Clust_Write_12B()¶ 
- 
void 
 
- 
file 
12D.c Functions
- 
int 
Clusters_Get12D(int j, int k, int sp1, int sp2)¶ A 12D is the intersection of an 11F and a 7A.
Find 12D clusters An 12A is an 11C and an extra particle where:
- The spindle particles of the 7A cluster are common with 11E cluster spindles sd2 and sd3.
 - Of the sp5 ring particles of the 7A cluster, one is common to sc, one is common to sd1,
 - two are in the SP5 rings of the 7A clusters constituting 11E, and one is new
 
Cluster output: OOOOBBBBBBBB Storage order: d1_unc, d2_unc, d3_unc, d4_unc, d12_com, d13_com, d24_com, d34_com, s_d1, s_d2, s_d3, s_com
- 
void 
Cluster_Write_12D()¶ 
- 
int 
 
- 
file 
12E.c Functions
- 
void 
Clusters_Get12E()¶ An 12E cluster is the intersection of an 11F and 5A cluster.
Find 12E clusters A 12E cluster is an 11F and 5A cluster where:
- The spindle atoms of the 5A cluster are common with the uncommon spindle atoms of the 6A clusters constituting the 11F cluster.
 - Of the SP3 ring particles in the 5A cluster, two are common with rd1 and rd2 from the 11F cluster, and one is new.
 
Cluster output: BBBBBBBBBBBB Storage order: particles ordered by id x 12
- 
int 
are_5A_spindles_common(const int * first_5A_cluster, const int * first_11F_cluster)¶ 
- 
int 
are_5A_ring_particles_common(const int * cluster_5A, const int * cluster_11F)¶ 
- 
int 
get_uncommon_5A_ring_particle(const int * cluster_11F, const int * cluster_5A)¶ 
- 
int 
is_12E_unique(const int * cluster_11F, int uncommon_sp3_ring_particle, int * trial)¶ 
- 
void 
Write_12E(const int * trial)¶ 
- 
void 
 
- 
file 
12K.c Functions
- 
void 
Clusters_Get12K()¶ A 12K clusters is an 11A with an extra particle bonded to three of the ring particles of the 11A.
Find 12K clusters A 12K is constructed of from an 11A and an extra particle where:
- The additional particle is bonded to three mutually bonded sp4 ring particles of the 11A cluster.
 
Since there are 8 possible sites for bonding on each 11A there may be multiple 12K for each 11A
Cluster output: BBBBBBBBOOSB Storage order: as_for_11A x 11, extra_particle
- 
void 
find_12K_cluster(int * parent_11A_cluster, const int * sp3_ring)¶ 
- 
void 
get_12K_ring_bonds(int * cluster_11A, int(*sp3_rings)[3])¶ 
- 
void 
Cluster_Write_12K(int ep, const int * parent_11A_cluster)¶ 
- 
void 
 
- 
file 
13A.c Functions
- 
void 
Clust_Write_13A()¶ A 13A clusters is the intersection of a 12B and a 7A cluster. Topologically it is a regular icosahedron.
Find 13A clusters A 13A is constructed from a 12B and a 7A where:
- The 7A cluster has one spindle given by sc of the 12B cluster, and one spindle that is distinct from the 12B particles.
 - The sp5 ring particles of the 7A cluster are distinct from the sp5 ring particles of the central 7A cluster in 12B.
 
Cluster output: SOOBBBBBBBBBB Storage order: unknown
- 
void 
 
- 
file 
13B.c Functions
- 
void 
Clusters_Get13B()¶ A 13B cluster is the intersection of two 7A clusters.
Find 13B clusters A 13K is constructed from two 7A clusters where:
- There is one common spindle between the two 7As
 - Other spindle particles are distinct and unbonded.
 - The sp5 ring particles of the 7A cluster are distinct from the sp5 ring particles of the central 7A cluster in 12B.
 - Each particle from each ring is bonded to one particle of the other ring
 
Cluster output: SOOBBBBBBBBBB Storage order: common_spindle, uncommon_spindle x 2, first_7A_ring_particles x 5, second_7A_ring_particles x 5
- 
int 
check_rings_are_bonded(const int * first_7A_cluster, const int * second_7A_cluster)¶ 
- 
int 
count_bonds_to_ring(int particle_id, const int * first_7A_cluster)¶ 
- 
void 
Cluster_Write_13B(const int * first_7A_cluster, const int * second_7A_cluster, int common_spindle_id, const int * uncommon_spindle_ids)¶ 
- 
void 
 
- 
file 
13K.c Functions
- 
int 
Clusters_Get13K(int sp3c_i, int sp3c_j, int the6A_i)¶ A 13K cluster is the intersection an 11F and two 5A clusters.
Find 13K clusters A 13K is constructed from an 11F and two 5A clusters where:
- Cluster output: SBBBBBBBBBBOO Storage order: as_for_11F, extra_particles x 2
 
- 
void 
Cluster_Write_13K()¶ 
- 
int 
 
- 
file 
6Z.c Functions
- 
void 
Clusters_Get6Z()¶ A 6Z is made of two overlapping 5A clusters.
Find 6Z clusters 6Z is made from two overlapping 5A particles where:
- The are no common spindles between the two 5A clusters.
 - One spindle of 5Ai is common with a sp3 ring particle of 5Aj.
 - One spindle of 5Aj is common with a sp3 ring particle of 5Ai.
 - The spindles in the two sp3 rings are bonded.
 - Two particles are common between the sp3 rings of 5Ai and 5Aj.
 
Cluster output: OOOBBB Storage order: bonded spindle i, non-bonded spindle i, bonded spindle j, non-bonded spindle j, common ring x 2
- 
int 
count_spindles_in_ring(const int * first_5A_cluster, const int * second_5A_cluster, int * spindles)¶ 
- 
int 
get_bonds_between_rings(const int * first_5A_cluster, const int * second_5A_cluster, int * common_ring_particles)¶ 
- 
void 
Cluster_Write_6Z(const int * first_spindles, const int * second_spindles, const int * common_ring_particles)¶ 
- 
void 
 
- 
file 
7K.c Functions
- 
void 
Clusters_Get7K()¶ A 7K is made of two overlapping 5A clusters which have one common spindle.
Find 7K clusters 7K is made from two overlapping 5A particles where:
- 5Ai and 5Aj have one common spindle.
 - The other spindle of 5Ai is distinct from all the particles in 5Aj.
 - The other spindle of 5Aj is distinct from all the particles in 5Ai.
 - There are two common particles between the sp3 rings of 5Ai and 5Aj.
 
Cluster output: OOOOBBB Storage order: common spindle, other spindle x 2, common ring x 2, other ring x 2)
- 
void 
Cluster_Write_7K(int common_spindle_id, int * other_spindle_ids, int * common_ring_particles, int * uncommon_ring_particles)¶ 
- 
void 
 
- 
file 
7T.c Functions
- 
void 
Clusters_Get7T()¶ A 7T is made of a 6Z cluster with an additional particle.
Find 7Ta and 7Ts clusters 7T is made made of a 6Z cluster and a 5A. Depending on where the location of the new 5A spindle, the cluster is either asymmetric (7Ta) or symmetric (7Ts) 7T:
- The 5A has one spindle common with the common ring particles of the 6A
 - For 7Ts the other 5A spindle is bonded to both 6Z bonded spindles
 - For 7TA the other 5A spindle is bonded to one bonded 6Z spindle and one unbonded 6Z spindle
 
Cluster output: BBBBBBB Storage order: original 6Z particles x 6, new 5A spindle)
- 
int 
is_particle_spindle_of_5A(int particle_id, const int * new_5A_cluster)¶ 
- 
int 
get_new_particle(const int * new_5A_cluster, int spindle_id)¶ 
- 
int 
check_ring_bonds(const int * new_5A_cluster, const int * old_6Z_cluster)¶ 
- 
void 
check_7T_type(int bond_counter, const int * old_6Z, int new_particle)¶ 
- 
void 
add_7T_a(const int * old_6Z, int new_particle)¶ 
- 
void 
add_7T_s(const int * old_6Z, int new_particle)¶ 
- 
void 
 
- 
file 
8A.c Functions
- 
void 
Clusters_Get8A()¶ An 8A cluster is one of 3 possible topological combinations of sp5b/c clusters.
Find 8A clusters There are 3 methods used for 8A detection
- A pair of sp5b where the spindles are distinct and share 4 ring particles
 - A pair of 7A clusters where
- Both 7Ai spindle particles are common with the 7Aj spindles.
 - There are four common particles between sp5 rings of 7Ai and 7Aj .
 
 - A sp5b cluster and a 7A cluster where:
- One 7A spindle is common with the sp5b spindle.
 - The other 7A spindle is distinct from all the sp5b particles.
 - There are four common particles between sp5 rings of sp5b and 7A.
 
 
Cluster output: BBBBBBBB Storage order: particles ordered by id x 8)
- 
void 
get_first_8A_type()¶ 
- 
void 
get_second_8A_type()¶ 
- 
void 
get_third_8A_type()¶ 
- 
void 
Cluster_Write_8A(const int * trial)¶ 
- 
void 
 
- 
file 
8B.c Functions
- 
void 
Clusters_Get8B()¶ An 8B cluster is an 7A cluster with an extra particle attached.
Find 8B clusters An 8B is a 7A cluster with an extra particle bonded to two of the ring particles and a spindle of the 7A cluster
Cluster output: BBBBOOB Storage order: as for 7A x 7, extra_particle)
- 
int 
count_bonds_to_7A_ring(int first_7A_id, int new_particle_id)¶ 
- 
void 
Cluster_Write_8B(int * first_7A_cluster, int new_particle_id)¶ 
- 
void 
 
- 
file 
8K.c Functions
- 
void 
Clusters_Get8K()¶ An 8K cluster is the intersection of 3 5A clusters.
Find 8K clusters An 8B is 3 5A clusters where:
- There are two common particles in the sp3 rings of 5Ai, 5Aj and 5Ak.
 - There is one unique particle in each of the 5Ai, 5Aj and 5Ak rings.
 - There is one common spindle between each pair of 5As
 
Cluster output: OOBBBBBB Storage order: common_ring_particles x2, spindles x 3, uncommon_ring_particles x 3
- 
int 
is_particle_in_5A_ring(const int * second_5A_cluster, int first_5A_ring_particle, int * cp)¶ 
- 
void 
Cluster_Write_8K()¶ 
- 
void 
 
- 
file 
9A.c Functions
- 
void 
Clusters_Get9A()¶ A 9A is made of three overlapping sp4b clusters which each share 2 ring particles with each of the others.
Find 9A clusters 9A is made from three overlapping sp4b clusters where:
- All of the spindles are uncommon
 - Two particles are common between the rings of sp4b_i and sp4b_j
 - The ring of sp4b_j is made from the uncommon ring particles of sp4b_i and sp4b_j
 
Cluster output: OOOBBBBBB Storage order: common spindle, other spindle x 2, common ring x 2, other ring x 2)
- 
int 
check_spindles_are_uncommon_and_unbonded(int * cluster_1, int * cluster_2)¶ 
- 
int 
count_bonded_ring_particles(const int * first_sp4b_cluster, const int * second_sp4b_cluster, const int * common_ring_particles, int * uncommon_ring_particles)¶ 
- 
void 
Cluster_Write_9A(int * first_sp4b_cluster, int * second_sp4b_cluster, int * third_sp4b_cluster, int * i_j_common_ring_particles, int * i_j_uncommon_ring_particles)¶ 
- 
void 
 
- 
file 
9B.c Functions
- 
void 
Clusters_Get9B_10B_11E_12D()¶ An 9B cluster is the intersection of 7A clusters shraing a spindle and two ring particles.
Find 9B clusters An 9B is 2 7A clusters where:
- There is one common spindle.
 - The uncommon spindles are bonded.
 - Each distinct spindle is common with a ring particle of the other 7A
 - There are two common particles between the two 7A rings
 
Cluster output: BBBBBBOOS Storage order: SP5_lowerd_to_4, SP5_lowerd_to_5, SP5_higherd_to_4, SP5_higherd_to_5, SP5_i_j_com_lower, SP5_i_j_com_higher, sp5c_d1_lower, sp5c_d2_higher, s_com
- 
void 
Cluster_Write_9B()¶ 
- 
void 
 
- 
file 
9K.c Functions
- 
void 
Clusters_Get9K()¶ An 9K cluster is the intersection of two 6A clusters sharing a spindle and two ring particles.
Find 9K clusters An 9K is 2 6A clusters where:
- There is one common spindle.
 - The uncommon spindles are not in the opposite cluster.
 - There are two common particles between the two 6A rings
 - The uncommon sp4 ring particle are bonded
 
Cluster output: BBBBBBOOO Storage order: common_ring_particles x 2, uncommon_ring_particles x 4, uncommon_spindles x 2, common_spindle
- 
void 
Cluster_Write_9k(const int * common_ring_particle_ids, const int * uncommon_ring_particles, const int * uncommon_spindle_particles, int common_spindle_id)¶ 
- 
void 
 
- 
file 
BCC9.c 
- 
file 
FCC.c Functions
- 
void 
Clusters_GetFCC()¶ An FCC cluster is a 13 particle cluster of the FCC lattice, it is made from either four sp3b clusters or three sp3b clusters and a 5A cluster.
Find FCC clusters Method 1: An FCC cluster is constructed from four sp3b clusters Method 2: An FCC cluster is constructed from three sp3b clusters and a 5A cluster
Cluster output: SBBOOBBOBBOOO Storage order: unknown
- 
void 
Cluster_Write_FCC()¶ 
- 
void 
 
- 
file 
HCP.c Functions
- 
void 
Clusters_GetHCP()¶ An HCP cluster is a 13 particle cluster of the HCP lattice, it is made from three 5A clusters.
Find HCP clusters An HCP cluster is made from three 5A clusters where:
- There is one common ring particle the three 5A clusters.
 - The spindles are all distinct and form two sp3 rings above and below the plane created by the ring particles.
 - Within the three 5A clusters, the spindle atoms are only bonded to the particles from the cluster’s own sp3 ring.
 - The uncommon ring particles form a six-membered ring around the common ring particle
 
Cluster output: unknown Storage order: unknown
- 
void 
Cluster_Write_HCP(int i, int j, int j2, int k)¶ 
- 
void 
 
- 
file 
simple_cluster_methods.c Functions
- 
int 
count_common_particles(const int * cluster_1, const int * cluster_2, int cluster_1_size, int cluster_2_size, int * common_particle_ids)¶ Count number of common ring particles between two clusters and get thier ids.
This function can be applied to whole clusters or subsets of clusters since it just compares lists of integers. To compare a subset of the clusters set the clus_size parameters to the number of elements to iterate over.
This function assumes that the n ring particles are the first n particles of the cluster. This is true for the basic clusters but may not be true for other clusters.
- Return
 - an integer giving the number of common ring particles between the clusters
 - Parameters
 cluster_1: - a pointer to a cluster stored in an hc memory arraycluster_2: - a pointer to a cluster stored in an hc memory arraycluster_1_size: - the number of ring particles in cluster 1 to iterate overcluster_2_size: - the number of ring particles in cluster 2 to iterate overcommon_particle_ids: - a pointer to an array of length num_particles_in_ring, ids of common particles will be written to this array
- 
int 
count_uncommon_particles(const int * cluster_1, const int * cluster_2, int clus_1_size, int clus_2_size, int * uncommon_particle_ids)¶ Count number of uncommon particles between two clusters and get their ids.
This function can be applied to whole clusters or subsets of clusters since it just compares lists of integers. To compare a subset of the clusters set the clus_size parameters to the number of elements to iterate over.
- Return
 - an integer giving the number of uncommon particles between the clusters
 - Parameters
 cluster_1: - a pointer to a cluster stored in an hc memory arraycluster_2: - a pointer to a cluster stored in an hc memory arrayclus_1_size: - the number of particles in cluster_1 to iterate overclus_2_size: - the number of particles in cluster_2 to iterate overuncommon_particle_ids: - a pointer to an array of length clus_1_size + clus_2_size, ids of uncommon particles will be written to this array
- 
int 
count_common_spindle_particles(const int * cluster_1, const int * cluster_2, int cluster_1_size, int cluster_2_size, int * common_spindle_ids)¶ Count number of common spindle particles between two clusters and get thier ids.
This function assumes that the spindle particles are the final two particles in the cluster, this is true for all of the basic clusters but may not be true for larger clusters.
- Return
 - an integer giving the number of common ring particles between the clusters
 - Parameters
 cluster_1: - a pointer to a cluster stored in an hc memory arraycluster_2: - a pointer to a cluster stored in an hc memory arraycluster_1_size: - the number of particles in cluster_1cluster_2_size: - the number of particles in cluster_2common_spindle_ids: - a pointer to an array of length 2 where common spindle ids will be written
- 
int 
get_uncommon_spindle(const int * cluster, int cluster_size, int common_spindle_id)¶ Get the id of the uncommon spindle in an sp3c, sp4c or sp5c cluster.
- Return
 - the id_of the uncommon spindle
 - Parameters
 cluster: - a pointer to a cluster stored in an hc memory arraycluster_size: - the number of particles in clustercommon_spindle_id: - the id of the common particle
- 
int 
is_particle_in_cluster(const int * cluster, int cluster_size, int particle_id)¶ Determine if a particle id exists within a cluster.
- Return
 - 1 if particle_id is in cluster, 0 if particle_id is not in cluster
 - Parameters
 cluster: - a pointer to a cluster stored in an hc memory arraycluster_size: - the number of particles in clusterparticle_id: - the id of the particle to check
- 
int 
are_clusters_distinct(const int * cluster_1, const int * cluster_2, int cluster_1_size, int cluster_2_size)¶ Determine if there are any shared particles between two clusters.
- Return
 - 1 if there are no common particles, 0 if there is at least 1 common particle
 - Parameters
 cluster_1: - a pointer to a cluster stored in an hc memory arraycluster_2: - a pointer to a cluster stored in an hc memory arraycluster_1_size: - the number of particles in cluster_1cluster_2_size: - the number of particles in cluster_2
- 
int 
check_unique_cluster(const int * trial, const int cluster_size, int ** cluster_list, const int num_clusters)¶ Determine if a trial cluster already exists in list of clusters.
- Return
 - 0 if the cluster is unique, 1 if the cluster already exists in the list
 - Parameters
 trial: - a pointer to a cluster, particle ids sorted in ascending ordercluster_size: - the number of particles in the trial clustercluster_list: - a pointer to a list of clusters with the particle ids making up each cluster sorted in ascending ordernum_clusters: - the number of clusters in cluster list
- 
int 
count_cluster_bonds_to_particle(int particle_id, int * cluster, int cluster_size, int * bonded_ids)¶ Count the number of bonds between a particle and a cluster and return the ids of bonded particles.
- Return
 - a pointer to an array of length cluster_size, ids of bonded particles will be written to this array
 - Parameters
 particle_id: - an integer representing a particle idcluster: - a pointer to a cluster stored in an hc memory arraycluster_size: - the number of particles in clusterbonded_ids: - an empty list which w
- 
int 
 
- 
file 
input.c Functions
- 
void 
read_ini_file()¶ 
- 
void 
read_clusters_to_analyse()¶ 
- 
void 
parse_box_file(int total_frames)¶ 
- 
void 
get_NVT_box(FILE * read_box_file)¶ 
- 
void 
get_box_file_offsets(FILE * read_box_file, int total_frames)¶ 
- 
void 
get_box_size(int current_frame_number)¶ 
- 
struct xyz_info 
parse_xyz_file()¶ 
- 
void 
initialize_xyz_info(struct xyz_info * input_xyz_info)¶ 
- 
void 
free_xyz_info(struct xyz_info * input_xyz_info)¶ 
- 
void 
get_frame_coordinates_from_xyz(const struct xyz_info * input_xyz_info, int frame_number)¶ 
- 
void 
get_coords_from_line(int frame_number, FILE * xyzfile, int particle)¶ 
- 
int 
check_frame_numbers(int num_xyz_frames)¶ 
- 
void 
 
- 
file 
main.c Functions
- 
int 
main(int argc, char ** argv)¶ 
- 
int 
 
- 
file 
output.c Functions
- 
void 
Write_Raw(int f)¶ 
- 
void 
Write_Raw_Particle_Types(int f, FILE * thefile, const char * sarr)¶ 
- 
void 
Write_Bonds_File(int f)¶ 
- 
void 
Write_Cluster_Centers_xyz(int f, int cluster_type)¶ 
- 
void 
Write_Cluster_XYZ(int f)¶ 
- 
void 
Write_Cluster(int f)¶ 
- 
void 
Write_Cluster_Compostions(int f, int cluster_type)¶ 
- 
void 
Write_Pop_Per_Frame(int f)¶ 
- 
void 
write_output_files(int current_frame_number)¶ 
- 
void 
 
- 
file 
rings.c Functions
- 
void 
get_basic_clusters()¶ 
- 
void 
get_basic_sp4_rings(int n0, int n1, int n2)¶ 
- 
void 
get_basic_sp5_rings(int n0, int n1, int n2, int n3)¶ 
- 
void 
get_sp3_clusters(int n0, int n1, int n2)¶ 
- 
void 
Store_sp3c(int n0, int n1, int n2, const int * cp)¶ 
- 
void 
Store_sp3b(int n0, int n1, int n2, const int * cp)¶ 
- 
void 
Store_sp3a(int n0, int n1, int n2)¶ 
- 
void 
get_sp4_clusters(int n0, int n1, int n2, int n3)¶ 
- 
void 
Store_sp4c(int n0, int n1, int n2, int n3, const int * cp)¶ 
- 
void 
get_6A_clusters()¶ 
- 
void 
Store_sp4b(int n0, int n1, int n2, int n3, const int * cp)¶ 
- 
void 
Store_sp4a(int n0, int n1, int n2, int n3)¶ 
- 
void 
get_sp5_clusters(int n0, int n1, int n2, int n3, int n4)¶ 
- 
void 
Store_sp5c(int n0, int n1, int n2, int n3, int n4, const int * cp)¶ 
- 
void 
Store_sp5b(int n0, int n1, int n2, int n3, int n4, const int * cp)¶ 
- 
void 
Store_sp5a(int n0, int n1, int n2, int n3, int n4)¶ 
- 
void 
add_mem_sp3b(int particle_ID)¶ 
- 
void 
add_mem_sp3c(int particle_ID)¶ 
- 
void 
add_mem_sp4b(int particle_ID)¶ 
- 
void 
add_mem_sp4c(int particle_ID)¶ 
- 
void 
add_mem_sp5b(int particle_ID)¶ 
- 
void 
add_mem_sp5c(int particle_ID)¶ 
- 
void 
 
- 
file 
setup.c Functions
- 
void 
Setup_Output_Files()¶ 
- 
void 
initialise_run_variables()¶ 
- 
void 
free_run_variables()¶ 
- 
void 
initialise_frame_variables()¶ 
- 
void 
free_frame_variables()¶ 
- 
void 
check_null_pointer(void * pointer, char * pointer_name)¶ 
- 
void 
analyse_cluster_dependencies()¶ 
- 
void 
setup_cluster_lists()¶ 
- 
void 
print_version_number()¶ 
- 
void 
 
- 
file 
stats.c Functions
- 
void 
count_number_of_clusters()¶ 
- 
void 
Stats_Report()¶ 
- 
FILE* 
open_stats_report_file(const char * output_name)¶ 
- 
void 
stats_report_clusters(FILE * output_file)¶ 
- 
void 
stats_report_title(const char * output_name, FILE * output_file)¶ 
- 
void 
count_frame_cluster_population(int f)¶ 
- 
void 
count_mean_pop_per_frame(int frames_analysed)¶ 
- 
void 
 
- 
file 
tools.c Functions
- 
long 
get_long_from_string(const char * buff, int * validLong)¶ 
- 
double 
get_double_from_string(const char * buff, int * validDouble)¶ 
- 
int 
try_read_line_from_file(FILE * file_name)¶ 
- 
FILE* 
open_file(char * file_name, char * mode)¶ 
- 
int 
make_directory(const char * name)¶ 
- 
void 
Error_no_free(char * msg)¶ 
- 
void 
Error(char * msg)¶ 
- 
int** 
resize_2D_int(int ** the_array, int old_row_size, int new_row_size, int new_col_size, int value)¶ 
- 
int* 
resize_1D_int(int * the_array, int old_col_size, int new_col_size)¶ 
- 
int 
sort_list_of_lists_of_ints(const void * lhs, const void * rhs)¶ 
- 
int 
quickSort(int * arr, int elements)¶ 
- 
long 
 
- 
file 
voronoi_bonds.c Functions
- 
void 
Get_Bonds_With_Voronoi()¶ 
- 
void 
add_new_voronoi_bond(int particle_1, int num_particle_1_neighbours, const int * sorted_particle_1_neighbours, const double * store_dr2, const int * particle_1_bonds)¶ 
- 
void 
check_bond_cut_offs(int particle_1, int num_particle_1_neighbours, const int * sorted_particle_1_neighbours, const double * sorted_particle_1_bond_lengths, int * particle_1_bonds)¶ 
- 
void 
Remove_Unbonded_Neighbours(int particle_1, const int num_particle_1_neighbours, const int * sorted_particle_1_neighbours, int * particle_1_bonds)¶ 
- 
double 
is_particle_bonded(int p1, int p2, int p3)¶ 
- 
int 
get_particle_1_neighbours(int particle_1, const int max_allowed_bonds, int * particle_1_bonds, double * particle_1_bond_lengths, double * store_dr2)¶ 
- 
void 
Insertion_Sort_Bond_Lengths(int num_particle_1_neighbours, int * particle_1_neighbours, double * particle_1_bond_lengths)¶ 
- 
void 
 
- 
dir 
C:/Users/Peter/Documents/GitHub/TCC/src/clusters 
- 
dir 
C:/Users/Peter/Documents/GitHub/TCC/src