@@ -143,7 +143,7 @@ int colvarbias_opes::init(const std::string& conf) {
143143 }
144144 if (m_explore) {
145145 for (size_t i = 0 ; i < num_variables (); ++i) {
146- m_sigma0[i] *= std ::sqrt (m_biasfactor);
146+ m_sigma0[i] *= cvm ::sqrt (m_biasfactor);
147147 }
148148 }
149149 }
@@ -158,22 +158,22 @@ int colvarbias_opes::init(const std::string& conf) {
158158 }
159159 }
160160 }
161- get_keyval (conf, " epsilon" , m_epsilon, std ::exp (-m_barrier/m_bias_prefactor/m_kbt));
161+ get_keyval (conf, " epsilon" , m_epsilon, cvm ::exp (-m_barrier/m_bias_prefactor/m_kbt));
162162 if (m_epsilon <= 0 ) {
163163 return cvm::error (" you must choose a value of epsilon greater than zero" );
164164 }
165- m_sum_weights = std ::pow (m_epsilon, m_bias_prefactor);
165+ m_sum_weights = cvm ::pow (m_epsilon, m_bias_prefactor);
166166 m_sum_weights2 = m_sum_weights * m_sum_weights;
167167 if (m_explore) {
168- get_keyval (conf, " kernelCutoff" , m_cutoff, std ::sqrt (2.0 *m_barrier/m_kbt));
168+ get_keyval (conf, " kernelCutoff" , m_cutoff, cvm ::sqrt (2.0 *m_barrier/m_kbt));
169169 } else {
170- get_keyval (conf, " kernelCutoff" , m_cutoff, std ::sqrt (2.0 *m_barrier/m_bias_prefactor/m_kbt));
170+ get_keyval (conf, " kernelCutoff" , m_cutoff, cvm ::sqrt (2.0 *m_barrier/m_bias_prefactor/m_kbt));
171171 }
172172 if (m_cutoff <= 0 ) {
173173 return cvm::error (" you must choose a value of kernelCutoff greater than zero" );
174174 }
175175 m_cutoff2 = m_cutoff * m_cutoff;
176- m_val_at_cutoff = std ::exp (-0.5 * m_cutoff2);
176+ m_val_at_cutoff = cvm ::exp (-0.5 * m_cutoff2);
177177 get_keyval (conf, " compressionThreshold" , m_compression_threshold, 1 );
178178 if (m_compression_threshold != 0 ) {
179179 if (m_compression_threshold < 0 || m_compression_threshold > m_cutoff) {
@@ -196,7 +196,7 @@ int colvarbias_opes::init(const std::string& conf) {
196196 if (nlist_param[0 ] <= 1.0 ) {
197197 return cvm::error (" the first of neighborListParam must be greater than 1.0. The smaller the first, the smaller should be the second as well" , COLVARS_INPUT_ERROR);
198198 }
199- const cvm::real min_PARAM_1 = (1 .-1 ./std ::sqrt (nlist_param[0 ]))+0.16 ;
199+ const cvm::real min_PARAM_1 = (1 .-1 ./cvm ::sqrt (nlist_param[0 ]))+0.16 ;
200200 if (nlist_param[1 ] <= 0 ) {
201201 return cvm::error (" the second of neighborListParam must be greater than 0" , COLVARS_INPUT_ERROR);
202202 }
@@ -333,7 +333,7 @@ void colvarbias_opes::showInfo() const {
333333 }
334334 if (m_adaptive_sigma) {
335335 printInfo (" adaptive sigma will be used, with adaptiveSigmaStride = " , cvm::to_str (m_adaptive_sigma_stride));
336- size_t x = std ::ceil (m_adaptive_sigma_stride / m_pace);
336+ size_t x = cvm ::ceil (m_adaptive_sigma_stride / m_pace);
337337 printInfo (" thus the first x kernel depositions will be skipped, x = adaptiveSigmaStride/newHillFrequency = " , cvm::to_str (x));
338338 } else {
339339 std::string sigmas;
@@ -393,7 +393,7 @@ cvm::real colvarbias_opes::evaluateKernel(
393393 return 0 ;
394394 }
395395 }
396- return G.m_height * (std ::exp (-0.5 * norm2) - m_val_at_cutoff);
396+ return G.m_height * (cvm ::exp (-0.5 * norm2) - m_val_at_cutoff);
397397}
398398
399399cvm::real colvarbias_opes::evaluateKernel (
@@ -409,7 +409,7 @@ cvm::real colvarbias_opes::evaluateKernel(
409409 return 0 ;
410410 }
411411 }
412- const cvm::real val = G.m_height * (std ::exp (-0.5 * norm2) - m_val_at_cutoff);
412+ const cvm::real val = G.m_height * (cvm ::exp (-0.5 * norm2) - m_val_at_cutoff);
413413 // The derivative of norm2 with respect to x
414414 for (size_t i = 0 ; i < num_variables (); ++i) {
415415 accumulated_derivative[i] -= val * dist[i] / G.m_sigma [i];
@@ -674,7 +674,7 @@ int colvarbias_opes::update_opes() {
674674 m_av_M2[i] *= m_biasfactor;
675675 }
676676 for (size_t i = 0 ; i < num_variables (); ++i) {
677- m_sigma0[i] = std ::sqrt (m_av_M2[i] / m_adaptive_counter / factor);
677+ m_sigma0[i] = cvm ::sqrt (m_av_M2[i] / m_adaptive_counter / factor);
678678 }
679679 if (m_sigma_min.size () == 0 ) {
680680 for (size_t i = 0 ; i < num_variables (); ++i) {
@@ -690,7 +690,7 @@ int colvarbias_opes::update_opes() {
690690 }
691691 }
692692 for (size_t i = 0 ; i < num_variables (); ++i) {
693- sigma[i] = std ::sqrt (m_av_M2[i] / m_adaptive_counter / factor);
693+ sigma[i] = cvm ::sqrt (m_av_M2[i] / m_adaptive_counter / factor);
694694 }
695695 if (m_sigma_min.size () == 0 ) {
696696 bool sigma_less_than_threshold = false ;
@@ -713,7 +713,7 @@ int colvarbias_opes::update_opes() {
713713 if (!m_fixed_sigma) {
714714 const cvm::real size = m_explore ? m_counter : m_neff;
715715 const size_t ncv = num_variables ();
716- const cvm::real s_rescaling = std ::pow (size * (ncv + 2.0 ) / 4 , -1.0 / (4.0 + ncv));
716+ const cvm::real s_rescaling = cvm ::pow (size * (ncv + 2.0 ) / 4 , -1.0 / (4.0 + ncv));
717717 for (size_t i = 0 ; i < num_variables (); ++i) {
718718 sigma[i] *= s_rescaling;
719719 }
@@ -1356,29 +1356,29 @@ template <typename IST> IST& colvarbias_opes::read_state_data_template_(IST &is)
13561356 old_biasfactor = std::stod (old_biasfactor_str);
13571357 m_inf_biasfactor = false ;
13581358 }
1359- if (std::abs (old_biasfactor - m_biasfactor) > 1e-6 * m_biasfactor) {
1359+ if (cvm::fabs (old_biasfactor - m_biasfactor) > 1e-6 * m_biasfactor) {
13601360 cvm::log (" WARNING: previous bias factor was " + cvm::to_str (old_biasfactor) +
13611361 " while now it is " + cvm::to_str (m_biasfactor) +
13621362 " (the new one is used).\n " );
13631363 }
13641364 cvm::real old_epsilon;
13651365 readFieldReal (" epsilon" , old_epsilon);
1366- if (std::abs (old_epsilon - m_epsilon) > 1e-6 * m_epsilon) {
1366+ if (cvm::fabs (old_epsilon - m_epsilon) > 1e-6 * m_epsilon) {
13671367 cvm::log (" WARNING: previous epsilon was " + cvm::to_str (old_epsilon) +
13681368 " while now it is " + cvm::to_str (m_epsilon) +
13691369 " (the new one is used).\n " );
13701370 }
13711371 cvm::real old_cutoff;
13721372 readFieldReal (" kernel_cutoff" , old_cutoff);
1373- if (std::abs (old_cutoff - m_cutoff) > 1e-6 * m_cutoff) {
1373+ if (cvm::fabs (old_cutoff - m_cutoff) > 1e-6 * m_cutoff) {
13741374 cvm::log (" WARNING: previous cutoff was " + cvm::to_str (old_cutoff) +
13751375 " while now it is " + cvm::to_str (m_cutoff) +
13761376 " (the new one is used).\n " );
13771377 }
13781378 m_cutoff2 = m_cutoff * m_cutoff;
13791379 cvm::real old_compression_threshold;
13801380 readFieldReal (" compression_threshold" , old_compression_threshold);
1381- if (std::abs (old_compression_threshold - m_compression_threshold) > 1e-6 * m_compression_threshold) {
1381+ if (cvm::fabs (old_compression_threshold - m_compression_threshold) > 1e-6 * m_compression_threshold) {
13821382 cvm::log (" WARNING: previous cutoff was " + cvm::to_str (old_compression_threshold) +
13831383 " while now it is " + cvm::to_str (m_compression_threshold) +
13841384 " (the new one is used).\n " );
0 commit comments