Releases: andthum/mdtools
v0.0.9.0
What's Changed
New features
- New script
scripts/structure/densmap.pythat computes 2-dimensional number density maps by @andthum in #205 - New function
mdtools.dtrj.transitionthat calculates transition rates averaged over all compounds and over all states by @andthum in #211 mdtools/misc/dtrj_lifetimes/compare_dtrj_lifetime_methods.pyandmdtools/misc/dtrj_lifetimes/plt_lifetimes.py: Additionally, calculate and plot the coefficient of variation of the underlying lifetime distribution by @andthum in #225
Bug fixes
mdtools/misc/dtrj_lifetimes/compare_dtrj_lifetime_methods.py: Fix fits of the Kaplan-Meier estimated survival function by @andthum in #225
Full Changelog: v0.0.8.0...v0.0.9.0
v0.0.8.0
What's Changed
New features
- New script
discretization/correct_intermittent_dtrj.pythat corrects the intermittent behavior of a discrete trajectory by @andthum in #202 - Scripts
discretization/back_jump_prob.pyanddiscretization/back_jump_prob_discrete.py: Return normalization factors by @andthum in #201 - Functions
mdtools.dtrj.back_jump_probandmdtools.dtrj.back_jump_prob_discrete: Add a new argument return_norm that allows the user to return the normalization factor of the back-jump probability by @andthum in #192 misc/dtrj_lifetimes/compare_dtrj_lifetime_methods.py: Additionally calculate lifetimes from the Kaplan-Meier estimate of the survival function by @andthum in #189
Bug fixes
- Scripts scripts/dynamics/msd_layer_serial.py and scripts/dynamics/msd_layer_parallel.py: Bin the wrapped particle positions in box coordinates instead of Cartesian coordinates to account for potentially fluctuating simulation boxes by @andthum in #203
- Functions
mdtools.dtrj.kaplan_meierandmdtools.dtrj.leave_prob: Fix consistency checks by @andthum in #199 - Scripts
axial_hex_distribution_1nn.pyandaxial_hex_distribution_2nn.py: Fix the search algorithms for finding the first column(s) and row(s) of a hexagonal lattice when the lattice faces lie (almost) exactly on the edges of the simulation box by @andthum in #197, #198 - Script
dynamics/extract_renewal_events.py: The information about the reference group in the output file was not about the reference but the selection group. Fixed by @andthum in #187 - Include information about memory consumption in progress bars of some functions in the module
mdtools.dtrjby @andthum in #186
Code refactoring
- Add more consistency checks to the functions
mdtools.dtrj.back_jump_probandmdtools.dtrj.back_jump_prob_discreteby @andthum in #190, #191, #193, #195, #196
Full Changelog: v0.0.7.0...v0.0.8.0
v0.0.7.0
What's Changed
Breaking changes
- Remove the script
scripts/discretization/state_probs_around_trans.py, because its core functionality is now covered by the scriptsscripts/discretization/back_jump_prob.pyandscripts/discretization/kaplan_meier.pyby @andthum in #184 - Rename the function
mdtools.functions.gtomdtools.functions.lineby @andthum in #171 - Rename the function
mdtools.functions.g_inversetomdtools.functions.line_invby @andthum in #171
New features
- New scripts
scripts/discretization/kaplan_meier.pyandscripts/discretization/kaplan_meier_discrete.pythat calculate the state survival function using the Kaplan-Meier estimator by @andthum in #184 - New scripts
scripts/discretization/back_jump_prob.pyandscripts/discretization/back_jump_prob_discrete.pythat calculate the probability to return back to the initial state after a state transition as function of the time that has passed since the state transition by @andthum in #184 - New functions
mdtools.dtrj.kaplan_meierandmdtools.dtrj.kaplan_meier_discretethat estimate the state survival function using the Kaplan-Meier estimator by @andthum in #184 - New functions
mdtools.dtrj.leave_probandmdtools.dtrj.leave_prob_discretethat take a discrete trajectory and calculate the probability that a compound leaves its state at time t0+dt given that it has entered the state at time t0 by @andthum in #184 - New functions
mdtools.dtrj.n_leaves_vs_timeandmdtools.dtrj.n_leaves_vs_time_discretethat take a discrete trajectory and calculate the total number of compounds that leave their state at time t0+dt given that they have entered the state at time t0 by @andthum in #184 - New functions
mdtools.dtrj.back_jump_probandmdtools.dtrj.back_jump_prob_discretethat take a discrete trajectory and calculate the probability to return back to the initial state at time t0+dt, given that a state transition has occurred at time t0 by @andthum in #184 - New function
mdtools.statistics.moment_raw2centhat calculates the n-th central moment from the first n raw moments by @andthum in #177 - New functions
mdtools.dtrj.trans_rateandmdtools.dtrj.trans_rate_per_statethat calculates the state transition rate in a discrete trajectory by @andthum in #176 - Functions
mdtools.numpy_helper_functions.locate_item_change,dtools.numpy_helper_functions.item_change_ix,mdtools.dtrj.locate_transandmdtools.dtrj.trans_ix: Added new argumentdiscard_neghat allows the user to discard item changes starting from and/or ending in a negative item by @andthum in #176 - New functions
mdtools.dtrj.lifetimesandmdtools.dtrj.lifetimes_per_statethat calculate the lifetimes of states in a discrete trajectory by simply counting the number of frames a given compound stays in a given state by @andthum in #173 - Functions
mdtools.functions.fit_exp_decay_logand Functionmdtools.functions.fit_kww: Allow to parse keyword arguments to the underlying functionscipy.optimize.curve_fitby @andthum in #171
Bug fixes
- Scripts
sripts/discretization/state_lifetime.pyandsripts/discretization/state_lifetime_discrete.py: Calculate the transition information of the discrete trajectory after the trajectory was corrected for intermittency by @andthum in #184 - Fix scripts
sripts/dynamics/msd_layer_serial.pyandsripts/dynamics/msd_layer_parallel.py(Issue #98): Use wrapped coordinates to assign compounds to bins by @andthum in #181 - Fix a
ZeroDivisionErrorin the functionmdtools.run_time_info.dtrj_trans_info_strwhen the total number of state transitions is zero. Returnnp.infin this case by @andthum in #177 - Function
mdtools.numpy_helper_functions.group_by: Use a stable sort by @andthum in #173
Dependency updates
- Update importlib-resources requirement from
>=2.0, <6.0to>=2.0, <7.0in #174
Documentation updates
- Write documentation for the script
scripts/dynamics/extract_renewal_events.pyby @andthum in #183 - Correct a wrong comment in the "Examples" section of the docstring of the function
mdtools.dtrj.remain_prob_discreteby @andthum in #173 - Include the module
mdtools.functionsin the official MDTools documentation by @andthum in #171 - Update and correct documentation and run-time information of some functions in the
mdtools.structuremodule by @andthum in #170
Project maintenance
- Write scripts to generate and analyze artificial discrete trajectories for testing purposes by @andthum in #177
Full Changelog: v0.0.6.0...v0.0.7.0
v0.0.6.0
What's Changed
Breaking changes
- Refactor the function
mdtools.numpy_helper_functions.split_into_consecutive_subarraysby @andthum in #162:- Rename the function to
mdtools.numpy_helper_functions.split_into_contig_seqs. - Remove the argument
debug. - Change the default of the argument
sortfromTruetoFalse. - Add the argument
step_tol. - Add the argument
return_ix.
- Rename the function to
New features
-
Create a new function
mdtools.numpy_helper_functions.get_const_seqsby @andthum in #162, #163 and #165. -
Create a new function
mdtools.numpy_helper_functions.find_const_seq_nby @andthum in #162, #163 and #165. -
Create a new function
mdtools.numpy_helper_functions.find_const_seq_longby @andthum in #162, #163 and #165. -
Create a new function
mdtools.statistics.ekin_distby @andthum in #166. -
Script
discretization/discrete_pos.py: Add new command-line option--tolby @andthum in #167. -
Function
mdtools.file_handler.save_dtrj: Add a new argumentrenameby @andthum in #167.
Bug fixes
-
Fix the function
mdtools.structure.discrete_pos_trjby setting the bin edges to the return value of the functionmdtools.check.bin_edges. Before, the bin edges were checked but not changed if they were erroneous by @andthum in #167. -
Fix an
ifcondition in the functionmdtools.check.binsthat could raise aTypeErrorby @andthum in #167. -
Correct run time information of
state_lifetime.pyandstate_lifetime_discrete.pyby @andthum in #169 and #168
Dependency updates
- Update sphinx requirement from <7.0,>=5.0 to >=5.0,<8.0 by @dependabot in #160
Code refactoring
Full Changelog: v0.0.5.0...v0.0.6.0
v0.0.5.0
What's Changed
New features
- New functions
mdtools.dtrj.remain_probandmdtools.dtrj.remain_prob_discreteby @andthum in #158 - New command-line option
--intermittencyforscripts.discretization.state_lifetimeby @andthum in #158 - New command-line options
--intermittency1and--intermittency2forscripts.discretization.state_lifetime_discreteby @andthum in #158
Bug fixes
- Decrease the title font size for small matplotlib legends so that the legend title has the same font size as the rest of the legend by @andthum in #154
scripts.other.attribute_hist.py: Fix the calculation of the average mass of the selected compounds and of the compounds' center-of-mass velocities by @andthum in #157
Code refactoring
Full Changelog: v0.0.4.0...v0.0.5.0
v0.0.4.0
What's Changed
All changes were introduced by @andthum in #151 and #153.
Credits to @ezavod for code testing and helpful discussions about trajectory unwrapping.
Breaking changes
-
Script
unwrap_trj.py: Completely revised, it uses the new functionmdtools.box.unwrap_framenow.Added command-line arguments:
-b: First frame to read.--every: Read every n-th frame.--method: The unwrapping method to use.
Renamed command-line arguments:
--otrjis now--trj-out: Output trajectory.--otopis now--top-out: Output topology.--compoundis now--cmp: The compounds to make whole.
Removed command-line arguments:
--make-whole.--keep-whole.
-
Function
mdtools.box.unwrapremoved. Use the new functionmdtools.box.unwrap_frameinstead. -
Function
mdtools.box.unwrap_trjremoved, because it uses the displacement unwrapping method that only works for constant simulation boxes and was only implemented for orthorhombic boxes. Use the new scriptunwrap_trjor the new functionmdtools.box.unwrap_frameinstead. -
Function
mdtools.box.vdist: If theboxargument has shape(k, 6)a two-dimensional position array is not any longer interpreted to have the shape(k, 3). Instead it is now interpreted to have shape(n, 3). Here k is the number of frames and n is the number of particles. -
Function
mdtools.box.wrap_pos:mda_backendargument removed, becausemdtools.box.wrap_posno longer usesMDAnalysis.lib.distances.apply_PBCinternally. -
Function
mdtools.box.wrap_pos: If theboxargument has shape(k, 6)a two-dimensional position array is not any longer interpreted to have the shape(k, 3). Instead it is now interpreted to have shape(n, 3). Here k is the number of frames and n is the number of particles. -
Function
mdtools.structure.wcenter_pos:mda_backendargument removed.- If the
boxargument has shape(k, 6)a two-dimensional position array is not any longer interpreted to have the shape(k, 3). Instead it is now interpreted to have shape(n, 3). Here k is the number of frames and n is the number of particles.
-
Function
mdtools.structure.wcenter_pos: If centers are calculated for multiple frames, always return an array of shape(k, 1, 3)instead of(k, 3).
New Features:
- New script
rmsd_trj_trj.pythat calculates the Root Mean Square Deviation (RMSD) between two trajectories for each frame. - New function
mdtools.box.unwrap_framethat unwraps a single trajectory frame. The new functions implements five different unwrapping algorithms: "scaling", "heuristic", "displacement", "hybrid", "in-house". See- Sören von Bülow, Jakob Tómas Bullerjahn, and Gerhard Hummer,
Systematic errors in diffusion coefficients from long-time moleculardynamics simulations at constant pressure,
The Journal of Chemical Physics, 2020, 153, 021101, - Martin Kulke and Josh V. Vermaas,
Reversible Unwrapping Algorithm for Constant-Pressure Molecular Dynamics Simulations,
Journal of Chemical Theory and Computation, 2022, 18, 10, 6161-6171.
- Sören von Bülow, Jakob Tómas Bullerjahn, and Gerhard Hummer,
- Function
mdtools.box.vdist: Add support for triclinic simulation boxes. - Function
mdtools.box.wrap_pos: Add support for triclinic simulation boxes. - Function
mdtools.structure.rmsd: Add support for triclinic simulation boxes. - Function
mdtools.structure.wcenter_pos: Add support for triclinic simulation boxes. - New function
mdtools.box.cart2boxthat transforms Cartesian coordinates to box coordinates. - New function
mdtools.box.box2cartthat transforms box coordinates to Cartesian coordinates. - New function
mdtools.box.triclinic_vectorsthat converts the length-angle representation of a simulation box to the matrix representation. - New function
mdtools.box.triclinic_boxthat converts the matrix representation of a simulation box to the length-angle representation. - New function
mdtools.check.box_matthat checks if the input array satisfies the conditions for a (triclinic) simulation box matrix.
Bug fixes:
- Function
mdtools.box.make_whole: Remove thedebugargument that was parsed toMDAnalysis.core.groups.AtomGroup.unwrapalthoughMDAnalysis.core.groups.AtomGroup.unwraphas nodebugargument. - Various minor bug fixes in the
mdtools.checkmodule.
Documentation changes
- Fix broken links in the documentation.
- Fix various typos.
- Include the new
install_mdtbuild option of the SphinxMakefilein the developer's guide.
Maintenance
- Sphinx
Makefile: Add a new build optioninstall_mdtthat (re-)installs MDTools. Re-installing MDTools is necessary when changing the docstring of a script. Otherwise the changes won't be recognized by Sphinx. - Run Sphinx
linkcheckduring the CI workflow.
v0.0.3.0
What's Changed
Breaking changes
plot_energy_dist.py: Remove--num-pointsoption entirely and replace it by the options--cutout-startand--cutout-endwhich allows the users to specify a start and end point for the cutout plot instead of just plotting the last--num-pointsdata points by @andthum in #149plot_energy_dist.py: Additionally to the centered moving average and the cumulative average, also plot the total average by @andthum in #149- MDTools plot style (
mdtools.mplstyle): Set the handlelength in legends to 1.8. Before it was the default value of 2.0. This leads to a nicer representation of dashed lines in legends. By @andthum in #149 plot.py: Decrease the handlelength for small legends to from 1.6 to 1.35. This leads to a nicer representation of dashed lines in small legends and additionally shrinks the legend further. By @andthum in #149
Documentation updates
plot_energy_dist.py: Extend "Notes" Section by giving some formulas for fluctuations in the NVT and NpT ensembles by @andthum in #148- Fix various typos on various doc pages by @andthum in #147
- Update the Developer's Guide about the markdownlint pre-commit hook and about publishing a new release by @andthum in #147
Project maintenance
- Update configuration of development tools by @andthum in #144
- Update GitHub Actions by @andthum in #146
Full Changelog: v0.0.2.0...v0.0.3.0
v0.0.2.0
What's Changed
Breaking changes
- Rename the function
mdtools.statistics.running_averagetomdtools.statistics.cumavto highlight that this function does not calculate a simple running average but a cumulative average. by @andthum in #141 plot_energy_dist.py: Change the second plot to be a cutout of the first plot and change default values of--num-pointsand--observablesby @andthum in #142
New feature
- Create a new function
mdtools.statistics.movavthat calculates the moving average. by @andthum in #141 plot_energy_dist.py: Additionally plot cumulative and moving average by @andthum in #142
Project maintenance
Full Changelog: v0.0.1.0...v0.0.2.0
v0.0.1.0
What's Changed
There have been a lot of changes since version 0.0.0.dev1 which are cumbersome to list and read them all. The following is just a short part of the automatically generated list of changes.
From now on, we will try to publish new releases already when there have been only small changes, so that the change log will not become overwhelming. And we will try to make the changelog more human-friendly.
Breaking changes
- [Feat]: Add support for compressed files by @andthum in #97
- [discrete_hex.py]: Fix Call of
mdtools.file_handler.save_dtrjby @andthum in #100 - [discrete_hex.py]: Save All NumPy Arrays in Compressed .npz Archives by @andthum in #101
- [Feat]: Allow to discriminate by state difference when calculating state transitions in discrete trajectories by @andthum in #105
- [Feat]: New script
plot_ener_dist.pyby @andthum in #113 - [subvolume_change.py]: Refactor by @andthum in #120
- [Feat]:
plot_ener_dist.py: Write Distribution Characteristics to File by @andthum in #122 - Refactor
plot_attribute_hist.pyby @andthum in #130 - Switch to src layout, change versioning scheme and prepare new release by @andthum in #139
New features
- Feat/gh actions by @andthum in #26
- New Script
numpy_archive.pyby @andthum in #96 - Fix script
plot_ener_dist.pyby @andthum in #114 - [Feat]: New option
--difffor the scriptplot_ener_dist.pyby @andthum in #115 - New script
subvolume_charge.pyby @andthum in #119 - New script
plot_attribute_hist.pyby @andthum in #121
Bug fixes
- Fix various bugs by @andthum in #106
- [plot_ener_dist.py]: Remove Blank Line in Text Box by @andthum in #116
Full Changelog: v0.0.0.dev1...v0.0.1.0