diff --git a/src/symba/symba_frag_pos.f90 b/src/symba/symba_frag_pos.f90 index 5681cb400..9fb00c0cf 100644 --- a/src/symba/symba_frag_pos.f90 +++ b/src/symba/symba_frag_pos.f90 @@ -99,8 +99,8 @@ subroutine symba_frag_pos(param, symba_plA, family, x, v, L_spin, Ip, mass, radi if (lmerge) write(*,*) 'Failed to find radial velocities' if (.not.lmerge) then call calculate_system_energy(linclude_fragments=.true.) - if ((abs(dEtot) - Qloss) / Qloss > Etol) then - write(*,*) 'Failed due to high energy error: ',(abs(dEtot) - Qloss) / Qloss + if ((abs(dEtot / Etot_before) < Qloss) .or. (dEtot > 0.0_DP)) then + write(*,*) 'Failed due to high energy error: ', abs(dEtot / Etot_before) lmerge = .true. else if (abs(dLmag) > Ltol) then write(*,*) 'Failed due to high angular momentum error: ', dLmag