Recent Releases of mdtools
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 https://github.com/andthum/mdtools/pull/205 - New function
mdtools.dtrj.transitionthat 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.pyandmdtools/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.pythat corrects the intermittent behavior of a discrete trajectory by @andthum in https://github.com/andthum/mdtools/pull/202 - Scripts
discretization/back_jump_prob.pyanddiscretization/back_jump_prob_discrete.py: Return normalization factors by @andthum in https://github.com/andthum/mdtools/pull/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 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_meierandmdtools.dtrj.leave_prob: Fix consistency checks by @andthum in https://github.com/andthum/mdtools/pull/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 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.dtrjby @andthum in https://github.com/andthum/mdtools/pull/186
Code refactoring
- Add more consistency checks to the functions
mdtools.dtrj.back_jump_probandmdtools.dtrj.back_jump_prob_discreteby @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 scriptsscripts/discretization/back_jump_prob.pyandscripts/discretization/kaplan_meier.pyby @andthum in https://github.com/andthum/mdtools/pull/184 - Rename the function
mdtools.functions.gtomdtools.functions.lineby @andthum in https://github.com/andthum/mdtools/pull/171 - Rename the function
mdtools.functions.g_inversetomdtools.functions.line_invby @andthum in https://github.com/andthum/mdtools/pull/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 https://github.com/andthum/mdtools/pull/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 https://github.com/andthum/mdtools/pull/184 - New functions
mdtools.dtrj.kaplan_meierandmdtools.dtrj.kaplan_meier_discretethat 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_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 https://github.com/andthum/mdtools/pull/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 https://github.com/andthum/mdtools/pull/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 https://github.com/andthum/mdtools/pull/184 - New function
mdtools.statistics.moment_raw2centhat 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_rateandmdtools.dtrj.trans_rate_per_statethat 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_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 https://github.com/andthum/mdtools/pull/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 https://github.com/andthum/mdtools/pull/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 https://github.com/andthum/mdtools/pull/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 https://github.com/andthum/mdtools/pull/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 https://github.com/andthum/mdtools/pull/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 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.0to>=2.0, <7.0in https://github.com/andthum/mdtools/pull/174
Documentation updates
- Write documentation for the script
scripts/dynamics/extract_renewal_events.pyby @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_discreteby @andthum in https://github.com/andthum/mdtools/pull/173 - Include the module
mdtools.functionsin 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.structuremodule 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_subarraysby @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
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 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_nby @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_longby @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_distby @andthum in https://github.com/andthum/mdtools/pull/166.Script
discretization/discrete_pos.py: Add new command-line option--tolby @andthum in https://github.com/andthum/mdtools/pull/167.Function
mdtools.file_handler.save_dtrj: Add a new argumentrenameby @andthum in https://github.com/andthum/mdtools/pull/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 https://github.com/andthum/mdtools/pull/167.Fix an
ifcondition in the functionmdtools.check.binsthat could raise aTypeErrorby @andthum in https://github.com/andthum/mdtools/pull/167.Correct run time information of
state_lifetime.pyandstate_lifetime_discrete.pyby @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_probandmdtools.dtrj.remain_prob_discreteby @andthum in https://github.com/andthum/mdtools/pull/158 - New command-line option
--intermittencyforscripts.discretization.state_lifetimeby @andthum in https://github.com/andthum/mdtools/pull/158 - New command-line options
--intermittency1and--intermittency2forscripts.discretization.state_lifetime_discreteby @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.pyandstate_lifetime_discrete.pyby @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 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:
* --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.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.
- 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.
- Python
Published by andthum almost 3 years ago
mdtools - 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 https://github.com/andthum/mdtools/pull/149plot_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_averagetomdtools.statistics.cumavto 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-pointsand--observablesby @andthum in https://github.com/andthum/mdtools/pull/142
New feature
- Create a new function
mdtools.statistics.movavthat 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.pyby @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.pyby @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.pyby @andthum in https://github.com/andthum/mdtools/pull/96 - Fix script
plot_ener_dist.pyby @andthum in https://github.com/andthum/mdtools/pull/114 - [Feat]: New option
--difffor the scriptplot_ener_dist.pyby @andthum in https://github.com/andthum/mdtools/pull/115 - New script
subvolume_charge.pyby @andthum in https://github.com/andthum/mdtools/pull/119 - New script
plot_attribute_hist.pyby @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