Example #1
0
Omu   = sqa.term( 1.0, [''],  [pvec,  sqa.sfExOp([a, i]) , sqa.sfExOp([b, q])])
Onu   = sqa.term( 1.0, [''],  [Apvec, sqa.sfExOp([r, d]) , sqa.sfExOp([j, c])])
commutator = []
commutator +=  sqa.commutator(T_C,    Omu)
commutator +=  sqa.commutator(T_A,    Omu)
commutator +=  sqa.commutator(T_V,    Omu)
commutator +=  sqa.commutator(HD_A,   Omu)
result = []
for t in commutator:
    result += sqa.normalOrder(sqa.multiplyTerms(Onu, t))

result = simplify_all(result,[deltaC, deltaA, deltaV],cumulantE4=cumulantE4)

# Perturber-dependent stuff
Class = 'ACVV'
tensors  = mussardCode.make_tensors('eeca',pttype='NEVPT',df=True)
tensors.append(['S1','S1','AA','D'])
tensors.append(['S2','S2','aa','D'])

AllTensors,nbrTensors,nbrEqs = mussardCode.write_tensors_and_equations('NEVPT_'+Class,result,tensors,commentE3=commentE3,df=True)
nbr_bVec = mussardCode.bVec(Class,AllTensors,df=True)

# Write out GetMethodInfo
print '  static void GetMethodInfo(FMethodInfo &Out) {'
print '    Out = FMethodInfo();'
print '    Out.pName = "NEVPT_'+Class+'";'
print '    Out.perturberClass = "'+Class+'";'
print '    Out.pSpinClass = "restricted";'
print '    Out.pTensorDecls = &TensorDecls[0];'
print '    Out.nTensorDecls = %i;'%(nbrTensors)
print '    Out.pDomainDecls = &DomainDecls[0];'
Example #2
0
commutator +=  sqa.commutator(HD_V,   Omu)
commutator +=  sqa.commutator(HD_CA1, Omu)
commutator +=  sqa.commutator(HD_CA2, Omu)
commutator +=  sqa.commutator(HD_CV1, Omu)
commutator +=  sqa.commutator(HD_CV2, Omu)
commutator +=  sqa.commutator(HD_AV1, Omu)
commutator +=  sqa.commutator(HD_AV2, Omu)
result = []
for t in commutator:
    result += sqa.normalOrder(sqa.multiplyTerms(Onu, t))

result = simplify_all(result,[deltaC, deltaA, deltaV],cumulantE4=cumulantE4)

# Perturber-dependent stuff
Class = 'AAVV'
tensors  = mussardCode.make_tensors('eeaa',pttype='MRLCC',df=True)
tensors.append(['S1','S1','aaaa','D'])
tensors.append(['S2','S2','aaaa','D'])

AllTensors,nbrTensors,nbrEqs = mussardCode.write_tensors_and_equations('MRLCC_'+Class,result,tensors,commentE3=commentE3,df=True)
nbr_bVec = mussardCode.bVec(Class,AllTensors,df=True)

# Write out GetMethodInfo
print '  static void GetMethodInfo(FMethodInfo &Out) {'
print '    Out = FMethodInfo();'
print '    Out.pName = "MRLCC_'+Class+'";'
print '    Out.perturberClass = "'+Class+'";'
print '    Out.pSpinClass = "restricted";'
print '    Out.pTensorDecls = &TensorDecls[0];'
print '    Out.nTensorDecls = %i;'%(nbrTensors)
print '    Out.EqsRes = FEqSet(&EqsRes[0], %i, "MRLCC_%s/Res");'%(nbrEqs,Class)