diff --git a/sPuReMD/src/forces.c b/sPuReMD/src/forces.c index bb62157341d982b5ea1ffabfbbeacc5254268fea..6e2fc638af30e704e420b227204fb5e6d123a471 100644 --- a/sPuReMD/src/forces.c +++ b/sPuReMD/src/forces.c @@ -498,7 +498,7 @@ static void Init_Charge_Matrix_Remaining_Entries( reax_system *system, for ( i = 0; i < system->N_cm - 1; ++i ) { - #if defined(QMMM) +#if defined(QMMM) // total charge constraint on QM atoms if ( system->atoms[i].qmmm_mask == TRUE ) { @@ -508,16 +508,17 @@ static void Init_Charge_Matrix_Remaining_Entries( reax_system *system, H_sp->j[*H_sp_top] = i; H_sp->val[*H_sp_top] = 1.0; } - else { + else + { H->j[*Htop] = i; H->val[*Htop] = 0.0; - + H_sp->j[*H_sp_top] = i; H_sp->val[*H_sp_top] = 0.0; } *Htop = *Htop + 1; *H_sp_top = *H_sp_top + 1; - #else +#else H->j[*Htop] = i; H->val[*Htop] = 1.0; *Htop = *Htop + 1; @@ -525,7 +526,7 @@ static void Init_Charge_Matrix_Remaining_Entries( reax_system *system, H_sp->j[*H_sp_top] = i; H_sp->val[*H_sp_top] = 1.0; *H_sp_top = *H_sp_top + 1; - #endif +#endif } H->j[*Htop] = system->N_cm - 1; @@ -877,10 +878,11 @@ static void Init_Forces( reax_system *system, control_params *control, ++H_sp_top; } } - #if defined(QMMM) - if ( system->atoms[i].qmmm_mask == TRUE && system->atoms[j].qmmm_mask == TRUE ) - { - #endif +#if defined(QMMM) + if ( system->atoms[i].qmmm_mask == TRUE + && system->atoms[j].qmmm_mask == TRUE ) + { +#endif /* hydrogen bond lists */ if ( control->hbond_cut > 0.0 && (ihb == H_ATOM || ihb == H_BONDING_ATOM) @@ -1025,7 +1027,7 @@ static void Init_Forces( reax_system *system, control_params *control, } } #if defined(QMMM) - } + } #endif }