Open fevangelista opened 7 years ago
I have a few thoughts on how to decouple the integrals from the determinant class. It would require every CI code to commit to the WFNOperator class, but I think it makes sense. It could look something like:
// Build a determinant in the active space and compute its energy
WFNOperator active_op( ints_, active_symmetry_ );
STLBitsetDeterminant a_det1( occupation );
active_op.energy( a_det1 );
// Slater Rules would look like this
double sign = active_op.slater_rules_single_alpha( a_det1, i, a );
STLBitsetDeterminant a_det2( occupation2 );
double en = active_op.slater_rules( a_det1, a_det2 );
// Now we can easily make detereminants with different dimensions
WFNOperator corr_op( ints_, correlated_sym );
STLBitsetDeterminant c_det( occ );
corr_op.energy( c_det );
It would be up to us to avoid things like:
corr_op.energy( a_det );
Solution with multiple FCIIntegral objects
// Build a determinant in the active space and compute its energy
FCIIntegrals fciints(ints_,active_mo,rdocc_mo); // only active
FCIIntegrals fciints2(ints_,active_mo2,rdocc_mo2); // docc + active + virt
STLBitsetDeterminant det = fciints->determinant();
STLBitsetDeterminant det2 = fciints2->determinant();
STLBitsetDeterminant det3;
// map det -> det2. 20++0 -> 2222 20++0 00000
fciints->energy(det2);
Here are the workflows of SS- and SA-DSRG. I will start implementing those TODOs in semicanonicalize class and integrating the DSRG codes with a SuperDSRG class.
Use polymorphism to encode different combinations of theories.