def copy(self):
<EOL>model = self._model<EOL>self._model = None<EOL>for i in self._metabolites:<EOL><INDENT>i._model = None<EOL><DEDENT>for i in self._genes:<EOL><INDENT>i._model = None<EOL><DEDENT>new_reaction = deepcopy(self)<EOL>self._model = model<EOL>for i in self._metabolites:<EOL><INDENT>i._model = model<EOL><DEDENT>for i in self._genes:<EOL><INDENT>i._model = model<EOL><DEDENT>return new_reaction<EOL>
Copy a reaction

        The referenced metabolites and genes are also copied.