[AMBER] Adding an extra non-bonded pair list

From: <jfloresc.andrew.cmu.edu>
Date: Fri, 20 Sep 2013 14:40:11 -0400

Hello All,

I am implementing an extra non-bonded list of only solute-solute atom
interactions. My purpose is to scale down solute-solute direct
electrostatic interactions in PMEMD MPI (Amber 12). My first attempt has
been to add a new non-bonded list called gbl_ipairs_solute in the module
nb_pairlist. Then I modified the subroutine get_nb_list in the same module
by adding if-else sentences when the indexes of a pair of atoms are below
or equal to the number of solute atoms.

However, I have some problems with illegal access to memory. Below is a
small part of the code (extra variables are initialized:
ee_solute_eval_cnt = 0, full_solute_eval_cnt = 0. nsolute is the number of
solute atoms). I hope you could provide me some tips of how to correct
this or a better implementation.

Thank you,


      if (cutoffs_equal) then

        if (common_tran) then
               do img_j = flat_cit(cur_bkt)%img_lo, flat_cit(cur_bkt)%img_hi
                  dx = img_crd(1, img_j) - x_i
                  dy = img_crd(2, img_j) - y_i
                  dz = img_crd(3, img_j) - z_i
                  if (dx * dx + dy * dy + dz * dz .lt. cutlist_sq) then
                    if (excl_img_flags(img_j) .eq. 0) then
                      if (ico(iaci + img_iac(img_j)) .eq. 0) then
                        if ((atm_i .le. nsolute) .and. (img_atm_map(img_j)
.le. nsolute)) then !modified
                          ee_solute_eval_cnt = ee_solute_eval_cnt + 1
                          img_j_ee_solute_eval(ee_solute_eval_cnt) = img_j
                          ee_eval_cnt = ee_eval_cnt + 1
                          img_j_ee_eval(ee_eval_cnt) = img_j
                        end if ! end of modified
                        if ((atm_i .le. nsolute) .and. (img_atm_map(img_j)
.le. nsolute)) then !modified
                          full_solute_eval_cnt = full_solute_eval_cnt + 1
                          img_j_full_solute_eval(full_solute_eval_cnt) =
                          full_eval_cnt = full_eval_cnt + 1
                          img_j_full_eval(full_eval_cnt) = img_j
                        end if ! end of modified
                      end if

      ! Clear excluded j images flags:

      do i = atm_mask_idx + 1, atm_mask_idx + atm_maskdata(atm_i)%cnt
        excl_img_flags(atm_img_map(atm_mask(i))) = 0
      end do

      if (dont_skip_belly_pairs) then
        call pack_nb_list(ee_eval_cnt, img_j_ee_eval, &
                          full_eval_cnt, img_j_full_eval, &
                          gbl_ipairs, num_packed)
        if (ifail .eq. 1) then
          flat_cit(i_bkt)%img_hi = saved_i_bkt_img_hi
        end if
        call pack_nb_list(ee_solute_eval_cnt, img_j_ee_solute_eval, & !
                          full_solute_eval_cnt, img_j_full_solute_eval, &
                          gbl_ipairs_solute, num_packed_solute)
        if (ifail .eq. 1) then
          flat_cit(i_bkt)%img_hi = saved_i_bkt_img_hi
        end if

AMBER mailing list
Received on Fri Sep 20 2013 - 12:00:03 PDT
Custom Search