diff --git a/helpers/TBME_Runner.py b/helpers/TBME_Runner.py index 96b23d4..3c2f929 100644 --- a/helpers/TBME_Runner.py +++ b/helpers/TBME_Runner.py @@ -378,6 +378,15 @@ def _sortQQNNFromTheValenceSpace(self): q_numbs = list(combinations_with_replacement(q_numbs, 2)) self._twoBodyQuantumNumbersSorted = q_numbs + + all_permut_ = [] + for a,b in self._twoBodyQuantumNumbersSorted: + all_permut_.append((a,b)) + if a != b: + all_permut_.append((b,a)) + all_permut_.sort() + self._allPermutations_twoBodyQuantumNumbers = all_permut_ + self._allPermutations_twoBodyQuantumNumbers = self._twoBodyQuantumNumbersSorted def _compute1BodyMatrixElements(self, kin=False, force=None): """ @@ -415,7 +424,7 @@ def _compute1BodyMatrixElements(self, kin=False, force=None): else: return - for q_numb in self._twoBodyQuantumNumbersSorted: + for q_numb in self._allPermutations_twoBodyQuantumNumbers: bra = QN_1body_jj(*readAntoine(q_numb[0], l_ge_10=True)) ket = QN_1body_jj(*readAntoine(q_numb[1], l_ge_10=True)) @@ -1009,7 +1018,7 @@ def _print_10b_file(self, title=''): core_energy = getattr(core, CoreParameters.energy, '0.0') strings_ = [title, core_energy,] # title - for a, b in self._twoBodyQuantumNumbersSorted: + for a, b in self._allPermutations_twoBodyQuantumNumbers: a = castAntoineFormat2Str(a, l_ge_10=True) b = castAntoineFormat2Str(b, l_ge_10=True) val_ab_p, val_ab_n = 0.0, 0.0 diff --git a/main.py b/main.py index 6b58073..e9aac55 100644 --- a/main.py +++ b/main.py @@ -37,14 +37,14 @@ pass # TODO: Run the program from a file 'input.xml' next to the main - #_runner = TBME_SpeedRunner(filename='input_B1.xml') + # _runner = TBME_SpeedRunner(filename='input_B1.xml') # _runner = TBME_Runner(filename='input.xml') # _runner = TBME_SpeedRunner(filename='input.xml') # _ = 0 # _runner = TBME_Runner(filename='input_D1S.xml') # _runner.run() - _runner = TBME_SpeedRunner(filename='input.xml', verbose=True) + _runner = TBME_SpeedRunner(filename='input.xml', verbose=False) # _runner = TBME_SpeedRunner(filename='input_D1S.xml', verbose=False) _runner.run() @@ -238,4 +238,4 @@ # BrinkBoeker.turnDebugMode(False) # _runner = TBME_Runner(filename='input.xml') # _runner.run() - \ No newline at end of file + diff --git a/matrix_elements/CentralForces.py b/matrix_elements/CentralForces.py index e1db091..fcef77b 100644 --- a/matrix_elements/CentralForces.py +++ b/matrix_elements/CentralForces.py @@ -1038,7 +1038,7 @@ def setInteractionParameters(cls, *args, **kwargs): b_len = float(kwargs.get(_b)) cls.PARAMS_SHO[_b] = b_len cls.PARAMS_SHO[_A] = int(kwargs.get(_A)) - hbaromega = (Constants.HBAR_C**2) / (Constants.M_NUCLEON * (b_len**2)) + hbaromega = (Constants.HBAR_C**2) / (Constants.M_MEAN * (b_len**2)) cls.PARAMS_SHO[_ho] = hbaromega def _run(self): @@ -1061,7 +1061,7 @@ def _run(self): elif (n_a == n_b - 1): val = (n_b * (2*n_b + l_b + 0.5))**.5 elif (n_a == n_b + 1): - val = ((n_b + 1) * (2*n_b + l_b + 1.5))**.5 + val = (n_a * (2*n_a + l_a + 0.5))**.5 self._value = 0.5 * val * self.PARAMS_SHO[SHO_Parameters.hbar_omega] diff --git a/matrix_elements/MultipoleForces.py b/matrix_elements/MultipoleForces.py index f064e56..66b7560 100644 --- a/matrix_elements/MultipoleForces.py +++ b/matrix_elements/MultipoleForces.py @@ -268,6 +268,7 @@ def _run(self): XLog.write('nas_me', ket=self.ket.shellStatesNotation) self._value = 0.0 + if ((self.bra.j + self.ket.j) // 2) % 2 == 1: return L = self.PARAMS_FORCE[CentralMEParameters.n_power] C = self.PARAMS_FORCE[CentralMEParameters.constant]