In this release, there are a number of under-the-hood optimizations, new features, and bug fixes. As a result, there are unfortunately some backwards-incompatible changes despite this being a minor version update. Moving forward, these types of breaking changes will be minimized as much as possible, if not avoided completely, to adhere to semantic versioning guidelines.
Changelog
`mdcraft.algorithm` module
`mdcraft.algorithm.accelerated` submodule
- Rearranged and renamed functions.
- Added the Numba-accelerated functions `numba_histogram_bin_edges` and `numba_histogram` for histogramming discrete data.
- Renamed the `dot_1d_1d`, `inner_2d_2d`, and `inner_parallel_2d_2d` functions to `numba_dot`, `numba_inner`, and `numba_inner_parallel`, respectively.
- Moved the `delta_fourier_transform_1d_1d`, `pythagorean_trigonometric_identity_1d`, `pythagorean_trigonometric_identity_1d_1d`, `cosine_sum_1d`, and `sine_sum_1d` functions to the `openmm.analysis.structure` submodule, and renamed them to `numba_delta_fourier_transform`, `numba_pythagorean_trigonometric_identity`, `numba_cross_pythagorean_trigonometric_identity`, `numba_cosine_sum`, and `numba_sine_sum`, respectively.
- Combined and moved the `delta_fourier_transform_sum_2d_2d`/`delta_fourier_transform_sum_parallel_2d_2d`, `cosine_sum_2d`/`cosine_sum_parallel_2d`, `cosine_sum_inplace_2d`/`cosine_sum_inplace_parallel_2d`, `sine_sum_2d`/`sine_sum_parallel_2d`, and `sine_sum_inplace_2d`/`sine_sum_inplace_parallel_2d` functions to the `mdcraft.analysis.structure` submodule, and renamed them to `numba_delta_fourier_transform`, `cosine_column_sum`, `cosine_column_sum_inplace`, `sine_column_sum`, and `sine_column_sum_inplace`, respectively.
`mdcraft.algorithm.topology` submodule
- Added the `convert_cell_representation` and `reduce_box_vectors` functions for manipulating representations of triclinic simulation boxes.
`mdcraft.algorithm.unit` submodule
- Renamed the `get_scaling_factors` and `get_lj_scaling_factors` functions to `get_scale_factors` and `get_lj_scale_factors`, respectively.
`mdcraft.algorithm.utility` submodule
- Added the `is_lower_triangular` function. Useful for checking if box vectors are in their reduced forms.
`mdcraft.analysis` module
- All units stored in the `results.units` attribute of analysis classes are now accessed using keys without the `results.` prefix. For example, the unit for `profile.DensityProfile.results.number_densities` is now obtained using `profile.DensityProfile.results.units["number_densities"]` instead of `profile.DensityProfile.results.units["results.number_densities"]`.
`mdcraft.analysis.electrostatics` submodule
- Fixed issue in the `DipoleMoment` analysis class where the wrong volumes are used for systems with varying dimensions.
- Removed the `dimensions` keyword-only argument since it restricted the analysis to only constant-volume systems. Now, the system dimensions/volumes are obtained directly from the trajectory.
- Renamed the `scales` keyword-only argument to the more descriptive `dim_scales`.
`mdcraft.analysis.polymer` submodule
- Fixed an issue in the `EndToEndVector` analysis class where the time lags in `results.times` are are determined incorrectly when specific frames are specified for the analysis.
- Fixed two issues in the `Gyradius` analysis class.
- Fixed issue where the wrong volumes are used for systems with varying dimensions when `unwrap=True`.
- Removed the `dimensions` keyword-only argument since it restricted the analysis to only constant-volume systems. Now, the system dimensions are obtained directly from the trajectory.
- Fixed issue where the wrong number of chains and chain lengths are used when `"residues" in groupings`, `unwrap=True`, and `parallel=True`.
- Refactored the `SingleChainStructureFactor` analysis class.
- Removed the `unwrap` keyword-only argument since it is unnecessary to unwrap atom positions when the simulation system is cuboid.
- Replaced the parallel implementation with a Numba-accelerated one similar to that used in the `mdcraft.analysis.structure.StructureFactor` analysis class.
`mdcraft.analysis.profile` submodule
- Refactored the `DensityProfile` analysis class.
- Renamed the `scales` keyword-only argument to the more descriptive `dim_scales`.
- Removed the `dt` keyword-only argument. The times can now only be obtained directly from the trajectory. This change shouldn't pose any issues since the times are not explicitly used in the analysis.
- Both serial and parallel implementations now use the Numba-accelerated `mdcraft.algorithm.accelerated.numba_histogram` function for histogramming, which can provide a significant speedup for large trajectories.
- The number density, charge density, and potential profiles are now stored in `dict`s instead of `list`s for more logical access using axis labels, i.e. `"x"`, `"y"`, and `"z"`, instead of axis indices, i.e. `0`, `1`, and `2`. This change also enables using different numbers of histogram bins in each dimension with the parallel implementation.
`mdcraft.analysis.structure` submodule
- Replaced `numpy.histogram` call in the `radial_histogram` function with the Numba-accelerated `mdcraft.algorithm.accelerated.numba_histogram` for better performance.
- Renamed the `x_i` and `x_j` arguments in the `calculate_structure_factor` function and `RadialDistributionFunction.calculate_structure_factor` method to `x_a` and `x_b`, respectively, to avoid confusion with the notation used in the documentation.
- Added the `generate_spherical_wavevectors` function, which supports non-cubic simulation systems and will be used in the `StructureFactor`, `IntermediateScatteringFunction`, and `mdcraft.analysis.polymer.SingleChainStructureFactor` analysis classes in a future MDCraft release.
`mdcraft.analysis.transport` submodule
- Renamed the `calculate_electrophoretic_mobility` and `calculate_transference_number` functions to `calculate_electrophoretic_mobilities` and `calculate_transference_numbers`, respectively, to reflect the plural nature of the return values.
- Refactored the `Onsager` analysis class.
- Fixed an issue where the time lags in `results.times` are determined incorrectly when specific frames are specified for the analysis.
- Renamed the `results.conductivities` attribute to `results.conductivity`.
- Renamed the `calculate_electrophoretic_mobility` and `calculate_transference_number` methods to `calculate_electrophoretic_mobilities` and `calculate_transference_numbers`, respectively, to reflect the plural nature of the return values.