Release History¶
0.25.2¶
This release fixes a bug caused by the use of an incorrect API from the warnings module. The issue could trigger errors when retrying simulations that had previously resulted in temporary NaNs.
Revert to using
warnings.warn. PR #790
0.25.1¶
This release fixes a bug where get_entropy() and get_enthalpy() `` would return an ``AttributeError when using pymbar4.
See #757 for more details.
This release fixes deprecation warnings for pkg_resources and warnings.warn.
Replaced scipy.integrate.quadrature with scipy.integrate.quad to enable scipy >= 1.15.0 support.
See #788 for more details.
0.25.0¶
This release removes the requirement that the online_analysis_interval is a multiple of checkpoint_interval. See #799 for more details.
Enhancements¶
Removes the requirement that the
online_analysis_intervalis a multiple ofcheckpoint_interval- Issue a logger warning rather than raise aValueError- Note that the real time analysis output file may contain redundant information after restoring from checkpoints that would result in the repeated calculation of a specific iteration index - See #799 for more details
0.24.2 - Numpy 2 support and FIRE minimization improvements¶
This release enables numpy 2 support and makes the FIRE minimization more stable by disabling the barostat during the minimization.
Enhancements¶
Bug Fixes¶
Fixes for numpy 2.0 (ruff NPY201) (#777) by @IAlibay
0.24.1 - Differential storage of positions and velocities¶
Enhancements¶
MultiStateReporternow accepts variable position and velocity checkpointing intervals. Note that when resuming simulations users have to specify again the keyword arguments for the reporter (Pull Request #767).
0.24.0 - pyMBAR Behavior Changes + HIP Platform Added¶
Bug Fixes¶
Update docstring default for
alchemical_pme_treatment(Pull Request #644).
Behavior Changes¶
Use
robustsolver forpyMBARby default.pyMBAR3 & 4 used two different solvers by default. We now use therobustsolver by default regardless of thepyMBARversion. We still respect whichever solver is specified inanalysis_kwargs(i.eanalysis_kwargs["solver_protocol"] = "robust"when creating the analyzer, but now set the solver to"robust"if no solver is specified. This should improve convergence performance (Pull Request #735).
Enhancements¶
Added OpenMM’s “HIP” platform as a selectable platform. With the release of OpenMM 8.2, the “HIP” platform is now available to use on compatible AMD GPUs. This update will allow
openmmtoolsto automatically select the HIP platform if it is available (Pull Request #753).Added
effective_lengthtoMultiStateSamplerAnalyzer(Pull Request #589).Create
alchemysubpackage (Pull Request #721).
Testing¶
Testing framework overhauled to use pytest and flaky tests now automatically re-run if they fail (Pull Request #714, Pull Request #746, Pull Request #749, Pull Request #751)
Use OMSF’s gha-runner to test on GPUs.
0.23.1 - Bugfix release¶
Bugfixes¶
Fix issue where if
Nonewas used foronline_analysis_intervalan error would be thrown (issue #708 PR `#710 <https://github.com/choderalab/openmmtools/pull/710`_)
0.23.0 - latest numba support and real time stats enhancements¶
Please note that there is an API breaking change. To ensure consistency of the data when appending real time stats make sure that you make the online_analysis_interval of your MultiStateSampler object match the checkpoint_interval of your MultiStateReporter. It will error if this is not the case.
Enhancements¶
Bugfixes¶
Fix metadata for netcdf files, specifying openmmtools for the
programmetadata (issue #694, PR #704).Real time statistics YAML file gets appended instead of overwritten when extending or resumimng simulations (issue #691, PR #692).
Error when resuming simulations with numba 0.57 fixed by avoiding using
numpy.MaskedArraywhen deserializing.ncfiles (issue #700, PR #701)
0.22.1 - Bugfix release¶
Bugfixes¶
Fixed issue where the error message thrown from openMM changed, so we need a case insensitive check. This was already fixed in most of the code base but one spot was missed. (PR #684)
0.22.0 - pymbar 4 support and gentle equilibration¶
Enhancements¶
Bugfixes¶
Users were not able to distinguish the exceptions caught during dynamics. Warnings are now raised when an exception is being caught (Issue #643 PR #658).
Deserializing MCMC moves objects from versions <=0.21.4 resulted in error finding the key. Fixed by catching the exception and raising a warning when key is not found (Issue #618 PR #675).
Different improvements in documentation strings and readthedocs documentation generation (Issues #620 #641 #548. PR #676)
Support for newer NetCDF versions (1.6 branch) by not using zlib compression for varying length variables. (PR #654).
0.21.5 - Bugfix release¶
Changed behaviors¶
Bugfixes¶
Velocities were being incorrectly updated as zeros when resuming simulations or broadcasting from different mpi processes. Fixed by specifying
ignore_velocities=Falsein_propagate_replica. Issue #531 (PR #602).Bug in equilibration detection #1: The user was allowed to specify
statistical_inefficiencywithout specifyingn_equilibration_iterations, which doesn’t make sense, asn_equilibration_iterationsandn_effective_maxcannot be computed fromstatistical_inefficiencyalone. Fixed by preventing user from specifyingstatistical_inefficiencywithoutn_equilibration_iterations. Issue #609 (PR #610).Bug in equilibration detection #2: If the user specified
n_equilibration_iterationsbut notstatistical_inefficiency, the returnedn_equilibration_iterationsdid not include number of equilibration iterations as computed from_get_equilibration_data_per_sample(). Fixed by always including the_get_equilibration_data_per_sample()result in in the returnedn_equilibration_iterations. Issue #609 (PR #610).Bug in equilibration detection #3:
get_equilibration_data_per_samplereturns 0 forn_equilibration_iterations. Fixed by always discarding the first time origin returned byget_equilibration_data_per_sample. To control the amount of data discarded by the first time origin, the user can now specifymax_subsetwhen initializingMultiStateSamplerAnalyzer. Issue #609 (PR #610).Deserializing simulations from
openmmtools<0.21.3versions resulted in error. Fixed by catching the missing key,KeyErrorexception, when deserializing. Issue #612, PR #613.Not specifying a subdirectory for the reporter file resulted in
PermissionErrorwhen writing the real time analysis file. Fixed by usingos.path.joinfor creating the output paths. Issue #615, PR #616.
Enhancements¶
LangevinDynamicsMovenow allowsconstraint_toleranceparameter and public attribute, for specifying the fraction of the constrained distance within which constraints are maintained for the integrator (Refer to Openmm’s documentation for more information). Issue #608, PR #611.Platform is now reported in the logs in DEBUG mode. Issue #583, PR #605.
0.21.4 - Bugfix release¶
Bugfixes¶
Bug in statistical inefficiency computation – where self.max_n_iterations wasn’t being used – was fixed (#577).
Bug in estimated performance in realtime yaml file – fixed by iterating through all MCMC moves (#578)
Potential bug fixed by explicitly updating and broadcasting thermodynamic states in replicas, when used in an MPI (distributed) context. Issue #579 (#587).
Bug in handling unsampled states in realtime/offline analysis – fixed by using
MultiStateSampler._unsampled_statesto build the mbar estimate array. Issue #592 (#593)
Enhancements¶
0.21.3 - Bugfix release¶
Bugfixes¶
Bug in replica mixing in MPI multi-GPU runs–where some replicas were simulated in incorrect states–was fixed (#449) & (#562).
Velocities are now stored in the checkpoint file to eliminate issue with “cold restart”. Fixes issue #531 (#555).
Documentation now correctly builds via CI. Fixes issue #548 (#554).
Enhancements¶
Real time MBAR analysis and timing information is now produced in yaml format at user-specified intervals (#565), (#561) & (#572).
Information of what CUDA devices are available is now provided in log output (#570).
Replica exchanges are now attempted during equilibration phase to enhance mixing (#556).
An example of resuming a MultiStateSampler simulation using API is now provided (#569)
0.21.2 - Bugfix release¶
Bugfixes¶
Fixed UnboundLocalError when using a string to specify platform in
platform_supports_precision(#551).
0.21.1 - Bugfix release¶
Bugfixes¶
More streamlined context cache usage using instance attributes (#547).
Improved docstring and examples for
MultiStateSamplerobject.
0.21.0 - Bugfix release¶
Bugfixes¶
Fixes TestAbsoluteAlchemicalFactory.test_overlap NaNs (#534)
Try closing reporter in test for windows fix (#535)
Follow NEP 29 and test newer python versions and drop old ones (#542)
Update to handle the new OpenMM 7.6 package namespace (#528)
Context cache usage cleanup (#538 <https://github.com/choderalab/openmmtools/pull/538>_). Avoiding memory issues and more streamlined API usage of ContextCache objects.
Known issues¶
Correctly raises an error when a
CustomNonbondedForcemade by OpenMM’sLennardJonesGeneratoris detected (#511)
Enhancement¶
0.20.3 - Bugfix release¶
Bugfixes¶
Fixes [#505](https://github.com/choderalab/openmmtools/issues/505): GPU contexts would silently fail to enable ‘mixed’ precision; corrects reporting of available precisions
0.20.2 - Bugfix release¶
Remove leftover support for python 2.7
Cleanup¶
Remove leftover six imports and xrange (#504)
0.20.1 - Bugfix release¶
Enhancements¶
openmmtools.utils.get_available_platforms()and.get_fastest_platform()now filter OpenMM Platforms based on specified minimum precision support, which defaults tomixed
Bugfixes¶
Misc¶
Resolve
numpy 1.20DeprecationWarningaboutnp.float
0.20.0 - Periodic alchemical integrators¶
Enhancements¶
Add PeriodicNonequilibriumIntegrator, a simple extension of AlchemicalNonequilibriumLangevinIntegrator that supports periodic alchemical protocols
0.19.1 - Bugfix release¶
Bugfixes¶
Fixed a crash during the restraint unbiasing for systems with an unexpected order of atoms of receptor and ligands (#462).
0.19.0 - Multiple alchemical regions¶
New features¶
Added support in
AbsoluteAlchemicalFactoryfor handling multiple independent alchemical regions (#438).Added support for anisotropic and membrane barostats in ThermodynamicState (#437).
Added support for platform properties in ContextCache (e.g. for mixed and double precision CUDA in multistate sampler) (#437).
Bugfixes¶
Known issues¶
Using parallel MPI processes causes poor mixing of the odd thermodynamic states while the mixing of the even states is normal. We’re still investigating whether the issue is caused by a change in the MPI library or an internal bug. For now, we recommend running calculations using only 1 GPU (see also #449 and yank#1130).
0.18.3 - Storage enhancements and bugfixes¶
Bugfixes¶
Enhancements¶
Writing on disk is much faster when the checkpoint_interval of multi-state samplers is large. This was due to the dimension of the netcdf chunk size increasing with the checkpoint interval and surpassing the dimension of the netcdf chunk cache. The chunk size of the iteration dimension is now always set to 1 (#432).
0.18.2 - Bugfix release¶
Bugfixes¶
A bug in the multistate samplers where``logsumexp`` was imported from
scipy.misc(now inscipy.special) was fixed (#423).Improve the robustness of opening the netcdf file on resuming of the multi-state samplers by setting the environment variable HDF5_USE_FILE_LOCKING to FALSE after 4 failed attempts (#426).
Fixed a crash during exception handling (#426).
Other¶
Update build infrastructure to match MolSSI cookiecutter (#424, #426).
0.18.1 - Bugfix release¶
This is a minor bugfix release.
New features¶
Improvements for
HostGuest*classes - addoemols,host_oemol, andguest_oemolproperties to retrieve OpenEye ToolkitOEMolobjects (requires toolkit license and installation) - these classes can now accept overridingkwargs
Bugfixes¶
openmmtools.multistateexperimental API warning is only issued whenopenmmtools.multistateis importedAlchemicalNonequilibriumLangevinIntegrator.reset()now correctly resets the nonequilibrium work
0.18.0 - Added multistate samplers¶
New features¶
Add a number of classes that can use MCMC to sample from multiple thermodynamic states: -
MultiStateSampler: sample independently from multiple thermodynamic states -ReplicaExchangeSampler: replica exchange among thermodynamic states -SAMSSampler: self-adjusted mixture sampling (SAMS) samplingAll samplers can use MPI via the mpiplus package
0.17.0 - Removed Py2 support, faster exact PME treatment¶
New features¶
Add
GlobalParameterFunctionthat allows to enslave aGlobalParameterto an arbitrary function of controlling variables (#380).Allow to ignore velocities when building the dict representation of a
SamplerState. This can be useful for example to save bandwidth when sending aSamplerStateover the network and velocities are not required (#386).Add
DoubleWellDimer_WCAFluidandDoubleWellChain_WCAFluidtest systems (#389).
Enhancements¶
New implementation of the exact PME handling that uses the parameter offset feature in OpenMM 7.3. This comes with a
considerable speed improvement over the previous implementation (#380).
- Exact PME is now the default for the alchemical_pme_treatment parameter in the constructor of
AbsoluteAchemicalFactory (#386).
- It is now possible to have multiple composable states exposing the same attributes/getter/setter in a
CompoundThermodynamicState (#380).
Bug fixes¶
Fixed a bug involving the
NoseHooverChainVelocityVerletIntegratorwithSystemwith constraints. The constraints were not taken into account when calculating the number of degrees of freedom resulting in the temperature not converging to the target value. (#384)Fixed a bug affecting
reduced_potential_at_stateswhen computing the reduced potential of systems in different ``AlchemicalState``s when the same alchemical parameter appeared in force objects split in different force groups. (#385)
Deprecated and API breaks¶
Python 2 and 3.5 is not supported anymore.
The
update_alchemical_chargesattribute of ``AlchemicalState`, which was deprecated in 0.16.0, has now been removed since it doesn’t make sense with the new parameter offset implementation.The methods
AlchemicalState.get_alchemical_variableandAlchemicalState.set_alchemical_variablehave been deprecated. UseAlchemicalState.get_alchemical_functionandAlchemicalState.set_alchemical_functioninstead.
0.16.0 - Py2 deprecated, GlobalParameterState class, SamplerState reads CVs¶
New features¶
Add ability for
SamplerStateto access new OpenMM Custom CV Force Variables (#362).SamplerState.update_from_contextnow has keywords to support finer grain updating from the Context. This is only recommended for advanced users (#362).Added the new class
states.GlobalParameterStatedesigned to simplify the implementation of composable states that control global variables (#363).Allow restraint force classes to be controlled by a parameter other than
lambda_restraints. This will enable multi-restraints simulations (#363).
Enhancements¶
Global variables of integrators are now automatically copied over the integrator returned by
ContextCache.get_context. It is possible to specify exception throughContextCache.INCOMPATIBLE_INTEGRATOR_ATTRIBUTES(#364).
Others¶
Integrator
MCMCMove``s now attempt to recover from NaN automatically by default (with ``n_restart_attemptsset to 4) (#364).
Deprecated¶
Python2 is officially deprecated. Support will be dropped in future versions.
Deprecated the signature of
IComposableState._on_setattrto fix a bug where the objects were temporarily left in an inconsistent state when an exception was raised and caught.Deprecated
update_alchemical_chargesinAlchemicalStatein anticipation of the new implementation of the exact PME that will be based on theNonbondedForceoffsets rather thanupdateParametersInContext().
0.15.0 - Restraint forces¶
0.14.0 - Exact treatment of alchemical PME electrostatics, water cluster test system, optimizations¶
New features¶
Enhancements¶
Bug fixes¶
Copy thermodynamic state on compound state initialization. (#320)
0.13.4 - Barostat/External Force Bugfix, Restart Robustness¶
Bug fixes¶
Fixed implementation bug where
CustomExternalForcerestraining atoms to absolute coordinates caused an issue when a Barostat was used (#310)
Enhancements¶
MCMC Integrators now attempt to re-initialize the
Contextobject on the last restart attempt when NaN’s are encountered. This has internally been shown to correct some instances where normally resetting positions does not work around the NaN’s. This is a slow step relative to just resetting positions, but better than simulation crashing.
0.13.3 - Critical Bugfix to SamplerState Context Manipulation¶
Critical Fixes¶
SamplerState.apply_to_context()applies box vectors before positions are set to prevent a bug on non-Reference OpenMM Platforms which can re-order system atoms. (#305)
Additional Fixes¶
0.13.2 - SamplerState Slicing and BitWise And/Or Ops¶
Added support for SamplerState slicing (#298)
Added bit operators and and or to math_eval (#301)
0.13.1 - Bugfix release¶
0.13.0 - Alternative reaction field models, Langevin splitting MCMCMove¶
New Features¶
Storage Interface module with automatic disk IO handling
Option for shifted or switched Reaction Field
LangevinSplittingDynamicMCMC move with specifiable sub step orderingNose-Hoover Chain Thermostat
Bug Fixes¶
Many doc string cleanups
Tests are based on released versions of OpenMM
Tests also compare against development OpenMM, but do not fail because of it
Fixed bug in Harmonic Oscillator tests’ error calculation
Default collision rate in Langevin Integrators now matches docs
0.12.1 - Add virtual sites support in alchemy¶
0.12.0 - GB support in alchemy and new forces module¶
New features¶
Add AbsoluteAlchemicalFactory support for all GB models (#250)
Added
forcesandforcefactoriesmodules implementingUnishiftedReactionFieldForceandreplace_reaction_fieldrespectively. The latter has been moved fromAbsoluteAlchemicalFactory(#253)Add
restrain_atomsto restrain molecule conformation through an harmonic restrain (#255)
Bug fixes¶
0.11.2 - Bugfix release¶
Hotfix in fringe Python2/3 compatibility issue when using old style serialization systems in Python 2
0.11.1 - Optimizations¶
0.11.0 - Conda forge installation¶
New Features¶
LangevinIntegratornow setsmeasure_heat=Falseby default for increased performance (#211)AbsoluteAlchemicalFactorynow supportsdisable_alchemical_dispersion_correctionto prevent 600x slowdowns with nonequilibrium integration (#218)We now require conda-forge as a dependency for testing and deployment (#216)
Conda-forge added as channel to conda packages
0.10.0 - Optimizations of ThermodynamicState, renamed AlchemicalFactory¶
BREAKS API: Renamed AlchemicalFactory to AbsoluteAlchemicalFactory (#206)
Major optimizations of ThermodynamicState (#200, #205)
Keep in memory only a single System object per compatible state
Fast copy/deepcopy
Enable custom optimized serialization for multiple states
Added readthedocs documentation (#191)
Bugfix for serialization of context when NaN encountered (#199)
Added tests for Python 3.6 (#184)
0.9.4 - Nonequilibrium integrators overhaul¶
Major changes¶
Overhaul of
LangevinIntegratorand subclasses to better support nonequilibrium integratorsAdd true reaction-field support to
AlchemicalFactoryAdd some alchemical test systems
Updates to openmmtools.integrators.LangevinIntegrator and friends¶
API-breaking changes¶
The nonequilibrium integrators are now called
AlchemicalNonequilibriumLangevinIntegratorandExternalPerturbationLangevinIntegrator, and both are subclasses of a commonNonequilibriumLangevinIntegratorthat provides a consistent interface to setting and gettingprotocol_workAlchemicalNonequilibriumLangevinIntegratornow has a defaultalchemical_functionsto eliminate need for every test to treat it as a special case (#180)The
get_protocol_work()method allows you to retrieve the protocol work from anyNonequilibriumLangevinIntegratorsubclass and returns a unit-bearing work. The optionaldimensionless=Trueargument returns a dimensionless float in units of kT.Integrator global variables now store all energies in natural OpenMM units (kJ/mol) but the new accessor methods (see below) should b used instead of getting integrator global variables for work and heat. (#181)
Any private methods for adding steps to the integrator have been prepended with
_to hide them from the public API.
New features¶
Order of arguments for all
LangevinIntegratorderivatives matchesopenmm.LangevinIntegratorso it can act as a drop-in replacement. (#176)The
get_shadow_work()andget_heat()methods are now available for anyLangevinIntegratorsubclass, as well as the corresponding propertiesshadow_workand heat. The functions also supportdimensionless=True.(#163)The
shadow_workandheatproperties were added to all LangevinIntegrator subclasses, returning the values of these properties (if the integrator was constructed with the appropriatemeasure_shadow_work=Trueormeasure_heat=Trueflags) as unit-bearing quantitiesThe
get_protocol_work()andget_total_work()methods are now available for anyNonequilibriumLangevinIntegrator, returning unit-bearing quantities unlessdimensionless=Trueis provided in which case they return the work in implicit units of kT.get_total_work()requires the integrator to have been constructed withmeasure_shadow_work=True.The
protocol_workandtotal_workproperties were added to allNonequilibriumLangevinIntegratorsubclasses, and return the unit-bearing work quantities.total_workrequires the integrator to have been constructed withmeasure_shadow_work=True.The subclasses have been reworked to support any kwargs that the base classes support, and defaults have all been made consistent.
Various reset() methods have been added to reset statistics for all
LangevinIntegratorsubclasses.All custom integrators support
.pretty_format()and.pretty_print()with optional highlighting of specific step types.
Bugfixes¶
Zero-step perturbations now work correctly (#177)
AlchemicalNonequilibriumLangevinIntegratornow correctly supports multipleHsteps.
Internal changes¶
Adding new LangevinIntegrator step methods now uses a
self._register_step_method(step_string, callback_function, supports_force_groups=False)call to simplify this process.Code duplication has been reduced through the use of calling base class methods whenever possible.
run_nonequilibrium_switching()test now uses BAR to test dragging a harmonic oscillator and tests a variety of integrator splittings(["O { V R H R V } O", "O V R H R V O", "R V O H O V R", "H R V O V R H"]).Integrator tests use deterministic PME and mixed precision when able.
Updates to openmmtools.alchemy.AlchemicalFactory¶
Reaction field electrostatics now removes the shift, setting
c_rf = 0.A convenience method AlchemicalFactory.replace_reaction_field() has been added to allow fully-interacting systems to be modified to force
c_rf = 0by recoding reaction-field electrostatics as aCustomNonbondedForce
New openmmtools.testsystems classes¶
AlchemicalWaterBox was added, which has the first water molecule in the system alchemically modified