macro & Q_from_D(& d)
   {
      2 Pi / d
   }
macro ADP_5_0(s, &x0, &y0, &z0, atom, &o, &x1, &y1, &z1, &x2, &y2, &z2, &bo)
   {
      site s x = x0;  y = y0;  z = z0;  occ atom = 0.2 o; beq = bo;
		local #m_unique ns = Get(num_posns);
      site s##_1p x = x0+x1; y = y0+y1; z = z0+z1; occ atom = 0.2 (ns / Get(num_posns)) o; beq = bo;
      site s##_2p x = x0+x2; y = y0+y2; z = z0+z2; occ atom = 0.2 (ns / Get(num_posns)) o; beq = bo;
      site s##_1m x = x0-x1; y = y0-y1; z = z0-z1; occ atom = 0.2 (ns / Get(num_posns)) o; beq = bo;
      site s##_2m x = x0-x2; y = y0-y2; z = z0-z2; occ atom = 0.2 (ns / Get(num_posns)) o; beq = bo;
   }
macro ADP_5(s,
   xc, xv, yc, yv, zc, zv,
   atom_type, oc, ov,
   x1c, x1v, y1c, y1v, z1c, z1v,
   x2c, x2v, y2c, y2v, z2c, z2v,
   boc, bov)
   {
      #m_argu xc #m_argu yc #m_argu zc
      #m_argu oc
      #m_argu x1c #m_argu y1c #m_argu z1c
      #m_argu x2c #m_argu y2c #m_argu z2c
      #m_argu boc
      If_Prm_Eqn_Rpt(xc, xv, min = Val - .1 / Lpa; max = Val + .1 / Lpa;)
      If_Prm_Eqn_Rpt(yc, yv, min = Val - .1 / Lpb; max = Val + .1 / Lpb;)
      If_Prm_Eqn_Rpt(zc, zv, min = Val - .1 / Lpc; max = Val + .1 / Lpc;)
      If_Prm_Eqn_Rpt(oc, ov, min 0 )
      If_Prm_Eqn_Rpt(x1c, x1v, min = Val - .1 / Lpa; max = Val + .1 / Lpa;)
      If_Prm_Eqn_Rpt(y1c, y1v, min = Val - .1 / Lpb; max = Val + .1 / Lpb;)
      If_Prm_Eqn_Rpt(z1c, z1v, min = Val - .1 / Lpc; max = Val + .1 / Lpc;)
      If_Prm_Eqn_Rpt(x2c, x2v, min = Val - .1 / Lpa; max = Val + .1 / Lpa;)
      If_Prm_Eqn_Rpt(y2c, y2v, min = Val - .1 / Lpb; max = Val + .1 / Lpb;)
      If_Prm_Eqn_Rpt(z2c, z2v, min = Val - .1 / Lpc; max = Val + .1 / Lpc;)
      If_Prm_Eqn_Rpt(boc, bov, min -5 max 5 )
      ADP_5_0(s,
         CeV(xc, xv),
         CeV(yc, yv),
         CeV(zc, zv),
         atom_type,
         CeV(oc, ov),
         CeV(x1c, x1v),
         CeV(y1c, y1v),
         CeV(z1c, z1v),
         CeV(x2c, x2v),
         CeV(y2c, y2v),
         CeV(z2c, z2v),
         CeV(boc, bov))
   }
'----------------------------------------
macro ADP_7_0(s, &x0, &y0, &z0, atom, &o, &x1, &y1, &z1, &x2, &y2, &z2, &x3, &y3, &z3, &bo)
   {
      site s x = x0;  y = y0;  z = z0;  occ atom = o / 7; beq = bo;
      local #m_unique ns = Get(num_posns);
      site s##_1p x = x0+x1; y = y0+y1; z = z0+z1; occ atom = (ns / Get(num_posns)) o / 7; beq = bo;
      site s##_2p x = x0+x2; y = y0+y2; z = z0+z2; occ atom = (ns / Get(num_posns)) o / 7; beq = bo;
      site s##_3p x = x0+x3; y = y0+y3; z = z0+z3; occ atom = (ns / Get(num_posns)) o / 7; beq = bo;

      site s##_1m x = x0-x1; y = y0-y1; z = z0-z1; occ atom = (ns / Get(num_posns)) o / 7; beq = bo;
      site s##_2m x = x0-x2; y = y0-y2; z = z0-z2; occ atom = (ns / Get(num_posns)) o / 7; beq = bo;
      site s##_3m x = x0-x3; y = y0-y3; z = z0-z3; occ atom = (ns / Get(num_posns)) o / 7; beq = bo;
   }
macro ADP_7(s,
   xc, xv, yc, yv, zc, zv,
   atom_type, oc, ov,
   x1c, x1v, y1c, y1v, z1c, z1v,
   x2c, x2v, y2c, y2v, z2c, z2v,
   x3c, x3v, y3c, y3v, z3c, z3v,
   boc, bov)
   {
      #m_argu xc #m_argu yc #m_argu zc
      #m_argu oc
      #m_argu x1c #m_argu y1c #m_argu z1c
      #m_argu x2c #m_argu y2c #m_argu z2c
      #m_argu x3c #m_argu y3c #m_argu z3c
      #m_argu boc
      If_Prm_Eqn_Rpt(xc, xv, min = Val - .1 / Lpa; max = Val + .1 / Lpa;)
      If_Prm_Eqn_Rpt(yc, yv, min = Val - .1 / Lpb; max = Val + .1 / Lpb;)
      If_Prm_Eqn_Rpt(zc, zv, min = Val - .1 / Lpc; max = Val + .1 / Lpc;)
      If_Prm_Eqn_Rpt(oc, ov, min 0 )
      If_Prm_Eqn_Rpt(x1c, x1v, min = Val - .1 / Lpa; max = Val + .1 / Lpa;)
      If_Prm_Eqn_Rpt(y1c, y1v, min = Val - .1 / Lpb; max = Val + .1 / Lpb;)
      If_Prm_Eqn_Rpt(z1c, z1v, min = Val - .1 / Lpc; max = Val + .1 / Lpc;)
      If_Prm_Eqn_Rpt(x2c, x2v, min = Val - .1 / Lpa; max = Val + .1 / Lpa;)
      If_Prm_Eqn_Rpt(y2c, y2v, min = Val - .1 / Lpb; max = Val + .1 / Lpb;)
      If_Prm_Eqn_Rpt(z2c, z2v, min = Val - .1 / Lpc; max = Val + .1 / Lpc;)
      If_Prm_Eqn_Rpt(x3c, x3v, min = Val - .1 / Lpa; max = Val + .1 / Lpa;)
      If_Prm_Eqn_Rpt(y3c, y3v, min = Val - .1 / Lpb; max = Val + .1 / Lpb;)
      If_Prm_Eqn_Rpt(z3c, z3v, min = Val - .1 / Lpc; max = Val + .1 / Lpc;)
      If_Prm_Eqn_Rpt(boc, bov, min -5 max 5 )
      ADP_7_0(s,
         CeV(xc, xv),
         CeV(yc, yv),
         CeV(zc, zv),
         atom_type,
         CeV(oc, ov),
         CeV(x1c, x1v),
         CeV(y1c, y1v),
         CeV(z1c, z1v),
         CeV(x2c, x2v),
         CeV(y2c, y2v),
         CeV(z2c, z2v),
         CeV(x3c, x3v),
         CeV(y3c, y3v),
         CeV(z3c, z3v),
         CeV(boc, bov))
   }
'----------------------------------------

