enable and apply clang-format
This commit is contained in:
@ -1,4 +1,3 @@
|
||||
// clang-format off
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
https://www.lammps.org/, Sandia National Laboratories
|
||||
@ -15,14 +14,13 @@
|
||||
#include "ntopo_improper_all.h"
|
||||
|
||||
#include "atom.h"
|
||||
#include "force.h"
|
||||
#include "domain.h"
|
||||
#include "update.h"
|
||||
#include "error.h"
|
||||
#include "force.h"
|
||||
#include "memory.h"
|
||||
#include "output.h"
|
||||
#include "thermo.h"
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
|
||||
#include "update.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
@ -39,7 +37,7 @@ NTopoImproperAll::NTopoImproperAll(LAMMPS *lmp) : NTopo(lmp)
|
||||
|
||||
void NTopoImproperAll::build()
|
||||
{
|
||||
int i,m,atom1,atom2,atom3,atom4;
|
||||
int i, m, atom1, atom2, atom3, atom4;
|
||||
|
||||
int nlocal = atom->nlocal;
|
||||
int *num_improper = atom->num_improper;
|
||||
@ -63,22 +61,19 @@ void NTopoImproperAll::build()
|
||||
if (atom1 == -1 || atom2 == -1 || atom3 == -1 || atom4 == -1) {
|
||||
nmissing++;
|
||||
if (lostbond == Thermo::ERROR)
|
||||
error->one(FLERR,"Improper atoms {} {} {} {} missing on "
|
||||
"proc {} at step {}",
|
||||
improper_atom1[i][m],improper_atom2[i][m],
|
||||
improper_atom3[i][m],improper_atom4[i][m],
|
||||
me,update->ntimestep);
|
||||
error->one(FLERR, "Improper atoms {} {} {} {} missing on proc {} at step {}",
|
||||
improper_atom1[i][m], improper_atom2[i][m], improper_atom3[i][m],
|
||||
improper_atom4[i][m], me, update->ntimestep);
|
||||
continue;
|
||||
}
|
||||
atom1 = domain->closest_image(i,atom1);
|
||||
atom2 = domain->closest_image(i,atom2);
|
||||
atom3 = domain->closest_image(i,atom3);
|
||||
atom4 = domain->closest_image(i,atom4);
|
||||
if (newton_bond ||
|
||||
(i <= atom1 && i <= atom2 && i <= atom3 && i <= atom4)) {
|
||||
atom1 = domain->closest_image(i, atom1);
|
||||
atom2 = domain->closest_image(i, atom2);
|
||||
atom3 = domain->closest_image(i, atom3);
|
||||
atom4 = domain->closest_image(i, atom4);
|
||||
if (newton_bond || (i <= atom1 && i <= atom2 && i <= atom3 && i <= atom4)) {
|
||||
if (nimproperlist == maximproper) {
|
||||
maximproper += DELTA;
|
||||
memory->grow(improperlist,maximproper,5,"neigh_topo:improperlist");
|
||||
memory->grow(improperlist, maximproper, 5, "neigh_topo:improperlist");
|
||||
}
|
||||
improperlist[nimproperlist][0] = atom1;
|
||||
improperlist[nimproperlist][1] = atom2;
|
||||
@ -89,11 +84,11 @@ void NTopoImproperAll::build()
|
||||
}
|
||||
}
|
||||
|
||||
if (cluster_check) dihedral_check(nimproperlist,improperlist);
|
||||
if (cluster_check) dihedral_check(nimproperlist, improperlist);
|
||||
if (lostbond == Thermo::IGNORE) return;
|
||||
|
||||
int all;
|
||||
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);
|
||||
MPI_Allreduce(&nmissing, &all, 1, MPI_INT, MPI_SUM, world);
|
||||
if (all && (me == 0))
|
||||
error->warning(FLERR,"Improper atoms missing at step {}",update->ntimestep);
|
||||
error->warning(FLERR, "Improper atoms missing at step {}", update->ntimestep);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user