********> bugfix 1 Author: Dave Case Date: 7 January 2010 Programs: sqm Severity: medium Description: The sqm program may fail on scf convergence for some molecules; this patch makes this a fatal error for the stand-alone version of the code Fix: Apply the following fix to amber11/src/sqm/qm2_scf.f: --------------------------------------------------------------------------- --- qm2_scf.f 2 Sep 2009 14:48:07 -0000 10.8 +++ qm2_scf.f 7 Jan 2010 14:34:54 -0000 @@ -388,14 +388,23 @@ !the current unconverged density. This will mean the forces !are not accurate but in an MD simulation they may be good !enough to allow the user to get out of a potentially bad geometry. +#ifdef SQM + write(6,'(/,''QMMM: ERROR!'')') +#else write(6,'(/,''QMMM: WARNING!'')') +#endif write(6,'(''QMMM: Unable to achieve self consistency to the tolerances specified'')') write(6,'(''QMMM: No convergence in SCF after '',i6,'' steps.'')') qmmm_nml%itrmax +#ifndef SQM write(6,'(''QMMM: Job will continue with unconverged SCF. Warning energies'')') write(6,'(''QMMM: and forces for this step will not be accurate.'')') +#endif write(6,'(''QMMM: E = '',E12.4,'' DeltaE = '',E12.4,'' DeltaP = '',E12.4)') escf, energy_diff, density_diff write(6,'(''QMMM: Smallest DeltaE = '',E12.4,'' DeltaP = '',E12.4,'' Step = '',i6,/)') & smallest_energy_diff(1), smallest_energy_diff(2), sm_energy_diff_step_number +#ifdef SQM + call mexit(6,1) +#endif end if if (qmmm_nml%verbosity > 0 .and. converged .and. qmmm_mpi%commqmmm_master) then --------------------------------------------------------------------------- Workarounds: wait (much) longer for a failed job to quit