theochem / fanpy

Projectively-optimized geminal and "fancyCI" wavefunctions
Other
17 stars 2 forks source link

Shorten `_integrate_sd_sd_deriv` #80

Open kimt33 opened 5 years ago

kimt33 commented 5 years ago

The methods _integrate_sd_sd_deriv in UnrestrictedChemicalHamiltonian and RestrictedChemicalHamiltonian have lots of repetitions.

They can be shortened with impure functions that add appropriate values to the variables outside its scope as a side effect. However, this may cause the code to be a little less readable as it deviates from source material (notes on orbital optimization).