Skip to content

Commit 343576f

Browse files
jarrodmccbabbush
authored andcommitted
Update cc amplitude loading (#10)
* Added data generation and plotting scripts. Updated imports * Allow specified data directory * Change ordering of ccsd amplitudes to make more sense with regards to rest of code * Change data saving to pack everything into HDF5. * Add example to generate diatomic curves. * Adds LiH to diatomic data generation * Allow specification of custom psi4 template * Modify storage of ccsd amplitudes * Modify template * Fix template file
1 parent 01b5cd9 commit 343576f

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

fermilibpluginpsi4/_psi4_conversion_functions.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,4 @@ def beta_unoccupied(i):
253253
alpha_unoccupied(b),
254254
alpha_occupied(j)] = value / 2.
255255

256-
# Package into InteractionOperator.
257-
molecule = InteractionOperator(0.0,
258-
single_amplitudes,
259-
double_amplitudes)
260-
return molecule
256+
return single_amplitudes, double_amplitudes

fermilibpluginpsi4/_psi4_template

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -225,10 +225,13 @@ if &run_ccsd:
225225

226226
# Merge CC amplitudes into molecule by parsing
227227
psi_filename = outfile_name()
228-
ccsd_amplitudes = parse_psi4_ccsd_amplitudes(
229-
2 * molecule.n_orbitals,
230-
molecule.get_n_alpha_electrons(),
231-
molecule.get_n_beta_electrons(),
232-
psi_filename)
233-
molecule.ccsd_amplitudes = ccsd_amplitudes
228+
single_cc_amplitudes, double_cc_amplitudes = (
229+
parse_psi4_ccsd_amplitudes(
230+
2 * molecule.n_orbitals,
231+
molecule.get_n_alpha_electrons(),
232+
molecule.get_n_beta_electrons(),
233+
psi_filename))
234+
235+
molecule.ccsd_single_amps = single_cc_amplitudes
236+
molecule.ccsd_double_amps = double_cc_amplitudes
234237
molecule.save()

0 commit comments

Comments
 (0)