Recent Releases of mdtools

mdtools - v0.0.9.0

What's Changed

New features

  • New script scripts/structure/densmap.py that computes 2-dimensional number density maps by @andthum in https://github.com/andthum/mdtools/pull/205
  • New function mdtools.dtrj.transition that calculates transition rates averaged over all compounds and over all states by @andthum in https://github.com/andthum/mdtools/pull/211
  • mdtools/misc/dtrj_lifetimes/compare_dtrj_lifetime_methods.py and mdtools/misc/dtrj_lifetimes/plt_lifetimes.py: Additionally, calculate and plot the coefficient of variation of the underlying lifetime distribution by @andthum in https://github.com/andthum/mdtools/pull/225

Bug fixes

  • mdtools/misc/dtrj_lifetimes/compare_dtrj_lifetime_methods.py: Fix fits of the Kaplan-Meier estimated survival function by @andthum in https://github.com/andthum/mdtools/pull/225

Full Changelog: https://github.com/andthum/mdtools/compare/v0.0.8.0...v0.0.9.0

- Python
Published by andthum over 1 year ago

mdtools - v0.0.8.0

What's Changed

New features

  • New script discretization/correct_intermittent_dtrj.py that corrects the intermittent behavior of a discrete trajectory by @andthum in https://github.com/andthum/mdtools/pull/202
  • Scripts discretization/back_jump_prob.py and discretization/back_jump_prob_discrete.py: Return normalization factors by @andthum in https://github.com/andthum/mdtools/pull/201
  • Functions mdtools.dtrj.back_jump_prob and mdtools.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 https://github.com/andthum/mdtools/pull/192
  • misc/dtrj_lifetimes/compare_dtrj_lifetime_methods.py: Additionally calculate lifetimes from the Kaplan-Meier estimate of the survival function by @andthum in https://github.com/andthum/mdtools/pull/189

Bug fixes

  • Scripts scripts/dynamics/msdlayerserial.py and scripts/dynamics/msdlayerparallel.py: Bin the wrapped particle positions in box coordinates instead of Cartesian coordinates to account for potentially fluctuating simulation boxes by @andthum in https://github.com/andthum/mdtools/pull/203
  • Functions mdtools.dtrj.kaplan_meier and mdtools.dtrj.leave_prob: Fix consistency checks by @andthum in https://github.com/andthum/mdtools/pull/199
  • Scripts axial_hex_distribution_1nn.py and axial_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 https://github.com/andthum/mdtools/pull/197, https://github.com/andthum/mdtools/pull/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 https://github.com/andthum/mdtools/pull/187
  • Include information about memory consumption in progress bars of some functions in the module mdtools.dtrj by @andthum in https://github.com/andthum/mdtools/pull/186

Code refactoring

  • Add more consistency checks to the functions mdtools.dtrj.back_jump_prob and mdtools.dtrj.back_jump_prob_discrete by @andthum in https://github.com/andthum/mdtools/pull/190, https://github.com/andthum/mdtools/pull/191, https://github.com/andthum/mdtools/pull/193, https://github.com/andthum/mdtools/pull/195, https://github.com/andthum/mdtools/pull/196

Full Changelog: https://github.com/andthum/mdtools/compare/v0.0.7.0...v0.0.8.0

- Python
Published by andthum about 2 years ago

mdtools - 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 scripts scripts/discretization/back_jump_prob.py and scripts/discretization/kaplan_meier.py by @andthum in https://github.com/andthum/mdtools/pull/184
  • Rename the function mdtools.functions.g to mdtools.functions.line by @andthum in https://github.com/andthum/mdtools/pull/171
  • Rename the function mdtools.functions.g_inverse to mdtools.functions.line_inv by @andthum in https://github.com/andthum/mdtools/pull/171

New features

  • New scripts scripts/discretization/kaplan_meier.py and scripts/discretization/kaplan_meier_discrete.py that calculate the state survival function using the Kaplan-Meier estimator by @andthum in https://github.com/andthum/mdtools/pull/184
  • New scripts scripts/discretization/back_jump_prob.py and scripts/discretization/back_jump_prob_discrete.py that 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 https://github.com/andthum/mdtools/pull/184
  • New functions mdtools.dtrj.kaplan_meier and mdtools.dtrj.kaplan_meier_discrete that estimate the state survival function using the Kaplan-Meier estimator by @andthum in https://github.com/andthum/mdtools/pull/184
  • New functions mdtools.dtrj.leave_prob and mdtools.dtrj.leave_prob_discrete that 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 https://github.com/andthum/mdtools/pull/184
  • New functions mdtools.dtrj.n_leaves_vs_time and mdtools.dtrj.n_leaves_vs_time_discrete that 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 https://github.com/andthum/mdtools/pull/184
  • New functions mdtools.dtrj.back_jump_prob and mdtools.dtrj.back_jump_prob_discrete that 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 https://github.com/andthum/mdtools/pull/184
  • New function mdtools.statistics.moment_raw2cen that calculates the n-th central moment from the first n raw moments by @andthum in https://github.com/andthum/mdtools/pull/177
  • New functions mdtools.dtrj.trans_rate and mdtools.dtrj.trans_rate_per_state that calculates the state transition rate in a discrete trajectory by @andthum in https://github.com/andthum/mdtools/pull/176
  • Functions mdtools.numpy_helper_functions.locate_item_change, dtools.numpy_helper_functions.item_change_ix, mdtools.dtrj.locate_trans and mdtools.dtrj.trans_ix: Added new argument discard_neg hat allows the user to discard item changes starting from and/or ending in a negative item by @andthum in https://github.com/andthum/mdtools/pull/176
  • New functions mdtools.dtrj.lifetimes and mdtools.dtrj.lifetimes_per_state that 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 https://github.com/andthum/mdtools/pull/173
  • Functions mdtools.functions.fit_exp_decay_log and Function mdtools.functions.fit_kww: Allow to parse keyword arguments to the underlying function scipy.optimize.curve_fit by @andthum in https://github.com/andthum/mdtools/pull/171

Bug fixes

  • Scripts sripts/discretization/state_lifetime.py and sripts/discretization/state_lifetime_discrete.py: Calculate the transition information of the discrete trajectory after the trajectory was corrected for intermittency by @andthum in https://github.com/andthum/mdtools/pull/184
  • Fix scripts sripts/dynamics/msd_layer_serial.py and sripts/dynamics/msd_layer_parallel.py (Issue #98): Use wrapped coordinates to assign compounds to bins by @andthum in https://github.com/andthum/mdtools/pull/181
  • Fix a ZeroDivisionError in the function mdtools.run_time_info.dtrj_trans_info_str when the total number of state transitions is zero. Return np.inf in this case by @andthum in https://github.com/andthum/mdtools/pull/177
  • Function mdtools.numpy_helper_functions.group_by: Use a stable sort by @andthum in https://github.com/andthum/mdtools/pull/173

Dependency updates

  • Update importlib-resources requirement from >=2.0, <6.0 to >=2.0, <7.0 in https://github.com/andthum/mdtools/pull/174

Documentation updates

  • Write documentation for the script scripts/dynamics/extract_renewal_events.py by @andthum in https://github.com/andthum/mdtools/pull/183
  • Correct a wrong comment in the "Examples" section of the docstring of the function mdtools.dtrj.remain_prob_discrete by @andthum in https://github.com/andthum/mdtools/pull/173
  • Include the module mdtools.functions in the official MDTools documentation by @andthum in https://github.com/andthum/mdtools/pull/171
  • Update and correct documentation and run-time information of some functions in the mdtools.structure module by @andthum in https://github.com/andthum/mdtools/pull/170

Project maintenance

  • Write scripts to generate and analyze artificial discrete trajectories for testing purposes by @andthum in https://github.com/andthum/mdtools/pull/177

Full Changelog: https://github.com/andthum/mdtools/compare/v0.0.6.0...v0.0.7.0

- Python
Published by andthum over 2 years ago

mdtools - v0.0.6.0

What's Changed

Breaking changes

  • Refactor the function mdtools.numpy_helper_functions.split_into_consecutive_subarrays by @andthum in https://github.com/andthum/mdtools/pull/162:
    • Rename the function to mdtools.numpy_helper_functions.split_into_contig_seqs.
    • Remove the argument debug.
    • Change the default of the argument sort from True to False.
    • Add the argument step_tol.
    • Add the argument return_ix.

New features

  • Create a new function mdtools.numpy_helper_functions.get_const_seqs by @andthum in https://github.com/andthum/mdtools/pull/162, https://github.com/andthum/mdtools/pull/163 and https://github.com/andthum/mdtools/pull/165.

  • Create a new function mdtools.numpy_helper_functions.find_const_seq_n by @andthum in https://github.com/andthum/mdtools/pull/162, https://github.com/andthum/mdtools/pull/163 and https://github.com/andthum/mdtools/pull/165.

  • Create a new function mdtools.numpy_helper_functions.find_const_seq_long by @andthum in https://github.com/andthum/mdtools/pull/162, https://github.com/andthum/mdtools/pull/163 and https://github.com/andthum/mdtools/pull/165.

  • Create a new function mdtools.statistics.ekin_dist by @andthum in https://github.com/andthum/mdtools/pull/166.

  • Script discretization/discrete_pos.py: Add new command-line option --tol by @andthum in https://github.com/andthum/mdtools/pull/167.

  • Function mdtools.file_handler.save_dtrj: Add a new argument rename by @andthum in https://github.com/andthum/mdtools/pull/167.

Bug fixes

  • Fix the function mdtools.structure.discrete_pos_trj by setting the bin edges to the return value of the function mdtools.check.bin_edges. Before, the bin edges were checked but not changed if they were erroneous by @andthum in https://github.com/andthum/mdtools/pull/167.

  • Fix an if condition in the function mdtools.check.bins that could raise a TypeError by @andthum in https://github.com/andthum/mdtools/pull/167.

  • Correct run time information of state_lifetime.py and state_lifetime_discrete.py by @andthum in https://github.com/andthum/mdtools/pull/169 and https://github.com/andthum/mdtools/pull/168

Dependency updates

  • Update sphinx requirement from <7.0,>=5.0 to >=5.0,<8.0 by @dependabot in https://github.com/andthum/mdtools/pull/160

Code refactoring

  • Script attribute_hist.py: Improve initial guess for Maxwell-Boltzmann fit by @andthum in https://github.com/andthum/mdtools/pull/164

Full Changelog: https://github.com/andthum/mdtools/compare/v0.0.5.0...v0.0.6.0

- Python
Published by andthum over 2 years ago

mdtools - v0.0.5.0

What's Changed

New features

  • New functions mdtools.dtrj.remain_prob and mdtools.dtrj.remain_prob_discrete by @andthum in https://github.com/andthum/mdtools/pull/158
  • New command-line option --intermittency for scripts.discretization.state_lifetime by @andthum in https://github.com/andthum/mdtools/pull/158
  • New command-line options --intermittency1 and --intermittency2 for scripts.discretization.state_lifetime_discrete by @andthum in https://github.com/andthum/mdtools/pull/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 https://github.com/andthum/mdtools/pull/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 https://github.com/andthum/mdtools/pull/157

Code refactoring

  • Refactor the scripts state_lifetime.py and state_lifetime_discrete.py by @andthum in https://github.com/andthum/mdtools/pull/158

Full Changelog: https://github.com/andthum/mdtools/compare/v0.0.4.0...v0.0.5.0

- Python
Published by andthum almost 3 years ago

mdtools - v0.0.4.0

What's Changed

All changes were introduced by @andthum in https://github.com/andthum/mdtools/pull/151 and https://github.com/andthum/mdtools/pull/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 function mdtools.box.unwrap_frame now.

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: * --otrj is now --trj-out: Output trajectory. * --otop is now --top-out: Output topology. * --compound is now --cmp: The compounds to make whole.

Removed command-line arguments: * --make-whole. * --keep-whole.

  • Function mdtools.box.unwrap removed. Use the new function mdtools.box.unwrap_frame instead.
  • Function mdtools.box.unwrap_trj removed, because it uses the displacement unwrapping method that only works for constant simulation boxes and was only implemented for orthorhombic boxes. Use the new script unwrap_trj or the new function mdtools.box.unwrap_frame instead.
  • Function mdtools.box.vdist: If the box argument 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_backend argument removed, because mdtools.box.wrap_pos no longer uses MDAnalysis.lib.distances.apply_PBC internally.
  • Function mdtools.box.wrap_pos: If the box argument 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_backend argument removed.
    • If the box argument 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.py that calculates the Root Mean Square Deviation (RMSD) between two trajectories for each frame.
  • New function mdtools.box.unwrap_frame that 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.
  • 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.cart2box that transforms Cartesian coordinates to box coordinates.
  • New function mdtools.box.box2cart that transforms box coordinates to Cartesian coordinates.
  • New function mdtools.box.triclinic_vectors that converts the length-angle representation of a simulation box to the matrix representation.
  • New function mdtools.box.triclinic_box that converts the matrix representation of a simulation box to the length-angle representation.
  • New function mdtools.check.box_mat that checks if the input array satisfies the conditions for a (triclinic) simulation box matrix.

Bug fixes:

  • Function mdtools.box.make_whole: Remove the debug argument that was parsed to MDAnalysis.core.groups.AtomGroup.unwrap although MDAnalysis.core.groups.AtomGroup.unwrap has no debug argument.
  • Various minor bug fixes in the mdtools.check module.

Documentation changes

  • Fix broken links in the documentation.
  • Fix various typos.
  • Include the new install_mdt build option of the Sphinx Makefile in the developer's guide.

Maintenance

  • Sphinx Makefile: Add a new build option install_mdt that (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 linkcheck during the CI workflow.

- Python
Published by andthum almost 3 years ago

mdtools - v0.0.3.0

What's Changed

Breaking changes

  • plot_energy_dist.py: Remove --num-points option entirely and replace it by the options --cutout-start and --cutout-end which allows the users to specify a start and end point for the cutout plot instead of just plotting the last --num-points data points by @andthum in https://github.com/andthum/mdtools/pull/149
  • plot_energy_dist.py: Additionally to the centered moving average and the cumulative average, also plot the total average by @andthum in https://github.com/andthum/mdtools/pull/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 https://github.com/andthum/mdtools/pull/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 https://github.com/andthum/mdtools/pull/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 https://github.com/andthum/mdtools/pull/148
  • Fix various typos on various doc pages by @andthum in https://github.com/andthum/mdtools/pull/147
  • Update the Developer's Guide about the markdownlint pre-commit hook and about publishing a new release by @andthum in https://github.com/andthum/mdtools/pull/147

Project maintenance

  • Update configuration of development tools by @andthum in https://github.com/andthum/mdtools/pull/144
  • Update GitHub Actions by @andthum in https://github.com/andthum/mdtools/pull/146

Full Changelog: https://github.com/andthum/mdtools/compare/v0.0.2.0...v0.0.3.0

- Python
Published by andthum about 3 years ago

mdtools - v0.0.2.0

What's Changed

Breaking changes

  • Rename the function mdtools.statistics.running_average to mdtools.statistics.cumav to highlight that this function does not calculate a simple running average but a cumulative average. by @andthum in https://github.com/andthum/mdtools/pull/141
  • plot_energy_dist.py: Change the second plot to be a cutout of the first plot and change default values of --num-points and --observables by @andthum in https://github.com/andthum/mdtools/pull/142

New feature

  • Create a new function mdtools.statistics.movav that calculates the moving average. by @andthum in https://github.com/andthum/mdtools/pull/141
  • plot_energy_dist.py: Additionally plot cumulative and moving average by @andthum in https://github.com/andthum/mdtools/pull/142

Project maintenance

  • Add Concept DOI From Zenodo by @andthum in https://github.com/andthum/mdtools/pull/140

Full Changelog: https://github.com/andthum/mdtools/compare/v0.0.1.0...v0.0.2.0

- Python
Published by andthum about 3 years ago

mdtools - 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 https://github.com/andthum/mdtools/pull/97
  • [discretehex.py]: Fix Call of `mdtools.filehandler.save_dtrj` by @andthum in https://github.com/andthum/mdtools/pull/100
  • [discrete_hex.py]: Save All NumPy Arrays in Compressed .npz Archives by @andthum in https://github.com/andthum/mdtools/pull/101
  • [Feat]: Allow to discriminate by state difference when calculating state transitions in discrete trajectories by @andthum in https://github.com/andthum/mdtools/pull/105
  • [Feat]: New script plot_ener_dist.py by @andthum in https://github.com/andthum/mdtools/pull/113
  • [subvolume_change.py]: Refactor by @andthum in https://github.com/andthum/mdtools/pull/120
  • [Feat]: plot_ener_dist.py: Write Distribution Characteristics to File by @andthum in https://github.com/andthum/mdtools/pull/122
  • Refactor plot_attribute_hist.py by @andthum in https://github.com/andthum/mdtools/pull/130
  • Switch to src layout, change versioning scheme and prepare new release by @andthum in https://github.com/andthum/mdtools/pull/139

New features

  • Feat/gh actions by @andthum in https://github.com/andthum/mdtools/pull/26
  • New Script numpy_archive.py by @andthum in https://github.com/andthum/mdtools/pull/96
  • Fix script plot_ener_dist.py by @andthum in https://github.com/andthum/mdtools/pull/114
  • [Feat]: New option --diff for the script plot_ener_dist.py by @andthum in https://github.com/andthum/mdtools/pull/115
  • New script subvolume_charge.py by @andthum in https://github.com/andthum/mdtools/pull/119
  • New script plot_attribute_hist.py by @andthum in https://github.com/andthum/mdtools/pull/121

Bug fixes

  • Fix various bugs by @andthum in https://github.com/andthum/mdtools/pull/106
  • [plotenerdist.py]: Remove Blank Line in Text Box by @andthum in https://github.com/andthum/mdtools/pull/116

Full Changelog: https://github.com/andthum/mdtools/compare/v0.0.0.dev1...v0.0.1.0

- Python
Published by andthum about 3 years ago