Skip to content

Commit

Permalink
bonds: added reduce function for backwards-compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
KaiSzuttor committed Jul 18, 2018
1 parent 5607b09 commit dacb4f7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/python/espressomd/interactions.pyx
Expand Up @@ -1782,6 +1782,10 @@ cdef class BondedInteraction(object):
raise Exception(
"The constructor has to be called either with a bond id (as interger), or with a set of keyword arguments describing a new interaction")


def __reduce__(self):
return (self.__class__, (self._bond_id,))

def is_valid(self):
"""Check, if the data stored in the instance still matches what is in Espresso.
Expand Down

0 comments on commit dacb4f7

Please sign in to comment.