Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
RagnarB83 committed Aug 9, 2024
1 parent c72522b commit fe75d9b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions ash/interfaces/interface_ccpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,18 @@ def run_CRCC(self,driver):

def run_density(self, state_index=0):
print("Now running rdm1 calc for state:", state_index)

# Check if hbar has been run
if self.driver.flag_hbar is False:
print("Error: Hbar calculation has not been run")
print("Call theory.driver.run_hbar(method=\"ccsd\")")
ashexit()
# Check if L-list is only None
if all(x is None for x in self.driver.L):
print("Error: No L-vector found in driver. Cannot run RDM1 calculation")
print("Call theory.driver.run_leftcc(method=\"left_ccsd\", state_index=[0])")
ashexit()

# Run RDM1 calc
self.driver.run_rdm1(state_index=[state_index])

Expand Down

0 comments on commit fe75d9b

Please sign in to comment.