Skip to content

Commit

Permalink
Fix FCF printing
Browse files Browse the repository at this point in the history
  • Loading branch information
b3m2a1 committed Sep 6, 2024
1 parent 280b811 commit c8cc8b2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions Psience/Vibronic/FCFs.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,7 @@ def get_overlap_gaussian_data(self,

return (alphas_c, modes_c, center, prefactor), (L_g, dx_g), (L_e, dx_e)

integral_block_size = 1000
@classmethod
def eval_fcf_overlaps(self,
excitations_gs, freqs_gs, modes_gs, inv_gs, center_gs,
Expand Down Expand Up @@ -515,13 +516,14 @@ def eval_fcf_overlaps(self,
overlaps = []
n = 0
block_counter = 1
block_size = 1000
block_size = self.integral_block_size
full_blocks = len(excitations_gs) * len(excitations_es)
num_blocks = int(np.ceil(full_blocks / block_size))
block_start = None
logger.log_print("num integrals: {n}", n=full_blocks)
for eg,spoly_gs in zip(excitations_gs,polys1):
subovs = []
subcounter = 0
with logger.block(
tag="Overlaps from: {gs}",
gs=eg,
Expand All @@ -534,7 +536,7 @@ def eval_fcf_overlaps(self,
logger.log_print(
"{fmt_table}",
es=excitations_es,
ov=subovs[block_counter*block_size:(block_counter+1)*block_size],
ov=subovs[(subcounter - 1)*block_size:(subcounter)*block_size],
preformatter=lambda **kw: dict(kw,
fmt_table=self.format_overlap_tables(
kw['es'],
Expand All @@ -549,6 +551,7 @@ def eval_fcf_overlaps(self,
block_counter, num_blocks
))
block_counter += 1
subcounter += 1
n += 1
poly = spoly_gs.concat(spoly_es)
ov = self.evaluate_shifted_poly_overlap(
Expand Down
2 changes: 1 addition & 1 deletion ci/tests/VibronicTests.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def test_FCFsNH3(self):
fc_model = FranckCondonModel.from_files(
TestManager.test_data('nh3_s0.fchk'),
TestManager.test_data('nh3_s1.fchk'),
logger=False
logger=True
)

# od = fc_model.get_overlap_data()
Expand Down

0 comments on commit c8cc8b2

Please sign in to comment.