In the last commit before this issue, there is a stub for a public class (also commutable to structure) initializer.
The idea behind this is to get an intuitive and versatile initialisation of basis states.
It is related to problems throughout the last instance of the code #33 #30 #22 #8
Problem
The problem is that the state can be initialized in several different ways, and operator overload is boring, complicated and sometimes not straightforward to implement. E.g. we want to implement as continuous basis as int unsigned nbox; double mesh, or double start, end; int nbox and also double start, end, mesh;.
A way to solve this is to overload operators.
But, when we want to initialise a spherical basis, other than one continuous r coordinate we need also quantized angular momentum quantum numbers. Therefore we can implement a spherical basis (l coupling) providing only maximum l either with 1 double and 2 int, or 2 double and 2 int, or 3 double and 1 int. But what if we want to provide min and max l? how could you overload? there are several possible overload combinations, and
Solutions:
A possible solution is considering specific factory methods
buildSpherical3D(...)buildCartesian1D(...)
pro - easy and straightforward to implement.
cons - tedious implementation; many methods that can confuse user.
pro - versatile, agile, amazing, computersciency... etc...
cons- as it is doesn't really fit the story
A final try is with this last commit. and the public class instance initializer
pro - easy
cons- ?
Stories
Ideally we want the user (and us) to build factorized basis with ease. In pseudocode we could think to build a 3D spherical, j-coupled or ls-coupled basis, just like this in pseudocode:
State
In the last commit before this issue, there is a stub for a public class (also commutable to structure) initializer.
The idea behind this is to get an intuitive and versatile initialisation of basis states.
It is related to problems throughout the last instance of the code #33 #30 #22 #8
Problem
The problem is that the state can be initialized in several different ways, and operator overload is boring, complicated and sometimes not straightforward to implement. E.g. we want to implement as continuous basis as
int unsigned nbox; double mesh
, ordouble start, end; int nbox
and alsodouble start, end, mesh;
. A way to solve this is to overload operators.But, when we want to initialise a spherical basis, other than one continuous r coordinate we need also quantized angular momentum quantum numbers. Therefore we can implement a spherical basis (l coupling) providing only maximum l either with 1 double and 2 int, or 2 double and 2 int, or 3 double and 1 int. But what if we want to provide min and max l? how could you overload? there are several possible overload combinations, and
Solutions:
buildSpherical3D(...)
buildCartesian1D(...)
pro - easy and straightforward to implement. cons - tedious implementation; many methods that can confuse user.
Implement in [this commit] (https://github.com/Scienza/Schroedinger/commit/230a020a2fb798579ff4d701aacf4cb2553ac7e3)
Base
class andDiscreteBase
Implemented in [this commit(?)](https://github.com/Scienza/Schroedinger/commit/3a04d6ba1310b501473016e5854e34372fd9b57 2) by Gabriele.pro - versatile, agile, amazing, computersciency... etc... cons- as it is doesn't really fit the story
initializer
pro - easy cons- ?
Stories
Ideally we want the user (and us) to build factorized basis with ease. In pseudocode we could think to build a 3D spherical, j-coupled or ls-coupled basis, just like this in pseudocode:
Or a 3D Cartesian
Or directly providing the vector for cartesian
or otherwise basis