def __call__(self, x, do_gradient=False):
x = x.reshape((-<NUM_LIT:1>, <NUM_LIT:3>))<EOL>result = <NUM_LIT:0.0><EOL>gradient = np.zeros(x.shape, float)<EOL>if self.dm_quad > <NUM_LIT:0.0>:<EOL><INDENT>result += ff_dm_quad(x, self.dm0, self.dmk, self.dm_quad,<EOL>gradient, self.matrix, self.reciprocal)<EOL><DEDENT>if self.dm_reci:<EOL><INDENT>result += ff_dm_reci(x, self.vdw_radii, self.dm, self.dm_reci,<EOL>gradient, self.matrix, self.reciprocal)<EOL><DEDENT>if self.bond_quad:<EOL><INDENT>result += ff_bond_quad(x, self.bond_edges, self.bond_lengths,<EOL>self.bond_quad, gradient, self.matrix,<EOL>self.reciprocal)<EOL><DEDENT>if self.span_quad:<EOL><INDENT>result += ff_bond_quad(x, self.span_edges, self.span_lengths,<EOL>self.span_quad, gradient, self.matrix,<EOL>self.reciprocal)<EOL><DEDENT>if self.bond_hyper:<EOL><INDENT>result += ff_bond_hyper(x, self.bond_edges, self.bond_lengths,<EOL>self.bond_hyper_scale, self.bond_hyper,<EOL>gradient, self.matrix, self.reciprocal)<EOL><DEDENT>if do_gradient:<EOL><INDENT>return result, gradient.ravel()<EOL><DEDENT>else:<EOL><INDENT>return result<EOL><DEDENT>
Compute the energy (and gradient) for a set of Cartesian coordinates

           Argument:
            | ``x``  --  the Cartesian coordinates
            | ``do_gradient``  --  when set to True, the gradient is also
                                   computed and returned. [default=False]