Skip to content

Conversion to Cartesian basis sets #259

Open

Description

@tovrstra

(This was mentioned in #146.)

The conversion to Cartesian basis sets is needed for the WFN and WFX formats because these formats to not support pure functions. Just as in #258, this does not only require a change in the basis set definition, but also a transformation of all data expressed in the basis. At the lowest level, this can be implemented as function returning a transformed MolecularBasis instance and a transformation matrix. Also a utility function to transform everything in an IOData object (e.g. as a prepare function #191) would be useful. The transformation matrix is relatively easy to construct and is very sparse: block diagonal with blocks defined in iodata.overlap_cartpure.

Activity

  1. ARYAMANN7279 commented on Oct 23, 2026

    @ARYAMANN7279

    Hi, I'd like to work on this, as a follow up to #409. Here is the plan, tell me if you want it different.

    1. convert_to_cartesian(obasis) in convert.py, next to convert_to_segmented. It returns the new MolecularBasis (same shells, all kinds 'c') and the transformation matrix, so that coeffs_new = T @ coeffs_old. It builds T from tfs and takes the conventions of the old and new basis into account (ordering and signs), so sign flipped pure functions like the ORCA f ones work too.
    2. In a second PR, a prepare_cartesian in prepare.py that applies T to the orbital coefficients and density matrices, for the WFN and WFX dumpers.
    3. The main test: the overlap of the old basis must equal T.T @ S_cart @ T, with S_cart from compute_overlap on the new basis.

    One question: should T be a dense array or a scipy.sparse matrix? Dense is simpler, sparse scales better for big basis sets. Unless you prefer dense, I would return a sparse matrix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions