def calculate_pore_diameter_opt(self, **kwargs):
(self.pore_diameter_opt, self.pore_opt_closest_atom,<EOL>self.pore_opt_COM) = opt_pore_diameter(self.elements,<EOL>self.coordinates, **kwargs)<EOL>self.properties['<STR_LIT>'] = {<EOL>'<STR_LIT>': self.pore_diameter_opt,<EOL>'<STR_LIT>': int(self.pore_opt_closest_atom),<EOL>'<STR_LIT>': self.pore_opt_COM,<EOL>}<EOL>return self.pore_diameter_opt<EOL>
Return the intrinsic pore diameter (for the optimised pore centre).

Similarly to :func:`calculate_pore_diameter` this method returns the
the intrinsic pore diameter, however, first a better approximation
of the pore centre is found with optimisation.

Returns
-------
:class:`float`
    The intrinsic pore diameter.