From a3700549adb6e2122d2e0c324ae42f5b150daa75 Mon Sep 17 00:00:00 2001 From: Yi-Shu Tu Date: Mon, 8 Jul 2019 15:21:43 +0800 Subject: [PATCH] Make pybel compatible with #1975 --- scripts/python/openbabel/pybel.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/scripts/python/openbabel/pybel.py b/scripts/python/openbabel/pybel.py index 567bc6257e..cfd623a6c1 100644 --- a/scripts/python/openbabel/pybel.py +++ b/scripts/python/openbabel/pybel.py @@ -755,12 +755,18 @@ def formalcharge(self): return self.OBAtom.GetFormalCharge() @property - def heavyvalence(self): - return self.OBAtom.GetHvyValence() + def heavydegree(self): + return self.OBAtom.GetHvyDegree() + + #Keep legacy names + heavyvalence = heavydegree @property - def heterovalence(self): - return self.OBAtom.GetHeteroValence() + def heterodegree(self): + return self.OBAtom.GetHeteroDegree() + + #keep legacy names + heterovalence = heterodegree @property def hyb(self): @@ -796,7 +802,7 @@ def type(self): @property def valence(self): - return self.OBAtom.GetValence() + return self.OBAtom.GetExplicitDegree() @property def vector(self):