Closed matt-chan closed 7 years ago
Looks like the overlap code will need to be cython'd after all... cp2k unit tests take 2 minutes alone.
It doesn't look too hard though. 60% of the time is spent in a few simple functions that can be replaced.
I took a quick look at the overlap code and don't see very obvious opportunities to speed things up at the Python level. add_overlap
and its internals seem to be the obvious candidates to move to Cython. The files from CP2K have somewhat weird basis sets but the files are certainly realistic.
Okay, so it's Cython'd now! Down to 7s for all the unit tests =). It's still somewhat readable I think? It's ready to review @tovrstra.
PS even if it's okay, please don't merge it back in yet!
The isolated io module in this branch is now an independent module with Python 2 & 3 compatibility. Please see: https://github.com/theochem/iodata
@tovrstra, I'm going to close the PR soon since @FarnazH moved it to a new repo. It's easier to review in this format though. Is there anything you'd like changed before I do it?
Closing since it's been moved to https://github.com/theochem/iodata. The code has diverged too much to make changes here feasible.
Just starting this PR a bit earlier so I can keep track of API changes.
This PR contains an isolated io module.
There are API changes.
Deprecations:
Parameters:
dump_poscar
routine now requiresdata
to contain an attributecell_frac
which contains the return value of the cell.to_frac function.Return values:
obasis
attribute no longer contains an instance of obasis. Rather it contains a dict of all elements necessary to instantiate GOBasis. Simply pass it via GObasis(*obasis.values())orb_alpha
attribute no longer contains an Orbital instance. It has been replaced by four attributes:orb_alpha
: a tuple of (nbasis, nfn). Sufficient to instantiate a Orbital class.orb_alpha_coeffs
: formerly Orbitals.coefficientsorb_alpha_energies
: formerly Orbitals.energiesorb_alpha_occs
: formerly Orbitals.occscell
attribute is no longer a Cell instance. Rather it contains a numpy array rvecs which is sufficient to instantiate a Cell instance.grid
attribute no longer contains an UniformGrid instance. It now contains a dict sufficient to instantiate a UniformGrid instance. It can be used via UniformGrid(*grid.values())gvecs
attribute to write the coordinates.Non-API breaking changes: