don't store topology information with ghost atoms. they will be ignored.

This commit is contained in:
Axel Kohlmeyer
2023-02-24 22:55:23 -05:00
parent 5a5a86684a
commit 73e7163ed6

View File

@ -320,8 +320,6 @@ void CreateBonds::many()
void CreateBonds::single_bond()
{
int m;
// check that 2 atoms exist
const int nlocal = atom->nlocal;
@ -342,7 +340,8 @@ void CreateBonds::single_bond()
int **bond_type = atom->bond_type;
tagint **bond_atom = atom->bond_atom;
if ((m = idx1) >= 0) {
int m = idx1;
if ((m >= 0) && (m < nlocal)) {
if (num_bond[m] == atom->bond_per_atom)
error->one(FLERR, "New bond exceeded bonds per atom in create_bonds");
bond_type[m][num_bond[m]] = btype;
@ -353,7 +352,8 @@ void CreateBonds::single_bond()
if (force->newton_bond) return;
if ((m = idx2) >= 0) {
m = idx2;
if ((m >= 0) && (m < nlocal)) {
if (num_bond[m] == atom->bond_per_atom)
error->one(FLERR, "New bond exceeded bonds per atom in create_bonds");
bond_type[m][num_bond[m]] = btype;
@ -366,8 +366,6 @@ void CreateBonds::single_bond()
void CreateBonds::single_angle()
{
int m;
// check that 3 atoms exist
const int nlocal = atom->nlocal;
@ -392,7 +390,8 @@ void CreateBonds::single_angle()
tagint **angle_atom2 = atom->angle_atom2;
tagint **angle_atom3 = atom->angle_atom3;
if ((m = idx2) >= 0) {
int m = idx2;
if ((m >= 0) && (m < nlocal)) {
if (num_angle[m] == atom->angle_per_atom)
error->one(FLERR, "New angle exceeded angles per atom in create_bonds");
angle_type[m][num_angle[m]] = atype;
@ -405,7 +404,8 @@ void CreateBonds::single_angle()
if (force->newton_bond) return;
if ((m = idx1) >= 0) {
m = idx1;
if ((m >= 0) && (m < nlocal)) {
if (num_angle[m] == atom->angle_per_atom)
error->one(FLERR, "New angle exceeded angles per atom in create_bonds");
angle_type[m][num_angle[m]] = atype;
@ -415,7 +415,8 @@ void CreateBonds::single_angle()
num_angle[m]++;
}
if ((m = idx3) >= 0) {
m = idx3;
if ((m >= 0) && (m < nlocal)) {
if (num_angle[m] == atom->angle_per_atom)
error->one(FLERR, "New angle exceeded angles per atom in create_bonds");
angle_type[m][num_angle[m]] = atype;
@ -430,8 +431,6 @@ void CreateBonds::single_angle()
void CreateBonds::single_dihedral()
{
int m;
// check that 4 atoms exist
const int nlocal = atom->nlocal;
@ -459,7 +458,8 @@ void CreateBonds::single_dihedral()
tagint **dihedral_atom3 = atom->dihedral_atom3;
tagint **dihedral_atom4 = atom->dihedral_atom4;
if ((m = idx2) >= 0) {
int m = idx2;
if ((m >= 0) && (m < nlocal)) {
if (num_dihedral[m] == atom->dihedral_per_atom)
error->one(FLERR, "New dihedral exceeded dihedrals per atom in create_bonds");
dihedral_type[m][num_dihedral[m]] = dtype;
@ -473,7 +473,8 @@ void CreateBonds::single_dihedral()
if (force->newton_bond) return;
if ((m = idx1) >= 0) {
m = idx1;
if ((m >= 0) && (m < nlocal)) {
if (num_dihedral[m] == atom->dihedral_per_atom)
error->one(FLERR, "New dihedral exceeded dihedrals per atom in create_bonds");
dihedral_type[m][num_dihedral[m]] = dtype;
@ -484,7 +485,8 @@ void CreateBonds::single_dihedral()
num_dihedral[m]++;
}
if ((m = idx3) >= 0) {
m = idx3;
if ((m >= 0) && (m < nlocal)) {
if (num_dihedral[m] == atom->dihedral_per_atom)
error->one(FLERR, "New dihedral exceeded dihedrals per atom in create_bonds");
dihedral_type[m][num_dihedral[m]] = dtype;
@ -495,7 +497,8 @@ void CreateBonds::single_dihedral()
num_dihedral[m]++;
}
if ((m = idx4) >= 0) {
m = idx4;
if ((m >= 0) && (m < nlocal)) {
if (num_dihedral[m] == atom->dihedral_per_atom)
error->one(FLERR, "New dihedral exceeded dihedrals per atom in create_bonds");
dihedral_type[m][num_dihedral[m]] = dtype;
@ -511,8 +514,6 @@ void CreateBonds::single_dihedral()
void CreateBonds::single_improper()
{
int m;
// check that 4 atoms exist
const int nlocal = atom->nlocal;
@ -540,7 +541,8 @@ void CreateBonds::single_improper()
tagint **improper_atom3 = atom->improper_atom3;
tagint **improper_atom4 = atom->improper_atom4;
if ((m = idx2) >= 0) {
int m = idx2;
if ((m >= 0) && (m < nlocal)) {
if (num_improper[m] == atom->improper_per_atom)
error->one(FLERR, "New improper exceeded impropers per atom in create_bonds");
improper_type[m][num_improper[m]] = dtype;
@ -554,7 +556,8 @@ void CreateBonds::single_improper()
if (force->newton_bond) return;
if ((m = idx1) >= 0) {
m = idx1;
if ((m >= 0) && (m < nlocal)) {
if (num_improper[m] == atom->improper_per_atom)
error->one(FLERR, "New improper exceeded impropers per atom in create_bonds");
improper_type[m][num_improper[m]] = dtype;
@ -565,7 +568,8 @@ void CreateBonds::single_improper()
num_improper[m]++;
}
if ((m = idx3) >= 0) {
m = idx3;
if ((m >= 0) && (m < nlocal)) {
if (num_improper[m] == atom->improper_per_atom)
error->one(FLERR, "New improper exceeded impropers per atom in create_bonds");
improper_type[m][num_improper[m]] = dtype;
@ -576,7 +580,8 @@ void CreateBonds::single_improper()
num_improper[m]++;
}
if ((m = idx4) >= 0) {
m = idx4;
if ((m >= 0) && (m < nlocal)) {
if (num_improper[m] == atom->improper_per_atom)
error->one(FLERR, "New improper exceeded impropers per atom in create_bonds");
improper_type[m][num_improper[m]] = dtype;