Skip to content
Snippets Groups Projects
Commit 2707fc65 authored by Kurt A. O'Hearn's avatar Kurt A. O'Hearn
Browse files

sPuReMD: fix masking charge constraints for QMMM interface.

parent 7e4e4600
No related branches found
No related tags found
No related merge requests found
...@@ -1521,7 +1521,17 @@ static void EE( reax_system * const system, control_params * const control, ...@@ -1521,7 +1521,17 @@ static void EE( reax_system * const system, control_params * const control,
workspace->s[0][i] = system->atoms[i].q_init; workspace->s[0][i] = system->atoms[i].q_init;
workspace->mask_qmmm[i] = system->atoms[i].qmmm_mask; workspace->mask_qmmm[i] = system->atoms[i].qmmm_mask;
} }
workspace->mask_qmmm[system->N_cm - 1] = 1; if ( system->num_molec_charge_constraints == 0 )
{
workspace->mask_qmmm[system->N_cm - 1] = 1.0;
}
else
{
for ( int i = 0; i < system->num_molec_charge_constraints; ++i )
{
workspace->mask_qmmm[system->N + i] = 1.0;
}
}
/* Mask the b vector as well */ /* Mask the b vector as well */
Vector_Mask_qmmm( workspace->b_s, workspace->mask_qmmm, system->N_cm ); Vector_Mask_qmmm( workspace->b_s, workspace->mask_qmmm, system->N_cm );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment