consistently skip over computing interactions with atoms set to NULL in hybrid styles
This commit is contained in:
@ -99,6 +99,7 @@ namespace ReaxFF {
|
||||
/* set the pointers */
|
||||
type_i = system->my_atoms[i].type;
|
||||
type_j = system->my_atoms[j].type;
|
||||
if ((type_i < 0) || (type_j < 0)) continue;
|
||||
sbp_i = &(system->reax_param.sbp[type_i]);
|
||||
sbp_j = &(system->reax_param.sbp[type_j]);
|
||||
twbp = &(system->reax_param.tbp[type_i][type_j]);
|
||||
|
||||
@ -265,6 +265,7 @@ namespace ReaxFF {
|
||||
for (int i = 0; i < system->N; ++i) {
|
||||
atom_i = &(system->my_atoms[i]);
|
||||
type_i = atom_i->type;
|
||||
if (type_i < 0) continue;
|
||||
sbp_i = &(system->reax_param.sbp[type_i]);
|
||||
|
||||
start_i = Start_Index(i, far_nbrs);
|
||||
@ -276,6 +277,7 @@ namespace ReaxFF {
|
||||
int j = nbr_pj->nbr;
|
||||
atom_j = &(system->my_atoms[j]);
|
||||
type_j = atom_j->type;
|
||||
if (type_j < 0) continue;
|
||||
sbp_j = &(system->reax_param.sbp[type_j]);
|
||||
twbp = &(system->reax_param.tbp[type_i][type_j]);
|
||||
|
||||
@ -376,6 +378,7 @@ namespace ReaxFF {
|
||||
for (int i = 0; i < system->n; ++i) {
|
||||
atom_i = &(system->my_atoms[i]);
|
||||
type_i = atom_i->type;
|
||||
if (type_i < 0) continue;
|
||||
sbp_i = &(system->reax_param.sbp[type_i]);
|
||||
ihb = sbp_i->p_hbond;
|
||||
|
||||
|
||||
@ -98,14 +98,14 @@ namespace ReaxFF {
|
||||
// for (j = 0; j < system->n; ++j)
|
||||
for (j = ifrom; j < ito; ++j) {
|
||||
/* j has to be of type H */
|
||||
if (system->reax_param.sbp[system->my_atoms[j].type].p_hbond == 1) {
|
||||
type_j = system->my_atoms[j].type;
|
||||
if (type_j < 0) continue;
|
||||
if (system->reax_param.sbp[type_j].p_hbond == 1) {
|
||||
/*set j's variables */
|
||||
type_j = system->my_atoms[j].type;
|
||||
start_j = Start_Index(j, bonds);
|
||||
end_j = End_Index(j, bonds);
|
||||
hb_start_j = Start_Index(system->my_atoms[j].Hindex, hbonds);
|
||||
hb_end_j = End_Index(system->my_atoms[j].Hindex, hbonds);
|
||||
if (type_j < 0) continue;
|
||||
|
||||
top = 0;
|
||||
for (pi = start_j; pi < end_j; ++pi) {
|
||||
|
||||
@ -75,6 +75,7 @@ namespace ReaxFF {
|
||||
/* set the pointers */
|
||||
type_i = system->my_atoms[i].type;
|
||||
type_j = system->my_atoms[j].type;
|
||||
if ((type_i < 0) || (type_j < 0)) continue;
|
||||
sbp_i = &(system->reax_param.sbp[type_i]);
|
||||
sbp_j = &(system->reax_param.sbp[type_j]);
|
||||
twbp = &(system->reax_param.tbp[type_i][type_j]);
|
||||
|
||||
@ -59,14 +59,14 @@ namespace ReaxFF {
|
||||
hbonds = (*lists) + HBONDS;
|
||||
hbond_list = hbonds->select.hbond_list;
|
||||
|
||||
for (j = 0; j < system->n; ++j)
|
||||
if ((system->my_atoms[j].type >= 0) && (system->reax_param.sbp[system->my_atoms[j].type].p_hbond == 1)) {
|
||||
type_j = system->my_atoms[j].type;
|
||||
for (j = 0; j < system->n; ++j) {
|
||||
type_j = system->my_atoms[j].type;
|
||||
if (type_j < 0) continue;
|
||||
if (system->reax_param.sbp[type_j].p_hbond == 1) {
|
||||
start_j = Start_Index(j, bonds);
|
||||
end_j = End_Index(j, bonds);
|
||||
hb_start_j = Start_Index(system->my_atoms[j].Hindex, hbonds);
|
||||
hb_end_j = End_Index(system->my_atoms[j].Hindex, hbonds);
|
||||
if (type_j < 0) continue;
|
||||
|
||||
top = 0;
|
||||
for (pi = start_j; pi < end_j; ++pi) {
|
||||
@ -154,5 +154,6 @@ namespace ReaxFF {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -56,7 +56,8 @@ namespace ReaxFF {
|
||||
if (control->hbond_cut > 0)
|
||||
for (i = 0; i < system->n; ++i) {
|
||||
atom = &(system->my_atoms[i]);
|
||||
if ((atom->type >= 0) && (system->reax_param.sbp[atom->type].p_hbond == 1 && atom->type >= 0))
|
||||
if ((atom->type >= 0)
|
||||
&& (system->reax_param.sbp[atom->type].p_hbond == 1 && atom->type >= 0))
|
||||
atom->Hindex = system->numH++;
|
||||
else atom->Hindex = -1;
|
||||
}
|
||||
|
||||
@ -233,8 +233,8 @@ namespace ReaxFF {
|
||||
flag = 0;
|
||||
|
||||
/* kinetic energy terms */
|
||||
double xcut = 0.5 * ( system->reax_param.sbp[ system->my_atoms[i].type ].bcut_acks2
|
||||
+ system->reax_param.sbp[ system->my_atoms[j].type ].bcut_acks2 );
|
||||
double xcut = 0.5 * (system->reax_param.sbp[system->my_atoms[i].type].bcut_acks2
|
||||
+ system->reax_param.sbp[system->my_atoms[j].type].bcut_acks2);
|
||||
|
||||
if(nbr_pj->d <= xcut) {
|
||||
if (j < natoms) flag = 1;
|
||||
@ -409,8 +409,8 @@ namespace ReaxFF {
|
||||
flag = 0;
|
||||
|
||||
/* kinetic energy terms */
|
||||
double xcut = 0.5 * ( system->reax_param.sbp[ system->my_atoms[i].type ].bcut_acks2
|
||||
+ system->reax_param.sbp[ system->my_atoms[j].type ].bcut_acks2 );
|
||||
double xcut = 0.5 * (system->reax_param.sbp[ system->my_atoms[i].type ].bcut_acks2
|
||||
+ system->reax_param.sbp[ system->my_atoms[j].type ].bcut_acks2);
|
||||
|
||||
if(nbr_pj->d <= xcut) {
|
||||
if (j < natoms) flag = 1;
|
||||
|
||||
Reference in New Issue
Block a user