gbasis icon indicating copy to clipboard operation
gbasis copied to clipboard

[REQUEST] Supporting alternative orders for spherical orbitals

Open Ali-Tehrani opened this issue 4 years ago • 0 comments

Is your feature request related to a problem? Please describe.

I would like a way of specifying the spherical order when evaluating basis-functions or integrals.

For example, IOData specifies the order for D-type orbitals as : ['c0', 'c1', 's1', 'c2', 's2'], whereas PySCF would be ["s2", "s1", "c0", "c1", "c2"]. Similarly for F-type orbitals, IOData does ["s3", "s2", "s1", "c0", "c1", "c2", "c3"] and PySCF is ['c0', 'c1', 's1', 'c2', 's2', 'c3', 's3'], where "c" are cosine-type functions and "s" are sin-type functions.

It appears that all the functionality is there to begin with, the relevant functions are

  • The function generate_transform converts from one Cartesian order to a specified Spherical order.
  • The default Spherical order in gbasis is the same as PySCF and it is specified by angmom_components_sph inside the class GeneralizedContractionShell.
  • When using iodata, you'll have to use the gbasis functoion from_iodata which returns a list of IODataShell, where the function angmom_components_sph is re-written to make it have IOData order.

Is there a change to the code or algorithm you would like to see?

Would like to change the API to better specify the order. Couple of options come to mind:

  • specifying the order when evaluating anything, e.g. evaluate_basis, electron_repulsion_integral. The downside of this, you'll have to change all functions that does evaluation/integrals.
  • add an option to the constructor of the class GeneralizedContractionShell and wrappers like parse_nwchem, parse_gbs, from_iodata function that specifies common spherical order based on a string: .e.g "gbasis/PySCF", "iodata", "gaussian??", "Psi4?". The downside is that it isn't general.
  • add an option to the constructor of the class GeneralizedContractionShell and from_iodata function where the user can specify their own order by re-writting angmom_components_sph function. The downside is that it might be difficult for the user to specify their own order.

Additional context

  • One can use IOdata "convert_convention_shell" to create a standard test.

Ali-Tehrani avatar Aug 23 '21 17:08 Ali-Tehrani