diff --git a/README.md b/README.md index b08001ef..f8a3212a 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Transformato [![GH Pages](https://github.com/wiederm/transformato/actions/workflows/build_page.yaml/badge.svg)](https://github.com/wiederm/transformato/actions/workflows/build_page.yaml) [![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/transformato.svg)](https://anaconda.org/conda-forge/transformato) -Transformato is a package that helps to set up relative alchemical free energy calculations of small molecules with a common core scaffold, either for solvation free energy[^1] or binding free energy[^2] estimates. The package is designed to be used with output generated by [CHARMM-GUI](https://charmm-gui.org/). +Transformato is a package that helps to set up relative alchemical free energy calculations of small molecules with a common core scaffold, either for relative solvation free energy[^1], absolute solvation free energy[^2] or binding free energy[^3] estimates. The package is designed to be used with output generated by [CHARMM-GUI](https://charmm-gui.org/). ## Installation @@ -29,7 +29,7 @@ For more information on how to use transformato please visit the [documentation] ### Copyright -:copyright: 2022, Marcus Wieder, Johannes Karwounopoulos, Stefan Boresch +:copyright: 2023, Marcus Wieder, Johannes Karwounopoulos, Stefan Boresch #### Acknowledgements @@ -39,5 +39,6 @@ Project based on the [^1]: Wieder, M., Fleck, M., Braunsfeld, B., Boresch, S., *J. Comput. Chem.* 2022, 1. [DOI](https://doi.org/10.1002/jcc.26877) -[^2]: Karwounopoulos, J., Wieder, M., Boresch, S., *Front. Mol. Biosci.* 2022, 9, 954638 [DOI](https://doi.org/10.3389/fmolb.2022.954638 +[^2]: Karwounopoulos, J.,Kaupang, A., Wieder, M., Boresch, S., *JCTC* 2023, 9, 954638 [DOI](https://doi.org/10.1021/acs.jctc.3c00691) +[^3]: Karwounopoulos, J., Wieder, M., Boresch, S., *Front. Mol. Biosci.* 2022, 9, 954638 [DOI](https://doi.org/10.3389/fmolb.2022.954638 ) diff --git a/devtools/conda-envs/fep_env.yaml b/devtools/conda-envs/fep_env.yaml index 2c1a251e..e9fb7862 100644 --- a/devtools/conda-envs/fep_env.yaml +++ b/devtools/conda-envs/fep_env.yaml @@ -8,7 +8,7 @@ dependencies: - openmmtools - numpy - ipython - - pymbar=3 + - pymbar - rdkit - parmed - pyyaml @@ -25,5 +25,4 @@ dependencies: - codecov - pip: - git+https://github.com/wiederm/tf_routes.git - - git+https://github.com/ParmEd/ParmEd.git - git+https://github.com/wiederm/transformato_testsystems.git diff --git a/transformato/analysis.py b/transformato/analysis.py index a154ff45..fbd03dd6 100644 --- a/transformato/analysis.py +++ b/transformato/analysis.py @@ -301,8 +301,12 @@ def calculate_dG_using_mbar(self, u_kn: np.array, N_k: dict, env: str): nr_of_snapshots = N_k[env][d] + N_k[env][d + 1] u_kn_ = u_kn[d : d + 2 :, start : start + nr_of_snapshots] m = mbar.MBAR(u_kn_, N_k[env][d : d + 2]) - logger.debug(m.getFreeEnergyDifferences(return_dict=True)["Delta_f"][0, 1]) - logger.debug(m.getFreeEnergyDifferences(return_dict=True)["dDelta_f"][0, 1]) + logger.debug( + m.compute_free_energy_differences(return_dict=True)["Delta_f"][0, 1] + ) + logger.debug( + m.compute_free_energy_differences(return_dict=True)["dDelta_f"][0, 1] + ) start += N_k[env][d] @@ -690,9 +694,9 @@ def _load_mbar_results(file: str): def free_energy_differences(self, env="vacuum"): """matrix of free energy differences""" try: - r = self.mbar_results[env].getFreeEnergyDifferences(return_dict=True)[ - "Delta_f" - ] + r = self.mbar_results[env].compute_free_energy_differences( + return_dict=True + )["Delta_f"] except KeyError: raise KeyError(f"Free energy difference not obtained for : {env}") return r @@ -709,9 +713,9 @@ def free_energy_overlap(self, env="vacuum"): def free_energy_difference_uncertainties(self, env="vacuum"): """matrix of asymptotic uncertainty-estimates accompanying free energy differences""" try: - r = self.mbar_results[env].getFreeEnergyDifferences(return_dict=True)[ - "dDelta_f" - ] + r = self.mbar_results[env].compute_free_energy_differences( + return_dict=True + )["dDelta_f"] except KeyError: raise KeyError(f"Free energy uncertanties not obtained for : {env}") return r diff --git a/transformato/tests/test_restraints.py b/transformato/tests/test_restraints.py index 4f047c7f..ff3f4df4 100644 --- a/transformato/tests/test_restraints.py +++ b/transformato/tests/test_restraints.py @@ -230,7 +230,8 @@ def test_integration(): ) simulation.minimizeEnergy( - tolerance=inputs.mini_Tol * kilojoule / mole, maxIterations=10 + tolerance=inputs.mini_Tol * kilojoule / (openmm.unit.nanometer * mole), + maxIterations=10, ) logger.info( f"Potential energy after 1-iter minimization {simulation.context.getState(getEnergy=True).getPotentialEnergy()}"