From 8b0e986a0deda4b219318b09f1f9561c8f529ed3 Mon Sep 17 00:00:00 2001 From: pbuslaev Date: Tue, 25 Jun 2024 17:26:41 +0100 Subject: [PATCH 1/2] Changed scipy simps import due to API change --- src/pmx/analysis.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pmx/analysis.py b/src/pmx/analysis.py index 66c7484b..1ba8c2cd 100644 --- a/src/pmx/analysis.py +++ b/src/pmx/analysis.py @@ -3,7 +3,10 @@ import subprocess import os from os import path -from scipy.integrate import simps +try: + from scipy.integrate import simps +except ImportError: + from scipy.integrate import simpson as simps from matplotlib import pyplot as plt from copy import deepcopy from scipy.special import erf From bcf15aa11f645d713a88d4c88c5fca108d7bdecb Mon Sep 17 00:00:00 2001 From: pbuslaev Date: Tue, 20 Aug 2024 14:27:05 +0100 Subject: [PATCH 2/2] Update ligand_alchemy.py Solves #47 --- src/pmx/ligand_alchemy.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pmx/ligand_alchemy.py b/src/pmx/ligand_alchemy.py index eccdd44a..02490402 100644 --- a/src/pmx/ligand_alchemy.py +++ b/src/pmx/ligand_alchemy.py @@ -714,9 +714,9 @@ def _mapH( self, nfoo, nbar ): # when n1 and n2 have an equal number of them bound nH1 = self._countHydrogens(nb1) nH2 = self._countHydrogens(nb2) - if nH1!=nH2: - continue - # also skip the rest of the loop if there are no neighbour hydrogens + # Related to issue #47. Hydrogens can be mapped for CH2 and CH3 for instance. + # Thus, in case of nH1 != nH2, we can proceed to mapping hydrogens + # But we need to skip the rest of the loop if there are no neighbour hydrogens if nH1==0 or nH2==0: continue