********>Bugfix 10: Author: David S. Cerutti Date: August 5, 2017 Programs: pmemd, pmemd.cuda Description: fixes a vulnerability that would have allowed LJ 12-6-4 to be applied with incompatible options. ------------------------------------------------------------------------------- src/pmemd/src/mdin_ctrl_dat.F90 | 17 ++++++++++------- src/pmemd/src/prmtop_dat.F90 | 3 +++ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git src/pmemd/src/mdin_ctrl_dat.F90 src/pmemd/src/mdin_ctrl_dat.F90 index aceefab..da73216 100644 --- src/pmemd/src/mdin_ctrl_dat.F90 +++ src/pmemd/src/mdin_ctrl_dat.F90 @@ -2226,12 +2226,6 @@ subroutine validate_mdin_ctrl_dat(remd_method) inerr = 1 end if - if (lj1264 .gt. 0) then - write(mdout, '(a)') 'CUDA (GPU): Implementation does not support 12-6-4 LJ potential.' - write(mdout, '(a)') ' Require lj1264 == 0.' - inerr = 1 - end if - !Check the size of the cutoff with respect to the system size. if (ntb == 0) then !Check not fully implemented. Ideally this check should loop over the current @@ -2349,26 +2343,35 @@ subroutine post_prm_validate_mdin_ctrl_dat if (lj1264 .eq. 1) then #ifdef CUDA write(mdout, '(a)') 'CUDA (GPU): Implementation does not support 12-6-4 LJ potential.' - write(mdout, '(a)') ' Require lj1264 == 0.' + write(mdout, '(a)') ' The topology contains 12-6-4 coefficients and must be & + &changed.' inerr = 1 #endif if (fswitch .gt. 0) then write(mdout, '(2a)') error_hdr, 'fswitch and lj1264 are incompatible!' + write(mdout, '(a)') ' The topology contains 12-6-4 coefficients and must be & + &changed.' inerr = 1 end if if (using_gb_potential) then write(mdout, '(2a)') error_hdr, 'Generalized born is incompatible with & &the 12-6-4 potential' + write(mdout, '(a)') ' The topology contains 12-6-4 coefficients and must be & + &changed.' inerr = 1 end if if (ips .ne. 0) then write(mdout, '(2a)') error_hdr, 'IPS and the 12-6-4 LJ potential & &are incompatible' + write(mdout, '(a)') ' The topology contains 12-6-4 coefficients and must be & + &changed.' inerr = 1 end if if (icfe .ne. 0) then write(mdout, '(2a)') error_hdr, 'The 12-6-4 potential is incompatible & &with TI in pmemd' + write(mdout, '(a)') ' The topology contains 12-6-4 coefficients and must be & + &changed.' inerr = 1 end if end if diff --git src/pmemd/src/prmtop_dat.F90 src/pmemd/src/prmtop_dat.F90 index 7c9a47a..629a262 100644 --- src/pmemd/src/prmtop_dat.F90 +++ src/pmemd/src/prmtop_dat.F90 @@ -493,6 +493,9 @@ subroutine init_prmtop_dat(num_ints, num_reals, inpcrd_natom) end if + ! Check Lennard-Jones 12-6-4 functionality + call post_prm_validate_mdin_ctrl_dat + !BEGIN DBG ! nxt_atm = 1 ! do i = 1, nspm