# Calculate the volume of a unit cell
uc <- unit_cell(20)
V <- calculate_cell_volume(uc)
# Calculate the volume of the corresponding reciprocal cell
ruc <- create_rec_unit_cell(uc)
Vrec <- calculate_cell_volume(ruc)
V*Vrec # Should be 1!
Run the code above in your browser using DataLab