modernize in colvars package
This commit is contained in:
@ -89,7 +89,7 @@ class colvarproxy_lammps : public colvarproxy {
|
||||
cvm::rvector position_distance(cvm::atom_pos const &pos1,
|
||||
cvm::atom_pos const &pos2) const override;
|
||||
|
||||
cvm::real rand_gaussian(void) override { return _random->gaussian(); };
|
||||
cvm::real rand_gaussian() override { return _random->gaussian(); };
|
||||
|
||||
int init_atom(int atom_number) override;
|
||||
int check_atom_id(int atom_number) override;
|
||||
|
||||
@ -293,7 +293,7 @@ void FixColvars::set_thermostat_temperature()
|
||||
error->one(FLERR, "Could not find thermostat fix ID {}", tfix_name);
|
||||
}
|
||||
int tmp = 0;
|
||||
double *tt = reinterpret_cast<double *>(tstat_fix->extract("t_target", tmp));
|
||||
auto *tt = reinterpret_cast<double *>(tstat_fix->extract("t_target", tmp));
|
||||
if (tt) {
|
||||
t_target = *tt;
|
||||
} else {
|
||||
@ -492,7 +492,6 @@ void FixColvars::setup(int vflag)
|
||||
|
||||
if (me == 0) {
|
||||
|
||||
std::vector<int> const &id = *(proxy->get_atom_ids());
|
||||
std::vector<int> &tp = *(proxy->modify_atom_types());
|
||||
std::vector<cvm::atom_pos> &cd = *(proxy->modify_atom_positions());
|
||||
std::vector<cvm::rvector> &of = *(proxy->modify_atom_total_forces());
|
||||
@ -898,7 +897,7 @@ void FixColvars::restart(char *buf)
|
||||
if (comm->me == 0) {
|
||||
// Read the buffer's length, then load it into Colvars starting right past that location
|
||||
int length = *(reinterpret_cast<int *>(buf));
|
||||
unsigned char *colvars_state_buffer = reinterpret_cast<unsigned char *>(buf + sizeof(int));
|
||||
auto *colvars_state_buffer = reinterpret_cast<unsigned char *>(buf + sizeof(int));
|
||||
if (proxy->colvars->set_input_state_buffer(length, colvars_state_buffer) != COLVARS_OK) {
|
||||
error->all(FLERR, "Failed to set the Colvars input state from string buffer");
|
||||
}
|
||||
@ -928,7 +927,7 @@ double FixColvars::compute_scalar()
|
||||
/* local memory usage. approximately. */
|
||||
double FixColvars::memory_usage()
|
||||
{
|
||||
double bytes = (double) (num_coords * (2*sizeof(int)+3*sizeof(double)));
|
||||
auto bytes = (double) (num_coords * (2*sizeof(int)+3*sizeof(double)));
|
||||
bytes += (double) (nmax*size_one) + sizeof(*this);
|
||||
return bytes;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user