Skip to content

Commit 6e7559f

Browse files
committed
Integrate change to stream access
1 parent 08717bb commit 6e7559f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/colvarbias_meta.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ int colvarbias_meta::init_interval_params(std::string const &conf)
569569
std::vector<int> interval_ulimit_cv;
570570
size_t i;
571571
size_t j;
572-
// allocate accessory variable of colvar values to be used in energy and forces calculation
572+
// allocate accessory variable of colvar values to be used in energy and forces calculation
573573
curr_values.resize(num_variables());
574574
for (i = 0; i < num_variables(); i++) {
575575
curr_values[i].type(variables(i)->value());
@@ -908,10 +908,10 @@ int colvarbias_meta::reflect_hill_multid(cvm::real const &h_scale)
908908

909909
case multiple_replicas:
910910
add_hill(hill(cvm::step_absolute(), hill_weight*h_scale, curr_cv_values, colvar_sigmas, replica_id));
911-
std::ostream *replica_hills_os =
912-
cvm::proxy->get_output_stream(replica_hills_file);
911+
std::ostream &replica_hills_os =
912+
cvm::proxy->output_stream(replica_hills_file);
913913
if (replica_hills_os) {
914-
*replica_hills_os << hills.back();
914+
replica_hills_os << hills.back();
915915
} else {
916916
return cvm::error("Error: in metadynamics bias \""+this->name+"\""+
917917
((comm != single_replica) ? ", replica \""+replica_id+"\"" : "")+
@@ -1328,7 +1328,7 @@ int colvarbias_meta::calc_forces(std::vector<colvarvalue> const *values)
13281328
curr_bin = hills_energy->get_colvars_index_bound(curr_values);
13291329
} else {
13301330
curr_bin = hills_energy->get_colvars_index(curr_values);
1331-
}
1331+
}
13321332

13331333
if (hills_energy->index_ok(curr_bin)) {
13341334
for (ir = 0; ir < replicas.size(); ir++) {
@@ -1493,9 +1493,9 @@ void colvarbias_meta::project_hills(colvarbias_meta::hill_iter h_first,
14931493
colvarbias_meta::hill_iter h_last,
14941494
colvar_grid_scalar *he,
14951495
colvar_grid_gradient *hg,
1496-
std::vector<int> const &w_int_llimit_cv,
1496+
std::vector<int> const &w_int_llimit_cv,
14971497
std::vector<int> const &w_int_ulimit_cv,
1498-
std::vector<cvm::real> const &int_llimit,
1498+
std::vector<cvm::real> const &int_llimit,
14991499
std::vector<cvm::real> const &int_ulimit,
15001500
bool print_progress)
15011501
{
@@ -2105,7 +2105,7 @@ std::istream & colvarbias_meta::read_state_data(std::istream& is)
21052105
cvm::to_str(hills.size())+" hills (this may take a while)...\n");
21062106
project_hills(hills.begin(), hills.end(),
21072107
new_hills_energy, new_hills_energy_gradients,
2108-
which_int_llimit_cv, which_int_ulimit_cv,
2108+
which_int_llimit_cv, which_int_ulimit_cv,
21092109
interval_llimit, interval_ulimit, true);
21102110
cvm::log("rebinning done.\n");
21112111

0 commit comments

Comments
 (0)