Skip to content

We should handle chained dependencies more carefully #35

Description

@lothian

We have a natural hierarchy of dependencies within PyCC, e.g.:

hamiltonian <-- ccwfn <-- cclambda <-- ccdensity <-- rtcc

However, the __init__ functions for objects higher in the dependency structure still require explicit passing of lower-level objects, e.g., in the rtcc object:

def __init__(self, ccwfn, cclambda, ccdensity, V, magnetic = False, kick = None):

This API implies some flexibility as to which ccwfn or cclambda objects the user might pass into the constructor, as though it could actually be different from that used to build the rtcc propagator, but this is clearly not the case.

I think we should change the higher-level interfaces to be more careful about exposing fragile dependencies to user whims/errors. This would also simplify the interfaces, which is always nice, but, of course, would require changing all our test cases.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions