whitespace fixes in colvars library

This commit is contained in:
Axel Kohlmeyer
2013-06-10 14:47:15 +02:00
parent bdf796f136
commit e038893385
27 changed files with 341 additions and 341 deletions

View File

@ -60,7 +60,7 @@ void colvarbias::add_colvar (std::string const &cv_name)
cvp->enable (colvar::task_gradients);
if (cvm::debug())
cvm::log ("Applying this bias to collective variable \""+
cvp->name+"\".\n");
cvp->name+"\".\n");
colvars.push_back (cvp);
colvar_forces.push_back (colvarvalue (cvp->type()));
} else {
@ -80,7 +80,7 @@ void colvarbias::communicate_forces()
}
colvars[i]->add_bias_force (colvar_forces[i]);
}
}
}
void colvarbias::change_configuration(std::string const &conf)
@ -99,7 +99,7 @@ cvm::real colvarbias::energy_difference(std::string const &conf)
std::ostream & colvarbias::write_traj_label (std::ostream &os)
{
os << " ";
if (b_output_energy)
if (b_output_energy)
os << " E_"
<< cvm::wrap_string (this->name, cvm::en_width-2);
return os;
@ -109,7 +109,7 @@ std::ostream & colvarbias::write_traj_label (std::ostream &os)
std::ostream & colvarbias::write_traj (std::ostream &os)
{
os << " ";
if (b_output_energy)
if (b_output_energy)
os << " "
<< bias_energy;
return os;
@ -120,7 +120,7 @@ std::ostream & colvarbias::write_traj (std::ostream &os)
colvarbias_harmonic::colvarbias_harmonic (std::string const &conf,
char const *key)
: colvarbias (conf, key),
: colvarbias (conf, key),
target_nsteps (0),
target_nstages (0)
{
@ -349,7 +349,7 @@ cvm::real colvarbias_harmonic::update()
if (target_equil_steps == 0 || cvm::step_absolute() % target_nsteps >= target_equil_steps) {
// Start averaging after equilibration period, if requested
// Square distance normalized by square colvar width
cvm::real dist_sq = 0.0;
for (size_t i = 0; i < colvars.size(); i++) {
@ -367,7 +367,7 @@ cvm::real colvarbias_harmonic::update()
cvm::log ("Lambda= " + cvm::to_str (lambda) + " dA/dLambda= "
+ cvm::to_str (restraint_FE / cvm::real(target_nsteps - target_equil_steps)));
// ...and move on to the next one
if (stage < target_nstages) {
@ -395,7 +395,7 @@ cvm::real colvarbias_harmonic::update()
if (cvm::debug())
cvm::log ("Done updating the harmonic bias \""+this->name+"\".\n");
// Force and energy calculation
for (size_t i = 0; i < colvars.size(); i++) {
colvar_forces[i] =
@ -449,7 +449,7 @@ std::istream & colvarbias_harmonic::read_restart (std::istream &is)
return is;
}
// int id = -1;
// int id = -1;
std::string name = "";
// if ( ( (colvarparse::get_keyval (conf, "id", id, -1, colvarparse::parse_silent)) &&
// (id != this->id) ) ||
@ -545,18 +545,18 @@ std::ostream & colvarbias_harmonic::write_traj_label (std::ostream &os)
{
os << " ";
if (b_output_energy)
if (b_output_energy)
os << " E_"
<< cvm::wrap_string (this->name, cvm::en_width-2);
if (b_output_centers)
if (b_output_centers)
for (size_t i = 0; i < colvars.size(); i++) {
size_t const this_cv_width = (colvars[i]->value()).output_width (cvm::cv_width);
os << " x0_"
<< cvm::wrap_string (colvars[i]->name, this_cv_width-3);
}
if (b_output_acc_work)
if (b_output_acc_work)
os << " W_"
<< cvm::wrap_string (this->name, cvm::en_width-2);
@ -568,19 +568,19 @@ std::ostream & colvarbias_harmonic::write_traj (std::ostream &os)
{
os << " ";
if (b_output_energy)
if (b_output_energy)
os << " "
<< std::setprecision (cvm::en_prec) << std::setw (cvm::en_width)
<< bias_energy;
if (b_output_centers)
if (b_output_centers)
for (size_t i = 0; i < colvars.size(); i++) {
os << " "
<< std::setprecision (cvm::cv_prec) << std::setw (cvm::cv_width)
<< colvar_centers[i];
}
if (b_output_acc_work)
if (b_output_acc_work)
os << " "
<< std::setprecision (cvm::en_prec) << std::setw (cvm::en_width)
<< acc_work;