Beispiel #1
0
void add_param(t_params *ps, int ai, int aj, const real *c, char *s)
{
    int i;

    if ((ai < 0) || (aj < 0))
    {
        gmx_fatal(FARGS, "Trying to add impossible atoms: ai=%d, aj=%d", ai, aj);
    }
    pr_alloc(1, ps);
    ps->param[ps->nr].ai() = ai;
    ps->param[ps->nr].aj() = aj;
    clear_atom_list(2, ps->param[ps->nr].a);
    if (c == nullptr)
    {
        clear_force_param(0, ps->param[ps->nr].c);
    }
    else
    {
        for (i = 0; (i < MAXFORCEPARAM); i++)
        {
            ps->param[ps->nr].c[i] = c[i];
        }
    }
    set_p_string(&(ps->param[ps->nr]), s);
    ps->nr++;
}
Beispiel #2
0
void add_vsite2_atoms(t_params *ps, int ai, int aj, int ak)
{
    pr_alloc(1, ps);
    ps->param[ps->nr].ai() = ai;
    ps->param[ps->nr].aj() = aj;
    ps->param[ps->nr].ak() = ak;
    clear_atom_list  (3, ps->param[ps->nr].a);
    clear_force_param(0, ps->param[ps->nr].c);
    set_p_string(&(ps->param[ps->nr]), "");
    ps->nr++;
}
Beispiel #3
0
void add_vsite2_param(t_params *ps, int ai, int aj, int ak, real c0)
{
    pr_alloc(1, ps);
    ps->param[ps->nr].AI = ai;
    ps->param[ps->nr].AJ = aj;
    ps->param[ps->nr].AK = ak;
    clear_atom_list  (3, ps->param[ps->nr].a);
    ps->param[ps->nr].C0 = c0;
    clear_force_param(1, ps->param[ps->nr].c);
    set_p_string(&(ps->param[ps->nr]), "");
    ps->nr++;
}
Beispiel #4
0
void add_cmap_param(t_params *ps, int ai, int aj, int ak, int al, int am, char *s)
{
    pr_alloc(1, ps);
    ps->param[ps->nr].ai() = ai;
    ps->param[ps->nr].aj() = aj;
    ps->param[ps->nr].ak() = ak;
    ps->param[ps->nr].al() = al;
    ps->param[ps->nr].am() = am;
    clear_atom_list(5, ps->param[ps->nr].a);
    clear_force_param(0, ps->param[ps->nr].c);
    set_p_string(&(ps->param[ps->nr]), s);
    ps->nr++;
}
Beispiel #5
0
void add_vsite4_atoms(t_params *ps, int ai, int aj, int ak, int al, int am)
{
    pr_alloc(1, ps);
    ps->param[ps->nr].AI = ai;
    ps->param[ps->nr].AJ = aj;
    ps->param[ps->nr].AK = ak;
    ps->param[ps->nr].AL = al;
    ps->param[ps->nr].AM = am;
    clear_atom_list  (5, ps->param[ps->nr].a);
    clear_force_param(0, ps->param[ps->nr].c);
    set_p_string(&(ps->param[ps->nr]), "");
    ps->nr++;
}
Beispiel #6
0
void add_vsite3_atoms(t_params *ps,int ai,int aj,int ak,int al, gmx_bool bSwapParity)
{
  pr_alloc(1,ps);
  ps->param[ps->nr].AI=ai;
  ps->param[ps->nr].AJ=aj;
  ps->param[ps->nr].AK=ak;
  ps->param[ps->nr].AL=al;
  clear_atom_list  (4, ps->param[ps->nr].a);
  clear_force_param(0, ps->param[ps->nr].c);
  if (bSwapParity)
    ps->param[ps->nr].C1=-1;
  set_p_string(&(ps->param[ps->nr]),"");
  ps->nr++;
}
Beispiel #7
0
void add_vsite3_param(t_params *ps, int ai, int aj, int ak, int al,
                      real c0, real c1)
{
    pr_alloc(1, ps);
    ps->param[ps->nr].ai() = ai;
    ps->param[ps->nr].aj() = aj;
    ps->param[ps->nr].ak() = ak;
    ps->param[ps->nr].al() = al;
    clear_atom_list  (4, ps->param[ps->nr].a);
    ps->param[ps->nr].c0() = c0;
    ps->param[ps->nr].c1() = c1;
    clear_force_param(2, ps->param[ps->nr].c);
    set_p_string(&(ps->param[ps->nr]), "");
    ps->nr++;
}
Beispiel #8
0
void add_imp_param(t_params *ps, int ai, int aj, int ak, int al, real c0, real c1,
                   char *s)
{
    pr_alloc(1, ps);
    ps->param[ps->nr].AI = ai;
    ps->param[ps->nr].AJ = aj;
    ps->param[ps->nr].AK = ak;
    ps->param[ps->nr].AL = al;
    clear_atom_list  (4, ps->param[ps->nr].a);
    ps->param[ps->nr].C0 = c0;
    ps->param[ps->nr].C1 = c1;
    clear_force_param(2, ps->param[ps->nr].c);
    set_p_string(&(ps->param[ps->nr]), s);
    ps->nr++;
}
Beispiel #9
0
void add_vsite3_atoms(t_params *ps, int ai, int aj, int ak, int al, bool bSwapParity)
{
    pr_alloc(1, ps);
    ps->param[ps->nr].ai() = ai;
    ps->param[ps->nr].aj() = aj;
    ps->param[ps->nr].ak() = ak;
    ps->param[ps->nr].al() = al;
    clear_atom_list  (4, ps->param[ps->nr].a);
    clear_force_param(0, ps->param[ps->nr].c);
    if (bSwapParity)
    {
        ps->param[ps->nr].c1() = -1;
    }
    set_p_string(&(ps->param[ps->nr]), "");
    ps->nr++;
}
Beispiel #10
0
void add_dih_param(t_params *ps, int ai, int aj, int ak, int al, real c0, real c1,
                   real c2, char *s)
{
    pr_alloc(1, ps);
    ps->param[ps->nr].ai() = ai;
    ps->param[ps->nr].aj() = aj;
    ps->param[ps->nr].ak() = ak;
    ps->param[ps->nr].al() = al;
    clear_atom_list  (4, ps->param[ps->nr].a);
    ps->param[ps->nr].c0() = c0;
    ps->param[ps->nr].c1() = c1;
    ps->param[ps->nr].c2() = c2;
    clear_force_param(3, ps->param[ps->nr].c);
    set_p_string(&(ps->param[ps->nr]), s);
    ps->nr++;
}
Beispiel #11
0
void add_param(t_params *ps,int ai,int aj, real *c, char *s)
{
  int i;
  
  if ((ai < 0) || (aj < 0)) 
    gmx_fatal(FARGS,"Trying to add impossible atoms: ai=%d, aj=%d",ai,aj);
  pr_alloc(1,ps);
  ps->param[ps->nr].AI=ai;
  ps->param[ps->nr].AJ=aj;
  clear_atom_list(2, ps->param[ps->nr].a);
  if (c==NULL) 
    clear_force_param(0, ps->param[ps->nr].c);
  else
    for(i=0; (i < MAXFORCEPARAM); i++)
      ps->param[ps->nr].c[i]=c[i];
  set_p_string(&(ps->param[ps->nr]),s);
  ps->nr++;
}