Calculate Interatomic Distances
calculate_distances.RdComputes the distances between a central set of atoms and an expanded set, using the metric tensor for accuracy.
Usage
calculate_distances(
atomic_coordinates,
expanded_coords,
unit_cell_metrics,
tolerance = 1e-06
)Arguments
- atomic_coordinates
A
data.tableof the primary (asymmetric) atom set.- expanded_coords
A
data.tableof atoms in the expanded supercell.- unit_cell_metrics
A
data.tablewith cell parameters.- tolerance
A numeric cutoff (default 1e-6). Distances smaller than this value are considered floating-point noise (overlapping atoms) and are filtered out.
See also
Other property calculators:
calculate_angles(),
calculate_neighbor_counts(),
calculate_weighted_neighbor_counts(),
filter_atoms_by_symbol(),
filter_by_elements(),
filter_by_wyckoff_symbol()
Examples
ac <- data.table::data.table(Label = "Si1", x_a = 0, y_b = 0, z_c = 0)
ec <- data.table::data.table(Label = "O1_1", x_a = 0.5, y_b = 0.5, z_c = 0.5)
uc <- data.table::data.table(`_cell_length_a` = 10, `_cell_length_b` = 10,
`_cell_length_c` = 10, `_cell_angle_alpha` = 90,
`_cell_angle_beta` = 90, `_cell_angle_gamma` = 90)
calculate_distances(ac, ec, uc)
#> Atom1 Atom2 Distance DeltaX DeltaY DeltaZ
#> <char> <char> <num> <num> <num> <num>
#> 1: Si1 O1_1 8.660254 -0.5 -0.5 -0.5