git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@9766 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp 2013-04-08 23:41:47 +00:00
parent 601ca515e6
commit 0e96b5fd0b
2 changed files with 11 additions and 7 deletions

View File

@ -23,10 +23,12 @@
#include "domain.h"
#include "comm.h"
#include "force.h"
#include "math_const.h"
#include "memory.h"
#include "error.h"
using namespace LAMMPS_NS;
using namespace MathConst;
#define SMALL 0.001
@ -180,9 +182,9 @@ void AngleCosineShift::coeff(int narg, char **arg)
int count = 0;
for (int i = ilo; i <= ihi; i++) {
k[i] = umin/2;
kcost[i] = umin/2*cos(theta0*3.14159265/180);
ksint[i] = umin/2*sin(theta0*3.14159265/180);
theta[i] = theta0*3.14159265/180;
kcost[i] = umin/2*cos(theta0*MY_PI / 180.0);
ksint[i] = umin/2*sin(theta0*MY_PI / 180.0);
theta[i] = theta0*MY_PI / 180.0;
setflag[i] = 1;
count++;
@ -240,7 +242,7 @@ void AngleCosineShift::read_restart(FILE *fp)
void AngleCosineShift::write_data(FILE *fp)
{
for (int i = 1; i <= atom->nangletypes; i++)
fprintf(fp,"%d %g %g\n",i,2.0*k[i],theta0[i]/MY_PI*180.0);
fprintf(fp,"%d %g %g\n",i,2.0*k[i],theta[i]/MY_PI*180.0);
}
/* ---------------------------------------------------------------------- */

View File

@ -23,10 +23,12 @@
#include "domain.h"
#include "comm.h"
#include "force.h"
#include "math_const.h"
#include "memory.h"
#include "error.h"
using namespace LAMMPS_NS;
using namespace MathConst;
#define SMALL 0.001
@ -203,9 +205,9 @@ void AngleCosineShiftExp::coeff(int narg, char **arg)
doExpansion[i]=(fabs(a_)<0.001);
umin[i] = umin_;
a[i] = a_;
cost[i] = cos(theta0_*3.14159265/180);
sint[i] = sin(theta0_*3.14159265/180);
theta0[i]= theta0_*3.14159265/180;
cost[i] = cos(theta0_*MY_PI / 180.0);
sint[i] = sin(theta0_*MY_PI / 180.0);
theta0[i]= theta0_*MY_PI / 180.0;
if (!doExpansion[i]) opt1[i]=umin_/(exp(a_)-1);