示例#1
0
static void reset (void)
{
	uid_t uid;

	if (uflg)
		reset_one (user);
	else
		for (uid = 0; reset_one (uid); uid++);
}
static int reset_em_all(int nlist,t_dlist dlist[],int nf,
			 real **dih,int maxchi)
{
  int  i,j,Xi;
  
  /* Reset em all */
  j=0;
  /* Phi */
  for(i=0; (i<nlist); i++)
  {
	  if (dlist[i].atm.minC == -1)
	  {  
		  reset_one(dih[j++],nf,M_PI);
	  }
	  else
      {
		  reset_one(dih[j++],nf,0);
	  }
  }
  /* Psi */
  for(i=0; (i<nlist-1); i++)
  {
	  reset_one(dih[j++],nf,0);		  
  }	  
  /* last Psi is faked from O */
  reset_one(dih[j++],nf,M_PI);		  
  
  /* Omega */
  for(i=0; (i<nlist); i++)
	  if (has_dihedral(edOmega,&dlist[i]))
		  reset_one(dih[j++],nf,0);
  /* Chi 1 thru maxchi */
  for(Xi=0; (Xi<maxchi); Xi++)
  {
	  for(i=0; (i<nlist); i++)
	  {
		  if (dlist[i].atm.Cn[Xi+3] != -1) 
		  {
			  reset_one(dih[j],nf,0);
			  j++;
		  }
	  }
  }
  fprintf(stderr,"j after resetting (nr. active dihedrals) = %d\n",j);
  return j ; 
}