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.
We have a natural hierarchy of dependencies within
PyCC, e.g.:hamiltonian<--ccwfn<--cclambda<--ccdensity<--rtccHowever, the
__init__functions for objects higher in the dependency structure still require explicit passing of lower-level objects, e.g., in thertccobject:pycc/pycc/rt/rtcc.py
Line 60 in 34f928d
This API implies some flexibility as to which
ccwfnorcclambdaobjects the user might pass into the constructor, as though it could actually be different from that used to build thertccpropagator, 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.