********>Bugfix 26 Author: Ross Walker Date: 12/13/2006 Programs: Sander Description: When running QMMM calculations with an incorrect spin state sander can quit with a cryptic error message instead of the intended error message. Fix: apply the following patch to src/sander/qm2_load_params.f ------------------------------------------------------------------------------ *** qm2_load_params_and_allocate.f 2006-12-13 15:35:31.000000000 -0800 --- qm2_load_params_and_allocate.f 2006-12-13 16:56:58.000000000 -0800 *************** *** 138,145 **** !Protect DUMB users from STUPID errors if (nelectrons > 2*qm2_struct%norbs) then if (qmmm_mpi%master.and.qmmm_struct%qm_mm_first_call) then ! write(6,'(''QMMM: ERROR-number of electrons: ,i5, is more'')') nelectrons ! write(6,'(''QMMM: than 2xnorbs of: ,i5'')') qm2_struct%norbs write(6,'(''QMMM: Check qmcharge in qmmm namelist and rerun'')') write(6,'(''QMMM: the calculation.'')') end if --- 138,145 ---- !Protect DUMB users from STUPID errors if (nelectrons > 2*qm2_struct%norbs) then if (qmmm_mpi%master.and.qmmm_struct%qm_mm_first_call) then ! write(6,'(''QMMM: ERROR-number of electrons: '',i5,'' is more'')') nelectrons ! write(6,'(''QMMM: than 2xnorbs of: '',i5)') qm2_struct%norbs write(6,'(''QMMM: Check qmcharge in qmmm namelist and rerun'')') write(6,'(''QMMM: the calculation.'')') end if *************** *** 150,156 **** ! Make sure we have an even number of electrons if((nelectrons/2)*2 /= nelectrons) THEN if (qmmm_mpi%master.and.qmmm_struct%qm_mm_first_call) then ! write(6,'(''QMMM: System specified with odd number of electrons ''('',i5,''))') nelectrons write(6,'(''QMMM: but odd spin ('',i3,''). Correct error and re-run calculation.'')') qmmm_nml%spin end if stop --- 150,156 ---- ! Make sure we have an even number of electrons if((nelectrons/2)*2 /= nelectrons) THEN if (qmmm_mpi%master.and.qmmm_struct%qm_mm_first_call) then ! write(6,'(''QMMM: System specified with odd number of electrons ('',i5,'')'')') nelectrons write(6,'(''QMMM: but odd spin ('',i3,''). Correct error and re-run calculation.'')') qmmm_nml%spin end if stop *************** *** 159,166 **** ! Make sure we have an odd number of electrons.` if((nelectrons/2)*2 == nelectrons) then if (qmmm_mpi%master.and.qmmm_struct%qm_mm_first_call) then ! write(6,'(''QMMM: System specified with odd number of electrons ('',i5,'')'')') nelectrons ! write(6,'(''QMMM: but odd spin ('',i3,''). Correct error and re-run calculation.'')') qmmm_nml%spin end if stop end if --- 159,166 ---- ! Make sure we have an odd number of electrons.` if((nelectrons/2)*2 == nelectrons) then if (qmmm_mpi%master.and.qmmm_struct%qm_mm_first_call) then ! write(6,'(''QMMM: System specified with an even number of electrons ('',i5,'')'')') nelectrons ! write(6,'(''QMMM: but even spin ('',i3,''). Correct error and re-run calculation.'')') qmmm_nml%spin end if stop end if ------------------------------------------------------------------------------ Temporary workarounds: None