Unverified Commit fe14bfd1 authored by Steve Plimpton's avatar Steve Plimpton Committed by GitHub
Browse files

Merge pull request #951 from martok/meam-diaref-fix

Apply modifications to MEAM & MEAM/C as found by Kyung-Han Kang
parents d55c7039 f68c6ddd
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -232,7 +232,8 @@ c pairs, but need to include NN2 contributions to those pairs as
c     well.
              if (lattce_meam(a,b).eq.'b1'.or.
     $             lattce_meam(a,b).eq.'b2'.or.
     $             lattce_meam(a,b).eq.'l12') then
     $             lattce_meam(a,b).eq.'l12'.or.
     $             lattce_meam(a,b).eq.'dia') then
                rarat = r*arat

c               phi_aa
@@ -262,7 +263,8 @@ c phi_bb
                endif

                if (lattce_meam(a,b).eq.'b1'.
     $               or.lattce_meam(a,b).eq.'b2') then
     $               or.lattce_meam(a,b).eq.'b2'.
     $               or.lattce_meam(a,b).eq.'dia') then
c     Add contributions to the B1 or B2 potential
                  call get_Zij(Z1,lattce_meam(a,b))
                  call get_Zij2(Z2,arat,scrn,lattce_meam(a,b),
@@ -720,9 +722,9 @@ c neighbor screening function for lattice type "latt"
        a = sqrt(2.d0)
        numscr = 4
      else if (latt.eq.'dia') then
        Zij2 = 0
        Zij2 = 12
        a = sqrt(8.d0/3.d0)
        numscr = 4
        numscr = 1
        if (cmin.lt.0.500001) then
c          call error('can not do 2NN MEAM for dia')
        endif
+2 −2
Original line number Diff line number Diff line
@@ -277,9 +277,9 @@ MEAM::get_Zij2(const lattice_t latt, const double cmin, const double cmax, doubl
    break;

  case DIA:
    Zij2 = 0;
    Zij2 = 12;
    a = sqrt(8.0 / 3.0);
    numscr = 4;
    numscr = 1;
    if (cmin < 0.500001) {
        //          call error('can not do 2NN MEAM for dia')
    }
+5 −6
Original line number Diff line number Diff line
@@ -213,14 +213,12 @@ MEAM::compute_pair_meam(void)
          Z2 = get_Zij2(this->lattce_meam[a][b], this->Cmin_meam[a][a][b],
                   this->Cmax_meam[a][a][b], arat, scrn);

          //     The B1, B2,  and L12 cases with NN2 have a trick to them; we
          //     need to
          //     compute the contributions from second nearest neighbors, like
          //     a-a
          //     The B1, B2,  and L12 cases with NN2 have a trick to them; we need to
          //     compute the contributions from second nearest neighbors, like a-a
          //     pairs, but need to include NN2 contributions to those pairs as
          //     well.
          if (this->lattce_meam[a][b] == B1 || this->lattce_meam[a][b] == B2 ||
              this->lattce_meam[a][b] == L12) {
              this->lattce_meam[a][b] == L12 || this->lattce_meam[a][b] == DIA) {
            rarat = r * arat;

            //               phi_aa
@@ -247,7 +245,8 @@ MEAM::compute_pair_meam(void)
              }
            }

            if (this->lattce_meam[a][b] == B1 || this->lattce_meam[a][b] == B2) {
            if (this->lattce_meam[a][b] == B1 || this->lattce_meam[a][b] == B2 ||
                this->lattce_meam[a][b] == DIA) {
              //     Add contributions to the B1 or B2 potential
              Z1 = get_Zij(this->lattce_meam[a][b]);
              Z2 = get_Zij2(this->lattce_meam[a][b], this->Cmin_meam[a][a][b],