consistent formatting: replace "if( XXX)" with "if (XXX)"

This commit is contained in:
Axel Kohlmeyer 2018-12-29 17:08:12 -05:00
parent f25bfd5931
commit 1991ff6c48
37 changed files with 80 additions and 80 deletions

View File

@ -1115,7 +1115,7 @@ int FixQEqReaxKokkos<DeviceType>::pack_forward_comm(int n, int *list, double *bu
{
int m;
if( pack_flag == 1)
if (pack_flag == 1)
for(m = 0; m < n; m++) buf[m] = h_d[list[m]];
else if( pack_flag == 2 )
for(m = 0; m < n; m++) buf[m] = h_s[list[m]];
@ -1134,7 +1134,7 @@ void FixQEqReaxKokkos<DeviceType>::unpack_forward_comm(int n, int first, double
{
int i, m;
if( pack_flag == 1)
if (pack_flag == 1)
for(m = 0, i = first; m < n; m++, i++) h_d[i] = buf[m];
else if( pack_flag == 2)
for(m = 0, i = first; m < n; m++, i++) h_s[i] = buf[m];

View File

@ -1534,7 +1534,7 @@ void PairReaxCKokkos<DeviceType>::operator()(PairReaxBuildListsFull, const int &
// hbond list
if (i < nlocal && cut_hbsq > 0.0 && (ihb == 1 || ihb == 2) && rsq <= cut_hbsq) {
jhb = paramssing(jtype).p_hbond;
if( ihb == 1 && jhb == 2) {
if (ihb == 1 && jhb == 2) {
const int jj_index = hb_index - hb_first_i;
if (jj_index >= maxhb) {
d_resize_hb() = 1;
@ -1702,7 +1702,7 @@ void PairReaxCKokkos<DeviceType>::operator()(PairReaxBuildListsHalf<NEIGHFLAG>,
// hbond list
if (i < nlocal && cut_hbsq > 0.0 && (ihb == 1 || ihb == 2) && rsq <= cut_hbsq) {
jhb = paramssing(jtype).p_hbond;
if( ihb == 1 && jhb == 2) {
if (ihb == 1 && jhb == 2) {
if (NEIGHFLAG == HALF) {
j_index = hb_first_i + d_hb_num[i];
d_hb_num[i]++;
@ -1925,7 +1925,7 @@ void PairReaxCKokkos<DeviceType>::operator()(PairReaxBuildListsHalf_LessAtomics<
// hbond list
if (i < nlocal && cut_hbsq > 0.0 && (ihb == 1 || ihb == 2) && rsq <= cut_hbsq) {
jhb = paramssing(jtype).p_hbond;
if( ihb == 1 && jhb == 2) {
if (ihb == 1 && jhb == 2) {
if (NEIGHFLAG == HALF) {
j_index = hb_first_i + d_hb_num[i];
d_hb_num[i]++;
@ -3476,7 +3476,7 @@ void PairReaxCKokkos<DeviceType>::operator()(PairReaxComputeBond1<NEIGHFLAG,EVFL
F_FLOAT estriph = 0.0;
if (BO_i >= 1.00) {
if( gp[37] == 2 || (imass == 12.0000 && jmass == 15.9990) ||
if (gp[37] == 2 || (imass == 12.0000 && jmass == 15.9990) ||
(jmass == 12.0000 && imass == 15.9990) ) {
const F_FLOAT exphu = exp(-gp[7] * SQR(BO_i - 2.50) );
const F_FLOAT exphua1 = exp(-gp[3] * (d_total_bo[i]-BO_i));

View File

@ -208,7 +208,7 @@ void PairComb3::coeff(int narg, char **arg)
nelements = 0;
for (i = 3; i < narg; i++) {
if ((strcmp(arg[i],"C") == 0) && (cflag == 0)) {
if( comm->me == 0 && screen) fprintf(screen,
if (comm->me == 0 && screen) fprintf(screen,
" PairComb3: Found C: reading additional library file\n");
read_lib();
cflag = 1;
@ -922,7 +922,7 @@ void PairComb3::Short_neigh()
icontrol = params[iparam_ij].jelementgp;
if( icontrol == 1)
if (icontrol == 1)
xcctmp[i] += comb_fc(rr1,&params[iparam_ij]) * params[iparam_ij].pcross;
if (icontrol == 2)
xchtmp[i] += comb_fc(rr1,&params[iparam_ij]) * params[iparam_ij].pcross;
@ -1382,7 +1382,7 @@ void PairComb3::compute(int eflag, int vflag)
}
// torsion and radical: apply to all C-C bonds
if( params[iparam_ijk].tor_flag != 0 && fabs(ptorr)>1.0e-8) {
if (params[iparam_ijk].tor_flag != 0 && fabs(ptorr)>1.0e-8) {
srmu = vec3_dot(delrj,delrk)/(sqrt(rsq1*rsq2));
srmu = sqrt(1.0-srmu*srmu);

View File

@ -122,7 +122,7 @@ void PairLCBOP::allocate()
------------------------------------------------------------------------- */
void PairLCBOP::settings(int narg, char **/*arg*/) {
if( narg != 0 ) error->all(FLERR,"Illegal pair_style command");
if (narg != 0 ) error->all(FLERR,"Illegal pair_style command");
}
/* ----------------------------------------------------------------------

View File

@ -70,7 +70,7 @@ static xdr_uint32_t xdr_swapbytes(xdr_uint32_t x)
static xdr_uint32_t xdr_htonl(xdr_uint32_t x)
{
short s=0x0F00;
if( *((char *)&s)==(char)0x0F) {
if (*((char *)&s)==(char)0x0F) {
/* bigendian, do nothing */
return x;
} else {
@ -82,7 +82,7 @@ static xdr_uint32_t xdr_htonl(xdr_uint32_t x)
static xdr_uint32_t xdr_ntohl(xdr_uint32_t x)
{
short s=0x0F00;
if( *((char *)&s)==(char)0x0F) {
if (*((char *)&s)==(char)0x0F) {
/* bigendian, do nothing */
return x;
} else {

View File

@ -204,7 +204,7 @@ double BondGromos::single(int type, double rsq, int /*i*/, int /*j*/,
void *BondGromos::extract( char *str, int &dim )
{
dim = 1;
if( strcmp(str,"kappa")==0) return (void*) k;
if( strcmp(str,"r0")==0) return (void*) r0;
if (strcmp(str,"kappa")==0) return (void*) k;
if (strcmp(str,"r0")==0) return (void*) r0;
return NULL;
}

View File

@ -207,8 +207,8 @@ double BondHarmonic::single(int type, double rsq, int /*i*/, int /*j*/,
void *BondHarmonic::extract( char *str, int &dim )
{
dim = 1;
if( strcmp(str,"kappa")==0) return (void*) k;
if( strcmp(str,"r0")==0) return (void*) r0;
if (strcmp(str,"kappa")==0) return (void*) k;
if (strcmp(str,"r0")==0) return (void*) r0;
return NULL;
}

View File

@ -475,7 +475,7 @@ int FixQEq::pack_forward_comm(int n, int *list, double *buf,
{
int m;
if( pack_flag == 1)
if (pack_flag == 1)
for(m = 0; m < n; m++) buf[m] = d[list[m]];
else if( pack_flag == 2 )
for(m = 0; m < n; m++) buf[m] = s[list[m]];
@ -493,7 +493,7 @@ void FixQEq::unpack_forward_comm(int n, int first, double *buf)
{
int i, m;
if( pack_flag == 1)
if (pack_flag == 1)
for(m = 0, i = first; m < n; m++, i++) d[i] = buf[m];
else if( pack_flag == 2)
for(m = 0, i = first; m < n; m++, i++) s[i] = buf[m];

View File

@ -103,7 +103,7 @@ void FixQEqDynamic::pre_force(int /*vflag*/)
if (update->ntimestep % nevery) return;
if( atom->nmax > nmax ) reallocate_storage();
if (atom->nmax > nmax) reallocate_storage();
inum = list->inum;
ilist = list->ilist;
@ -265,7 +265,7 @@ void FixQEqDynamic::unpack_forward_comm(int n, int first, double *buf)
{
int i, m;
if( pack_flag == 1)
if (pack_flag == 1)
for(m = 0, i = first; m < n; m++, i++) atom->q[i] = buf[m];
else if( pack_flag == 2)
for(m = 0, i = first; m < n; m++, i++) qf[i] = buf[m];

View File

@ -122,7 +122,7 @@ void FixQEqFire::pre_force(int /*vflag*/)
if (ntimestep % nevery) return;
if( atom->nmax > nmax ) reallocate_storage();
if (atom->nmax > nmax) reallocate_storage();
inum = list->inum;
ilist = list->ilist;
@ -329,7 +329,7 @@ void FixQEqFire::unpack_forward_comm(int n, int first, double *buf)
{
int i, m;
if( pack_flag == 1)
if (pack_flag == 1)
for(m = 0, i = first; m < n; m++, i++) atom->q[i] = buf[m];
else if( pack_flag == 2)
for(m = 0, i = first; m < n; m++, i++) qf[i] = buf[m];

View File

@ -73,7 +73,7 @@ void FixQEqPoint::pre_force(int /*vflag*/)
nlocal = atom->nlocal;
if( atom->nmax > nmax ) reallocate_storage();
if (atom->nmax > nmax) reallocate_storage();
if (nlocal > n_cap*DANGER_ZONE || m_fill > m_cap*DANGER_ZONE)
reallocate_matrix();

View File

@ -117,7 +117,7 @@ void FixQEqShielded::pre_force(int /*vflag*/)
nlocal = atom->nlocal;
if( atom->nmax > nmax ) reallocate_storage();
if (atom->nmax > nmax) reallocate_storage();
if (nlocal > n_cap*DANGER_ZONE || m_fill > m_cap*DANGER_ZONE)
reallocate_matrix();

View File

@ -114,7 +114,7 @@ void FixQEqSlater::pre_force(int /*vflag*/)
nlocal = atom->nlocal;
nall = atom->nlocal + atom->nghost;
if( atom->nmax > nmax ) reallocate_storage();
if (atom->nmax > nmax) reallocate_storage();
if (nlocal > n_cap*DANGER_ZONE || m_fill > m_cap*DANGER_ZONE)
reallocate_matrix();

View File

@ -84,8 +84,8 @@ FixNVEManifoldRattle::FixNVEManifoldRattle( LAMMPS *lmp, int &narg, char **arg,
int error_on_unknown_keyword )
: Fix(lmp,narg,arg)
{
if( lmp->citeme) lmp->citeme->add(cite_fix_nve_manifold_rattle);
if( narg < 6 ) error->all(FLERR, "Illegal fix nve/manifold/rattle command");
if (lmp->citeme) lmp->citeme->add(cite_fix_nve_manifold_rattle);
if (narg < 6 ) error->all(FLERR, "Illegal fix nve/manifold/rattle command");
// Set all bits/settings:
time_integrate = 1;
@ -135,12 +135,12 @@ FixNVEManifoldRattle::FixNVEManifoldRattle( LAMMPS *lmp, int &narg, char **arg,
is_var[i] = 0;
}
tstrs[i] = new char[len];
if( tstrs[i] == NULL ) error->all(FLERR,"Error allocating space for args.");
if (tstrs[i] == NULL ) error->all(FLERR,"Error allocating space for args.");
strcpy( tstrs[i], arg[i+6] + offset );
}
ptr_m->params = new double[nvars];
if( !ptr_m->params ) error->all(FLERR,"Failed to allocate params!");
if (!ptr_m->params ) error->all(FLERR,"Failed to allocate params!");
for( int i = 0; i < nvars; ++i ){
// If param i was variable type, it will be set later...
ptr_m->params[i] = is_var[i] ? 0.0 : force->numeric( FLERR, arg[i+6] );

View File

@ -86,7 +86,7 @@ FixNVTManifoldRattle::FixNVTManifoldRattle(LAMMPS *lmp, int narg, char **arg,
{
if (lmp->citeme) lmp->citeme->add(cite_fix_nvt_manifold_rattle);
if( narg < 6 ) error->all(FLERR,"Illegal fix nvt/manifold/rattle command");
if (narg < 6 ) error->all(FLERR,"Illegal fix nvt/manifold/rattle command");
// Set all bits/settings:
dof_flag = 1;
@ -132,7 +132,7 @@ FixNVTManifoldRattle::FixNVTManifoldRattle(LAMMPS *lmp, int narg, char **arg,
reset_dt();
if( !got_temp ) error->all(FLERR,"Fix nvt/manifold/rattle needs 'temp'!");
if (!got_temp ) error->all(FLERR,"Fix nvt/manifold/rattle needs 'temp'!");
if (t_period < 0.0) {
error->all(FLERR,"Fix nvt/manifold/rattle damping parameter must be > 0.0");
@ -341,7 +341,7 @@ void FixNVTManifoldRattle::nh_v_temp()
double **v = atom->v;
int *mask = atom->mask;
int nlocal = atom->nlocal;
if( igroup == atom->firstgroup) nlocal = atom->nfirst;
if (igroup == atom->firstgroup) nlocal = atom->nfirst;

View File

@ -42,10 +42,10 @@ public:
void test()
{
if( fabs( x(0) - x0 ) > 1e-8 ) err->one(FLERR, "x0 wrong");
if( fabs( x(1) - x1 ) > 1e-8 ) err->one(FLERR, "x1 wrong");
if( fabs( y(0) - y0 ) > 1e-8 ) err->one(FLERR, "y0 wrong");
if( fabs( y(1) - y1 ) > 1e-8 ) err->one(FLERR, "y1 wrong");
if (fabs( x(0) - x0 ) > 1e-8 ) err->one(FLERR, "x0 wrong");
if (fabs( x(1) - x1 ) > 1e-8 ) err->one(FLERR, "x1 wrong");
if (fabs( y(0) - y0 ) > 1e-8 ) err->one(FLERR, "y0 wrong");
if (fabs( y(1) - y1 ) > 1e-8 ) err->one(FLERR, "y1 wrong");
}
double get_t_from_x( double xx ) const

View File

@ -38,7 +38,7 @@ thyla_part::thyla_part( int type, double *args, double xlo, double ylo, double z
return;
}
// The others should be 1.
if( (args[0] != 1.0) && (args[0] != 0.0) &&
if ( (args[0] != 1.0) && (args[0] != 0.0) &&
(args[1] != 1.0) && (args[1] != 0.0) &&
(args[2] != 1.0) && (args[2] != 0.0) ){
err_flag = -1;

View File

@ -191,7 +191,7 @@ void PairEDPD::compute(int eflag, int vflag)
// heat transfer
double dQc,dQd,dQr;
if( r < cutT[itype][jtype]) {
if (r < cutT[itype][jtype]) {
double wrT = 1.0 - r/cutT[itype][jtype];
wrT = MAX(0.0,MIN(1.0,wrT));
wrT = pow(wrT, 0.5*powerT[itype][jtype]);

View File

@ -161,7 +161,7 @@ void PairTDPD::compute(int eflag, int vflag)
f[i][2] += delz*fpair;
// chemical concentration transport
if( r < cutcc[itype][jtype]) {
if (r < cutcc[itype][jtype]) {
for(int k=0; k<cc_species; k++) {
double wcr = 1.0 - r/cutcc[itype][jtype];
wcr = MAX(0,wcr);

View File

@ -205,7 +205,7 @@ void PairReaxCOMP::compute(int eflag, int vflag)
system->big_box.box_norms[0] = 0;
system->big_box.box_norms[1] = 0;
system->big_box.box_norms[2] = 0;
if( comm->me == 0 ) t_start = MPI_Wtime();
if (comm->me == 0 ) t_start = MPI_Wtime();
// setup data structures
setup();

View File

@ -113,7 +113,7 @@ void Add_dBond_to_ForcesOMP( reax_system *system, int i, int pj,
rvec_Add(workspace->forceReduction[reductionOffset+i],temp );
if( system->pair_ptr->vflag_atom) {
if (system->pair_ptr->vflag_atom) {
rvec_Scale(fi_tmp, -1.0, temp);
rvec_ScaledSum( delij, 1., system->my_atoms[i].x,-1., system->my_atoms[j].x );
@ -147,7 +147,7 @@ void Add_dBond_to_ForcesOMP( reax_system *system, int i, int pj,
rvec_Add(workspace->forceReduction[reductionOffset+j],temp );
if( system->pair_ptr->vflag_atom) {
if (system->pair_ptr->vflag_atom) {
rvec_Scale(fj_tmp, -1.0, temp);
rvec_ScaledSum( delji, 1., system->my_atoms[j].x,-1., system->my_atoms[i].x );
@ -490,7 +490,7 @@ void BOOMP( reax_system *system, control_params * /* control */, simulation_data
if(type_j < 0) continue;
bo_ij = &( bonds->select.bond_list[pj].bo_data );
if( i < j || workspace->bond_mark[j] > 3) {
if (i < j || workspace->bond_mark[j] > 3) {
twbp = &( system->reax_param.tbp[type_i][type_j] );
if (twbp->ovc < 0.001 && twbp->v13cor < 0.001) {
@ -654,7 +654,7 @@ void BOOMP( reax_system *system, control_params * /* control */, simulation_data
type_j = system->my_atoms[j].type;
if(type_j < 0) continue;
if( i < j || workspace->bond_mark[j] > 3) {
if (i < j || workspace->bond_mark[j] > 3) {
// Computed in previous for-loop
} else {
/* We only need to update bond orders from bo_ji

View File

@ -166,7 +166,7 @@ void InitializeOMP( reax_system *system, control_params *control,
MPI_Abort( mpi_data->world, CANNOT_INITIALIZE );
}
if( Init_Output_Files(system,control,out_control,mpi_data,msg)== FAILURE) {
if (Init_Output_Files(system,control,out_control,mpi_data,msg)== FAILURE) {
fprintf( stderr, "p%d: %s\n", system->my_rank, msg );
fprintf( stderr, "p%d: could not open output files! terminating...\n",
system->my_rank );

View File

@ -128,7 +128,7 @@ void Atom_EnergyOMP( reax_system *system, control_params * /* control */,
if(numbonds > 0) workspace->CdDelta[i] += CElp; // lp - 1st term
/* tally into per-atom energy */
if( system->pair_ptr->evflag)
if (system->pair_ptr->evflag)
pair_reax_ptr->ev_tally_thr_proxy(system->pair_ptr, i, i, system->n, 1,
e_lp, 0.0, 0.0, 0.0, 0.0, 0.0, thr);
@ -155,7 +155,7 @@ void Atom_EnergyOMP( reax_system *system, control_params * /* control */,
workspace->CdDelta[i] += deahu2dsbo;
/* tally into per-atom energy */
if( system->pair_ptr->evflag)
if (system->pair_ptr->evflag)
pair_reax_ptr->ev_tally_thr_proxy(system->pair_ptr, i, j, system->n, 1,
e_lph, 0.0, 0.0, 0.0, 0.0, 0.0, thr);
}

View File

@ -208,7 +208,7 @@ void vdW_Coulomb_Energy_OMP( reax_system *system, control_params *control,
( dTap - Tap * r_ij / dr3gamij_1 ) / dr3gamij_3;
/* tally into per-atom energy */
if( system->pair_ptr->evflag || system->pair_ptr->vflag_atom) {
if (system->pair_ptr->evflag || system->pair_ptr->vflag_atom) {
pe_vdw = Tap * (e_vdW + e_core + e_lg);
rvec_ScaledSum( delij, 1., system->my_atoms[i].x,
-1., system->my_atoms[j].x );
@ -349,7 +349,7 @@ void Tabulated_vdW_Coulomb_Energy_OMP(reax_system *system,control_params *contro
CEclmb *= system->my_atoms[i].q * system->my_atoms[j].q;
/* tally into per-atom energy */
if( system->pair_ptr->evflag || system->pair_ptr->vflag_atom) {
if (system->pair_ptr->evflag || system->pair_ptr->vflag_atom) {
rvec_ScaledSum( delij, 1., system->my_atoms[i].x,
-1., system->my_atoms[j].x );
f_tmp = -(CEvd + CEclmb);

View File

@ -417,7 +417,7 @@ void Torsion_AnglesOMP( reax_system *system, control_params *control,
}
/* tally into per-atom virials */
if( system->pair_ptr->vflag_atom || system->pair_ptr->evflag) {
if (system->pair_ptr->vflag_atom || system->pair_ptr->evflag) {
// acquire vectors
rvec_ScaledSum( delil, 1., system->my_atoms[l].x,

View File

@ -561,7 +561,7 @@ void Valence_AnglesOMP( reax_system *system, control_params *control,
}
/* tally into per-atom virials */
if( system->pair_ptr->vflag_atom || system->pair_ptr->evflag) {
if (system->pair_ptr->vflag_atom || system->pair_ptr->evflag) {
/* Acquire vectors */
rvec_ScaledSum( delij, 1., system->my_atoms[i].x,
@ -575,10 +575,10 @@ void Valence_AnglesOMP( reax_system *system, control_params *control,
eng_tmp = e_ang + e_pen + e_coa;
if( system->pair_ptr->evflag)
if (system->pair_ptr->evflag)
pair_reax_ptr->ev_tally_thr_proxy(system->pair_ptr, j, j, system->N, 1,
eng_tmp, 0.0, 0.0, 0.0, 0.0, 0.0, thr);
if( system->pair_ptr->vflag_atom)
if (system->pair_ptr->vflag_atom)
// NEED TO MAKE AN OMP VERSION OF THIS CALL!
system->pair_ptr->v_tally3( i, j, k, fi_tmp, fk_tmp, delij, delkj);
}

View File

@ -271,7 +271,7 @@ void PairQUIP::coeff(int narg, char **arg)
for (int i = 4; i < narg; i++) {
if( 0 == sscanf(arg[i],"%d",&map[i-4])) {
if (0 == sscanf(arg[i],"%d",&map[i-4])) {
char str[1024];
sprintf(str,"Incorrect atomic number %s at position %d",arg[i],i);
error->all(FLERR,str);

View File

@ -510,7 +510,7 @@ void PairReaxC::compute(int eflag, int vflag)
system->big_box.box_norms[0] = 0;
system->big_box.box_norms[1] = 0;
system->big_box.box_norms[2] = 0;
if( comm->me == 0 ) t_start = MPI_Wtime();
if (comm->me == 0 ) t_start = MPI_Wtime();
// setup data structures

View File

@ -189,7 +189,7 @@ void Add_dBond_to_Forces( reax_system *system, int i, int pj,
rvec_ScaledAdd( temp, coef.C3dbopi2, workspace->dDeltap_self[i] );
rvec_Add( workspace->f[i], temp );
if( system->pair_ptr->vflag_atom) {
if (system->pair_ptr->vflag_atom) {
rvec_Scale(fi_tmp, -1.0, temp);
rvec_ScaledSum( delij, 1., system->my_atoms[i].x,-1., system->my_atoms[j].x );
system->pair_ptr->v_tally(i,fi_tmp,delij);
@ -208,7 +208,7 @@ void Add_dBond_to_Forces( reax_system *system, int i, int pj,
rvec_ScaledAdd( temp, coef.C4dbopi2, workspace->dDeltap_self[j]);
rvec_Add( workspace->f[j], temp );
if( system->pair_ptr->vflag_atom) {
if (system->pair_ptr->vflag_atom) {
rvec_Scale(fj_tmp, -1.0, temp);
rvec_ScaledSum( delji, 1., system->my_atoms[j].x,-1., system->my_atoms[i].x );
system->pair_ptr->v_tally(j,fj_tmp,delji);

View File

@ -95,7 +95,7 @@ void Bonds( reax_system *system, control_params * /*control*/,
-twbp->De_pp * bo_ij->BO_pi2;
/* tally into per-atom energy */
if( system->pair_ptr->evflag)
if (system->pair_ptr->evflag)
system->pair_ptr->ev_tally(i,j,natoms,1,ebond,0.0,0.0,0.0,0.0,0.0);
/* calculate derivatives of Bond Orders */
@ -125,7 +125,7 @@ void Bonds( reax_system *system, control_params * /*control*/,
(gp3*exphub1 + 25.0*gp4*exphuov*hulpov*(exphua1+exphub1));
/* tally into per-atom energy */
if( system->pair_ptr->evflag)
if (system->pair_ptr->evflag)
system->pair_ptr->ev_tally(i,j,natoms,1,estriph,0.0,0.0,0.0,0.0,0.0);
bo_ij->Cdbo += decobdbo;

View File

@ -260,7 +260,7 @@ void Init_Forces_noQEq( reax_system *system, control_params *control,
if (local) {
/* hydrogen bond lists */
if( control->hbond_cut > 0 && (ihb==1 || ihb==2) &&
if (control->hbond_cut > 0 && (ihb==1 || ihb==2) &&
nbr_pj->d <= control->hbond_cut ) {
// fprintf( stderr, "%d %d\n", atom1, atom2 );
jhb = sbp_j->p_hbond;
@ -282,7 +282,7 @@ void Init_Forces_noQEq( reax_system *system, control_params *control,
}
}
if( //(workspace->bond_mark[i] < 3 || workspace->bond_mark[j] < 3) &&
if (//(workspace->bond_mark[i] < 3 || workspace->bond_mark[j] < 3) &&
nbr_pj->d <= control->bond_cut &&
BOp( workspace, bonds, control->bo_cut,
i , btop_i, nbr_pj, sbp_i, sbp_j, twbp ) ) {
@ -377,7 +377,7 @@ void Estimate_Storages( reax_system *system, control_params *control,
++(*Htop);
/* hydrogen bond lists */
if( control->hbond_cut > 0.1 && (ihb==1 || ihb==2) &&
if (control->hbond_cut > 0.1 && (ihb==1 || ihb==2) &&
nbr_pj->d <= control->hbond_cut ) {
jhb = sbp_j->p_hbond;
if (ihb == 1 && jhb == 2)
@ -389,19 +389,19 @@ void Estimate_Storages( reax_system *system, control_params *control,
/* uncorrected bond orders */
if (nbr_pj->d <= control->bond_cut) {
if( sbp_i->r_s > 0.0 && sbp_j->r_s > 0.0) {
if (sbp_i->r_s > 0.0 && sbp_j->r_s > 0.0) {
C12 = twbp->p_bo1 * pow( r_ij / twbp->r_s, twbp->p_bo2 );
BO_s = (1.0 + control->bo_cut) * exp( C12 );
}
else BO_s = C12 = 0.0;
if( sbp_i->r_pi > 0.0 && sbp_j->r_pi > 0.0) {
if (sbp_i->r_pi > 0.0 && sbp_j->r_pi > 0.0) {
C34 = twbp->p_bo3 * pow( r_ij / twbp->r_p, twbp->p_bo4 );
BO_pi = exp( C34 );
}
else BO_pi = C34 = 0.0;
if( sbp_i->r_pi_pi > 0.0 && sbp_j->r_pi_pi > 0.0) {
if (sbp_i->r_pi_pi > 0.0 && sbp_j->r_pi_pi > 0.0) {
C56 = twbp->p_bo5 * pow( r_ij / twbp->r_pp, twbp->p_bo6 );
BO_pi2= exp( C56 );
}

View File

@ -258,7 +258,7 @@ void Initialize( reax_system *system, control_params *control,
MPI_Abort( mpi_data->world, CANNOT_INITIALIZE );
}
if( Init_Output_Files(system,control,out_control,mpi_data,msg)== FAILURE) {
if (Init_Output_Files(system,control,out_control,mpi_data,msg)== FAILURE) {
fprintf( stderr, "p%d: %s\n", system->my_rank, msg );
fprintf( stderr, "p%d: could not open output files! terminating...\n",
system->my_rank );

View File

@ -91,7 +91,7 @@ void Atom_Energy( reax_system *system, control_params *control,
workspace->CdDelta[i] += CElp; // lp - 1st term
/* tally into per-atom energy */
if( system->pair_ptr->evflag)
if (system->pair_ptr->evflag)
system->pair_ptr->ev_tally(i,i,system->n,1,e_lp,0.0,0.0,0.0,0.0,0.0);
/* correction for C2 */
@ -117,7 +117,7 @@ void Atom_Energy( reax_system *system, control_params *control,
workspace->CdDelta[i] += deahu2dsbo;
/* tally into per-atom energy */
if( system->pair_ptr->evflag)
if (system->pair_ptr->evflag)
system->pair_ptr->ev_tally(i,j,system->n,1,e_lph,0.0,0.0,0.0,0.0,0.0);
}
@ -201,7 +201,7 @@ void Atom_Energy( reax_system *system, control_params *control,
p_ovun4 * exp_ovun1 * SQR(inv_exp_ovun1) + CEunder2;
/* tally into per-atom energy */
if( system->pair_ptr->evflag) {
if (system->pair_ptr->evflag) {
eng_tmp = e_ov;
if (numbonds > 0 || control->enobondsflag)
eng_tmp += e_un;

View File

@ -172,7 +172,7 @@ void vdW_Coulomb_Energy( reax_system *system, control_params *control,
( dTap - Tap * r_ij / dr3gamij_1 ) / dr3gamij_3;
/* tally into per-atom energy */
if( system->pair_ptr->evflag || system->pair_ptr->vflag_atom) {
if (system->pair_ptr->evflag || system->pair_ptr->vflag_atom) {
pe_vdw = Tap * (e_vdW + e_core + e_lg);
rvec_ScaledSum( delij, 1., system->my_atoms[i].x,
-1., system->my_atoms[j].x );
@ -285,7 +285,7 @@ void Tabulated_vdW_Coulomb_Energy( reax_system *system,control_params *control,
CEclmb *= system->my_atoms[i].q * system->my_atoms[j].q;
/* tally into per-atom energy */
if( system->pair_ptr->evflag || system->pair_ptr->vflag_atom) {
if (system->pair_ptr->evflag || system->pair_ptr->vflag_atom) {
rvec_ScaledSum( delij, 1., system->my_atoms[i].x,
-1., system->my_atoms[j].x );
f_tmp = -(CEvd + CEclmb);
@ -330,7 +330,7 @@ void Compute_Polarization_Energy( reax_system *system, simulation_data *data )
data->my_en.e_pol += en_tmp;
/* tally into per-atom energy */
if( system->pair_ptr->evflag)
if (system->pair_ptr->evflag)
system->pair_ptr->ev_tally(i,i,system->n,1,0.0,en_tmp,0.0,0.0,0.0,0.0);
}
}

View File

@ -438,7 +438,7 @@ void Torsion_Angles( reax_system *system, control_params *control,
}
/* tally into per-atom virials */
if( system->pair_ptr->vflag_atom || system->pair_ptr->evflag) {
if (system->pair_ptr->vflag_atom || system->pair_ptr->evflag) {
// acquire vectors
rvec_ScaledSum( delil, 1., system->my_atoms[l].x,
@ -463,9 +463,9 @@ void Torsion_Angles( reax_system *system, control_params *control,
// tally
eng_tmp = e_tor + e_con;
if( system->pair_ptr->evflag)
if (system->pair_ptr->evflag)
system->pair_ptr->ev_tally(j,k,natoms,1,eng_tmp,0.0,0.0,0.0,0.0,0.0);
if( system->pair_ptr->vflag_atom)
if (system->pair_ptr->vflag_atom)
system->pair_ptr->v_tally4(i,j,k,l,fi_tmp,fj_tmp,fk_tmp,delil,deljl,delkl);
}
} // pl check ends

View File

@ -341,7 +341,7 @@ int Init_Traj( reax_system *system, control_params *control,
out_control->buffer = NULL;
/* write trajectory header and atom info, if applicable */
if( out_control->traj_method == REG_TRAJ) {
if (out_control->traj_method == REG_TRAJ) {
if (system->my_rank == MASTER_NODE)
out_control->strj = fopen( fname, "w" );
} else {

View File

@ -226,7 +226,7 @@ void Valence_Angles( reax_system *system, control_params *control,
++num_thb_intrs;
if( (j < system->n) && (BOA_jk > 0.0) &&
if ((j < system->n) && (BOA_jk > 0.0) &&
(bo_ij->BO > control->thb_cut) &&
(bo_jk->BO > control->thb_cut) &&
(bo_ij->BO * bo_jk->BO > control->thb_cutsq) ) {
@ -373,7 +373,7 @@ void Valence_Angles( reax_system *system, control_params *control,
}
/* tally into per-atom virials */
if( system->pair_ptr->vflag_atom || system->pair_ptr->evflag) {
if (system->pair_ptr->vflag_atom || system->pair_ptr->evflag) {
/* Acquire vectors */
rvec_ScaledSum( delij, 1., system->my_atoms[i].x,
@ -387,9 +387,9 @@ void Valence_Angles( reax_system *system, control_params *control,
eng_tmp = e_ang + e_pen + e_coa;
if( system->pair_ptr->evflag)
if (system->pair_ptr->evflag)
system->pair_ptr->ev_tally(j,j,system->N,1,eng_tmp,0.0,0.0,0.0,0.0,0.0);
if( system->pair_ptr->vflag_atom)
if (system->pair_ptr->vflag_atom)
system->pair_ptr->v_tally3(i,j,k,fi_tmp,fk_tmp,delij,delkj);
}
}