[ase-users] Opinion about potentially adding Cython as a dependency

Hugo Strand hugo.strand at gmail.com
Tue Oct 10 13:22:17 CEST 2017


Dear Gaël,

I am not an expert on ASE, but just as a comment, I have stumbled over an
(ancient?) part of ASE that actually depends on weave to build c code.

See ase/build/supercells.py and the function find_optimal_cell_shape.

The funny thing is that weave used to be part of scipy but has now been
separated out into a module of its own. Scipy seems to use cython instead
nowadays, see https://github.com/scipy/weave.

I think the supercell code could also benefit from being ported to cython
at some point.

Best, Hugo

On Tue, Oct 10, 2017 at 10:52 AM, Gaël Donval via ase-users <
ase-users at listserv.fysik.dtu.dk> wrote:

> Dear list,
>
> I am currently working on some geometrical code that I will ultimately
> propose adding to ASE. I am currently using Cython to speed up what
> needs speeding up and, to a more limited extent, I also use it to very
> conveniently generate bindings to C.
>
> The question is: would anyone see using Cython as a problem?
>
> I know that the fewer dependencies, the better. However Cython is
> almost as ubiquitous as Scipy nowadays in Python's scientific stack.
>
> The only real drawbacks I can think of (and I can read about on the
> internet) are pain points on Windows and incompatibility with different
> Python implementations (e.g. PyPy). However, with pip wheels, Windows
> is a non problem (most Python distributions on Windows now also include
> Cython by default so manual compilation is far from the pain it used to
> be) and ASE/GPAW do not support PyPy anyway because of all the C
> dependencies.
>
> Note that I am *not* proposing to convert any existing code to Cython
> nor to use Cython by default. I am talking about specific cases which
> would currently be handled by writing pure C code.
>
> Best regards,
> Gaël
>
>
> _______________________________________________
> ase-users mailing list
> ase-users at listserv.fysik.dtu.dk
> https://listserv.fysik.dtu.dk/mailman/listinfo/ase-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20171010/07563934/attachment.html>


More information about the ase-users mailing list