Skip to content

Commit

Permalink
Make pybel compatible with openbabel#1975
Browse files Browse the repository at this point in the history
  • Loading branch information
yishutu committed Jul 8, 2019
1 parent 528f73f commit a370054
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions scripts/python/openbabel/pybel.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -796,7 +802,7 @@ def type(self):

@property
def valence(self):
return self.OBAtom.GetValence()
return self.OBAtom.GetExplicitDegree()

@property
def vector(self):
Expand Down

0 comments on commit a370054

Please sign in to comment.