diff --git a/src/KOKKOS/fix_qeq_reax_kokkos.cpp b/src/KOKKOS/fix_qeq_reax_kokkos.cpp index 578afd2077..52a90eda01 100644 --- a/src/KOKKOS/fix_qeq_reax_kokkos.cpp +++ b/src/KOKKOS/fix_qeq_reax_kokkos.cpp @@ -1115,7 +1115,7 @@ int FixQEqReaxKokkos::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::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]; diff --git a/src/KOKKOS/pair_reaxc_kokkos.cpp b/src/KOKKOS/pair_reaxc_kokkos.cpp index 22e3e6b28f..d78927b79a 100644 --- a/src/KOKKOS/pair_reaxc_kokkos.cpp +++ b/src/KOKKOS/pair_reaxc_kokkos.cpp @@ -1534,7 +1534,7 @@ void PairReaxCKokkos::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::operator()(PairReaxBuildListsHalf, // 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::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::operator()(PairReaxComputeBond1= 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)); diff --git a/src/MANYBODY/pair_comb3.cpp b/src/MANYBODY/pair_comb3.cpp index 8e7a59d15f..d82f6dfed0 100644 --- a/src/MANYBODY/pair_comb3.cpp +++ b/src/MANYBODY/pair_comb3.cpp @@ -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,¶ms[iparam_ij]) * params[iparam_ij].pcross; if (icontrol == 2) xchtmp[i] += comb_fc(rr1,¶ms[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); diff --git a/src/MANYBODY/pair_lcbop.cpp b/src/MANYBODY/pair_lcbop.cpp index 7d683e8ed8..0c8b3ef2a6 100644 --- a/src/MANYBODY/pair_lcbop.cpp +++ b/src/MANYBODY/pair_lcbop.cpp @@ -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"); } /* ---------------------------------------------------------------------- diff --git a/src/MISC/xdr_compat.cpp b/src/MISC/xdr_compat.cpp index 0f4d73cdd9..2d8d0ce7e5 100644 --- a/src/MISC/xdr_compat.cpp +++ b/src/MISC/xdr_compat.cpp @@ -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 { diff --git a/src/MOLECULE/bond_gromos.cpp b/src/MOLECULE/bond_gromos.cpp index 279f4fb2d4..57091903af 100644 --- a/src/MOLECULE/bond_gromos.cpp +++ b/src/MOLECULE/bond_gromos.cpp @@ -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; } diff --git a/src/MOLECULE/bond_harmonic.cpp b/src/MOLECULE/bond_harmonic.cpp index f795610b37..fb4581d0d6 100644 --- a/src/MOLECULE/bond_harmonic.cpp +++ b/src/MOLECULE/bond_harmonic.cpp @@ -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; } diff --git a/src/QEQ/fix_qeq.cpp b/src/QEQ/fix_qeq.cpp index 49e0a6d423..ab412338d8 100644 --- a/src/QEQ/fix_qeq.cpp +++ b/src/QEQ/fix_qeq.cpp @@ -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]; diff --git a/src/QEQ/fix_qeq_dynamic.cpp b/src/QEQ/fix_qeq_dynamic.cpp index 1f1dd966f5..ba88f4f1c3 100644 --- a/src/QEQ/fix_qeq_dynamic.cpp +++ b/src/QEQ/fix_qeq_dynamic.cpp @@ -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]; diff --git a/src/QEQ/fix_qeq_fire.cpp b/src/QEQ/fix_qeq_fire.cpp index a8591c2b9b..1e3686f99c 100644 --- a/src/QEQ/fix_qeq_fire.cpp +++ b/src/QEQ/fix_qeq_fire.cpp @@ -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]; diff --git a/src/QEQ/fix_qeq_point.cpp b/src/QEQ/fix_qeq_point.cpp index 2afedbaa69..9517343974 100644 --- a/src/QEQ/fix_qeq_point.cpp +++ b/src/QEQ/fix_qeq_point.cpp @@ -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(); diff --git a/src/QEQ/fix_qeq_shielded.cpp b/src/QEQ/fix_qeq_shielded.cpp index 1c59474b47..7fe273fc40 100644 --- a/src/QEQ/fix_qeq_shielded.cpp +++ b/src/QEQ/fix_qeq_shielded.cpp @@ -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(); diff --git a/src/QEQ/fix_qeq_slater.cpp b/src/QEQ/fix_qeq_slater.cpp index 68edbd80f7..3443a519a2 100644 --- a/src/QEQ/fix_qeq_slater.cpp +++ b/src/QEQ/fix_qeq_slater.cpp @@ -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(); diff --git a/src/USER-MANIFOLD/fix_nve_manifold_rattle.cpp b/src/USER-MANIFOLD/fix_nve_manifold_rattle.cpp index e86b3c97ea..794a324f03 100644 --- a/src/USER-MANIFOLD/fix_nve_manifold_rattle.cpp +++ b/src/USER-MANIFOLD/fix_nve_manifold_rattle.cpp @@ -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] ); diff --git a/src/USER-MANIFOLD/fix_nvt_manifold_rattle.cpp b/src/USER-MANIFOLD/fix_nvt_manifold_rattle.cpp index 1e9d0015f1..a4eed66336 100644 --- a/src/USER-MANIFOLD/fix_nvt_manifold_rattle.cpp +++ b/src/USER-MANIFOLD/fix_nvt_manifold_rattle.cpp @@ -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; diff --git a/src/USER-MANIFOLD/manifold_gaussian_bump.cpp b/src/USER-MANIFOLD/manifold_gaussian_bump.cpp index c40f3c73bb..b9b7ae7279 100644 --- a/src/USER-MANIFOLD/manifold_gaussian_bump.cpp +++ b/src/USER-MANIFOLD/manifold_gaussian_bump.cpp @@ -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 diff --git a/src/USER-MANIFOLD/manifold_thylakoid_shared.cpp b/src/USER-MANIFOLD/manifold_thylakoid_shared.cpp index 78735421c7..1c6b4dd06a 100644 --- a/src/USER-MANIFOLD/manifold_thylakoid_shared.cpp +++ b/src/USER-MANIFOLD/manifold_thylakoid_shared.cpp @@ -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; diff --git a/src/USER-MESO/pair_edpd.cpp b/src/USER-MESO/pair_edpd.cpp index 5ed63a2a8b..1f6222944a 100644 --- a/src/USER-MESO/pair_edpd.cpp +++ b/src/USER-MESO/pair_edpd.cpp @@ -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]); diff --git a/src/USER-MESO/pair_tdpd.cpp b/src/USER-MESO/pair_tdpd.cpp index 821d8c0486..a41282c0d8 100644 --- a/src/USER-MESO/pair_tdpd.cpp +++ b/src/USER-MESO/pair_tdpd.cpp @@ -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; kbig_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(); diff --git a/src/USER-OMP/reaxc_bond_orders_omp.cpp b/src/USER-OMP/reaxc_bond_orders_omp.cpp index 7edc593aa2..33780f5e3f 100644 --- a/src/USER-OMP/reaxc_bond_orders_omp.cpp +++ b/src/USER-OMP/reaxc_bond_orders_omp.cpp @@ -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 diff --git a/src/USER-OMP/reaxc_init_md_omp.cpp b/src/USER-OMP/reaxc_init_md_omp.cpp index 4266c62a1c..bd15b3b9df 100644 --- a/src/USER-OMP/reaxc_init_md_omp.cpp +++ b/src/USER-OMP/reaxc_init_md_omp.cpp @@ -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 ); diff --git a/src/USER-OMP/reaxc_multi_body_omp.cpp b/src/USER-OMP/reaxc_multi_body_omp.cpp index e3fa568a33..7552e7a733 100644 --- a/src/USER-OMP/reaxc_multi_body_omp.cpp +++ b/src/USER-OMP/reaxc_multi_body_omp.cpp @@ -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); } diff --git a/src/USER-OMP/reaxc_nonbonded_omp.cpp b/src/USER-OMP/reaxc_nonbonded_omp.cpp index 128767202b..41b1474791 100644 --- a/src/USER-OMP/reaxc_nonbonded_omp.cpp +++ b/src/USER-OMP/reaxc_nonbonded_omp.cpp @@ -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); diff --git a/src/USER-OMP/reaxc_torsion_angles_omp.cpp b/src/USER-OMP/reaxc_torsion_angles_omp.cpp index 2b2ed3af4a..d290dc264f 100644 --- a/src/USER-OMP/reaxc_torsion_angles_omp.cpp +++ b/src/USER-OMP/reaxc_torsion_angles_omp.cpp @@ -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, diff --git a/src/USER-OMP/reaxc_valence_angles_omp.cpp b/src/USER-OMP/reaxc_valence_angles_omp.cpp index d4e07764d1..4164d39cab 100644 --- a/src/USER-OMP/reaxc_valence_angles_omp.cpp +++ b/src/USER-OMP/reaxc_valence_angles_omp.cpp @@ -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); } diff --git a/src/USER-QUIP/pair_quip.cpp b/src/USER-QUIP/pair_quip.cpp index 99c107bb84..fce6313754 100644 --- a/src/USER-QUIP/pair_quip.cpp +++ b/src/USER-QUIP/pair_quip.cpp @@ -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); diff --git a/src/USER-REAXC/pair_reaxc.cpp b/src/USER-REAXC/pair_reaxc.cpp index 1c8f4c1e11..4be85a58cd 100644 --- a/src/USER-REAXC/pair_reaxc.cpp +++ b/src/USER-REAXC/pair_reaxc.cpp @@ -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 diff --git a/src/USER-REAXC/reaxc_bond_orders.cpp b/src/USER-REAXC/reaxc_bond_orders.cpp index 11bb04bbbf..1ed58a0bfd 100644 --- a/src/USER-REAXC/reaxc_bond_orders.cpp +++ b/src/USER-REAXC/reaxc_bond_orders.cpp @@ -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); diff --git a/src/USER-REAXC/reaxc_bonds.cpp b/src/USER-REAXC/reaxc_bonds.cpp index b5ab91941f..48fb872324 100644 --- a/src/USER-REAXC/reaxc_bonds.cpp +++ b/src/USER-REAXC/reaxc_bonds.cpp @@ -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; diff --git a/src/USER-REAXC/reaxc_forces.cpp b/src/USER-REAXC/reaxc_forces.cpp index 721a88603e..19b3cc4975 100644 --- a/src/USER-REAXC/reaxc_forces.cpp +++ b/src/USER-REAXC/reaxc_forces.cpp @@ -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 ); } diff --git a/src/USER-REAXC/reaxc_init_md.cpp b/src/USER-REAXC/reaxc_init_md.cpp index c164c6f161..5901b76326 100644 --- a/src/USER-REAXC/reaxc_init_md.cpp +++ b/src/USER-REAXC/reaxc_init_md.cpp @@ -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 ); diff --git a/src/USER-REAXC/reaxc_multi_body.cpp b/src/USER-REAXC/reaxc_multi_body.cpp index 6991833799..f7d72a2678 100644 --- a/src/USER-REAXC/reaxc_multi_body.cpp +++ b/src/USER-REAXC/reaxc_multi_body.cpp @@ -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; diff --git a/src/USER-REAXC/reaxc_nonbonded.cpp b/src/USER-REAXC/reaxc_nonbonded.cpp index 6c912ace50..c13bc0d89f 100644 --- a/src/USER-REAXC/reaxc_nonbonded.cpp +++ b/src/USER-REAXC/reaxc_nonbonded.cpp @@ -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); } } diff --git a/src/USER-REAXC/reaxc_torsion_angles.cpp b/src/USER-REAXC/reaxc_torsion_angles.cpp index 9ff70e038d..ed76368d68 100644 --- a/src/USER-REAXC/reaxc_torsion_angles.cpp +++ b/src/USER-REAXC/reaxc_torsion_angles.cpp @@ -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 diff --git a/src/USER-REAXC/reaxc_traj.cpp b/src/USER-REAXC/reaxc_traj.cpp index 648719af4f..54d8b3219c 100644 --- a/src/USER-REAXC/reaxc_traj.cpp +++ b/src/USER-REAXC/reaxc_traj.cpp @@ -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 { diff --git a/src/USER-REAXC/reaxc_valence_angles.cpp b/src/USER-REAXC/reaxc_valence_angles.cpp index ae9367deff..af1f1f8003 100644 --- a/src/USER-REAXC/reaxc_valence_angles.cpp +++ b/src/USER-REAXC/reaxc_valence_angles.cpp @@ -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); } }