Comments (12)
Can you add the output of this script? It could be related to ordering conventions (px, py, pz) versus (py, pz, px).
from horton.
The problem is the ordering of the (pure) d functions and up. (I'm not sure if there is a problem with Cartesian functions because we didn't test that yet.) The ordering in HORTON is documented here:
http://theochem.github.io/horton/tech_ref_gaussian_basis.html#pure-or-harmonic-basis-functions
The order is shown there up to G functions but the pattern is trivial to generalize toward higher moments.
There is a similar reordering going on when loading things from Gaussian. See the following code:
https://github.com/theochem/horton/blob/master/horton/io/gaussian.py#L373
from horton.
P.S. The ordering within Cartesian shells in HORTON is documented here:
http://theochem.github.io/horton/tech_ref_gaussian_basis.html#cartesian-basis-functions
(This is basically just alphabetical.)
from horton.
It does not look like a bug in HORTON anymore, so I'll move this to another milestone and make it a feature (for the pyscf wrapper.)
from horton.
Yep, sounds good. I'll hold off from releasing the wrapper at the moment.
I guess at some point we should have a discussion about whether we should be adopting the standards used by Psi4 and libcint/pyscf?
from horton.
I actually like the "alphabetical order" choice. It is so simple to explain and generalize, so even if others aren't using it, perhaps we should, and then write wrappers that let us output integrals in "other" orderings if so desired.
from horton.
Yes, given our intent to play well with other codes, we should be able to handle different ordering styles nicely. We currently do that already in hortion.io
when reading/writing files.
One difficulty is that other codes don't document their ordering. I usually had to figure it out by reverse engineering and running several test cases. E.g., in the case of Gaussian, the ordering inside Cartesian and inside pure shells is weird and follows no real pattern that is consistent between different angular momenta. I guess similar annoyances exist in other programs. For that reason, HORTON follows (and documents) an ordering that is trivial for both Cartesian and pure functions of any angular momentum:
- Cartesian: alphabetical (same as in libint)
- Pure: first ordered by the absolute value of the azimuthal quantum number, then cosine before sine. (The reason is that a negative azimuthal quantum number does not make sense for real spherical harmonics. This choice also facilitates recursive algorithms to compute spherical harmonics.)
It makes little sense to switch to the order of some other code X because it is arbitrary and poorly defined. (E.g. where does PySCF document its ordering?). It is also a painful change because it is backward incompatible and it requires reprogramming all the conversion routines for interfacing with other codes.
It is more appealing (but not urgent) to make HORTON ordering agnostic, such that intergrals/densities/... can be computed with different ordering conventions. Something like that goes beyond the scope of the 2.x branch.
from horton.
I sent an email to Qiming Sun to ask why he ordered them that way. PySCF doesn't document their ordering as far as I can see, but I might have missed something.
The only thing I would wonder about is whether the numerical conditioning of the integrals change if we order our shells differently. I didn't know that it was possible to have different values of integrals (or different permutations of the matrix elements at least) and still come up with the same energy at the end?
from horton.
It should not affect the numerical conditioning or any observable property. E.g. the eigenvalues of a matrix do not depend on the order of the indices. Also, a wavefunction does not change when the orbital basis functions are permuted, as long as the expansion coefficient are permuted consistently.
To make things work, all parts of the code should follow the same conventions, e.g. integrals for other operators, the computation of densities on grid points and IO. (This can be hardwired, like we do now, or the ordering must be defined by some variable that gets passed to all relevant functions.) Such conventions are in principle arbitrary but consistency does matter. Most QC codes follow different orderings, so I guess there is no big advantage for using one over the other.
Some recursion relations are easier to write out with some ordering, which could explain some differences. (That is how I fixed the HORTON conventions.)
from horton.
I'll fix issue #123 first, which will make it easier to implement the reordering in the wrapper. Long-term solution (HORTON 3) is to change the ordering in HORTON.
from horton.
@matt-chan I think the ordering of PySCF follows the convention of NWChem.
from horton.
Yup. We figured that out from talking to Qiming. Thanks for letting me know!
This will definitely be fixed in the next major release of HORTON.
On Mon, 3 Oct 2016 at 10:11 Kuang-Yu Samuel Chang [email protected]
wrote:
@matt-chan https://github.com/matt-chan I think the ordering of PySCF
follows the convention of NWChem.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#87 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AA_-NVuiNgcPgGLmuHqbX22qGrP38BhOks5qwQ0GgaJpZM4Ixrva
.
from horton.
Related Issues (20)
- Failed release image download is too easy to miss
- Macports Libxc release too aggresive HOT 1
- Rapid deployment to Github, PyPI and anaconda.org HOT 4
- Decide on final docstring format HOT 2
- Move coverage to codecov HOT 1
- Cannot install horton HOT 6
- Feature request: localization module HOT 5
- horton-2.1.0 does not install on latest fedora 26 & 27 HOT 27
- Conda install on Travis HOT 2
- cython error when building horton-2.1.0 on Mac OS High Sierra HOT 5
- Issues with Ubuntu 18.04 HOT 6
- GCC error when trying to install horton HOT 4
- Which new module for Atoms-in-Molecules analysis HOT 7
- Compilation error in cext.cpp HOT 1
- No module named cext HOT 1
- URL in 'About' section does not resolve HOT 2
- Computing atom-in-molecule electron densities
- Point-charge-interaction integrals for each point
- tar.gz is a tar
- The ordering of P orbitals for pure Gaussian functions HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from horton.