Merge pull request #3285 from akohlmey/clang-format-clang-tidy
Apply clang-tidy and clang-format to update/modernize/simplify recently modified code
This commit is contained in:
@ -117,7 +117,7 @@ void colvarproxy_lammps::init(const char *conf_file)
|
||||
if (_lmp->update->ntimestep != 0) {
|
||||
cvm::log("Setting initial step number from LAMMPS: "+
|
||||
cvm::to_str(_lmp->update->ntimestep)+"\n");
|
||||
colvars->it = colvars->it_restart =
|
||||
colvarmodule::it = colvarmodule::it_restart =
|
||||
static_cast<cvm::step_number>(_lmp->update->ntimestep);
|
||||
}
|
||||
|
||||
@ -174,7 +174,7 @@ double colvarproxy_lammps::compute()
|
||||
} else {
|
||||
// Use the time step number from LAMMPS Update object
|
||||
if (_lmp->update->ntimestep - previous_step == 1) {
|
||||
colvars->it++;
|
||||
colvarmodule::it++;
|
||||
b_simulation_continuing = false;
|
||||
} else {
|
||||
// Cases covered by this condition:
|
||||
@ -209,7 +209,7 @@ double colvarproxy_lammps::compute()
|
||||
|
||||
if (cvm::debug()) {
|
||||
cvm::log(std::string(cvm::line_marker)+
|
||||
"colvarproxy_lammps, step no. "+cvm::to_str(colvars->it)+"\n"+
|
||||
"colvarproxy_lammps, step no. "+cvm::to_str(colvarmodule::it)+"\n"+
|
||||
"Updating internal data.\n");
|
||||
}
|
||||
|
||||
@ -269,7 +269,7 @@ cvm::rvector colvarproxy_lammps::position_distance(cvm::atom_pos const &pos1,
|
||||
double ytmp = pos2.y - pos1.y;
|
||||
double ztmp = pos2.z - pos1.z;
|
||||
_lmp->domain->minimum_image(xtmp,ytmp,ztmp);
|
||||
return cvm::rvector(xtmp, ytmp, ztmp);
|
||||
return {xtmp, ytmp, ztmp};
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -135,8 +135,6 @@ static void rebuild_table_int(inthash_t *tptr) {
|
||||
|
||||
/* free memory used by old table */
|
||||
free(old_bucket);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -166,8 +164,6 @@ void inthash_init(inthash_t *tptr, int buckets) {
|
||||
|
||||
/* allocate memory for table */
|
||||
tptr->bucket=(inthash_node_t **) calloc(tptr->size, sizeof(inthash_node_t *));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -847,7 +843,6 @@ void FixColvars::post_force_respa(int vflag, int ilevel, int /*iloop*/)
|
||||
{
|
||||
/* only process colvar forces on the outmost RESPA level. */
|
||||
if (ilevel == nlevels_respa-1) post_force(vflag);
|
||||
return;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
@ -939,7 +934,7 @@ void FixColvars::end_of_step()
|
||||
void FixColvars::write_restart(FILE *fp)
|
||||
{
|
||||
if (me == 0) {
|
||||
std::string rest_text("");
|
||||
std::string rest_text;
|
||||
proxy->serialize_status(rest_text);
|
||||
// TODO call write_output_files()
|
||||
const char *cvm_state = rest_text.c_str();
|
||||
|
||||
@ -76,7 +76,7 @@ void Ndx2Group::command(int narg, char **arg)
|
||||
int len;
|
||||
bigint num;
|
||||
FILE *fp;
|
||||
std::string name = "", next;
|
||||
std::string name, next;
|
||||
|
||||
if (narg < 1) error->all(FLERR,"Illegal ndx2group command");
|
||||
if (atom->tag_enable == 0)
|
||||
|
||||
@ -40,7 +40,7 @@ using namespace MathConst;
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
EwaldElectrode::EwaldElectrode(LAMMPS *lmp) : Ewald(lmp), ElectrodeKSpace()
|
||||
EwaldElectrode::EwaldElectrode(LAMMPS *lmp) : Ewald(lmp)
|
||||
{
|
||||
eikr_step = -1;
|
||||
}
|
||||
|
||||
@ -65,8 +65,7 @@ enum { FORWARD_IK, FORWARD_AD, FORWARD_IK_PERATOM, FORWARD_AD_PERATOM };
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
PPPMElectrode::PPPMElectrode(LAMMPS *lmp) :
|
||||
PPPM(lmp), ElectrodeKSpace(), electrolyte_density_brick(nullptr),
|
||||
electrolyte_density_fft(nullptr)
|
||||
PPPM(lmp), electrolyte_density_brick(nullptr), electrolyte_density_fft(nullptr)
|
||||
{
|
||||
group_group_enable = 0;
|
||||
electrolyte_density_brick = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user