Unverified Commit 812a4545 authored by Steve Plimpton's avatar Steve Plimpton Committed by GitHub
Browse files

Merge pull request #816 from giacomofiorin/colvars-update-2018-02-23

Collected fixes and updates to Colvars library
parents 0666607c f3cf407a
Loading
Loading
Loading
Loading
+7.51 KiB (594 KiB)

File changed.

No diff preview for this file type.

+1 −1
Original line number Diff line number Diff line
@@ -195,7 +195,7 @@ int colvar::init(std::string const &conf)
  // - it is homogeneous
  // - all cvcs are periodic
  // - all cvcs have the same period
  if (cvcs[0]->b_periodic) { // TODO make this a CVC feature
  if (is_enabled(f_cv_homogeneous) && cvcs[0]->b_periodic) { // TODO make this a CVC feature
    bool b_periodic = true;
    period = cvcs[0]->period;
    for (i = 1; i < cvcs.size(); i++) {
+10 −6
Original line number Diff line number Diff line
@@ -11,8 +11,6 @@
#define COLVAR_H

#include <iostream>
#include <iomanip>
#include <cmath>

#include "colvarmodule.h"
#include "colvarvalue.h"
@@ -61,6 +59,9 @@ public:
  /// \brief Current actual value (not extended DOF)
  colvarvalue const & actual_value() const;

  /// \brief Current running average (if calculated as set by analysis flag)
  colvarvalue const & run_ave() const;

  /// \brief Force constant of the spring
  cvm::real const & force_constant() const;

@@ -516,7 +517,7 @@ public:
  // collective variable component base class
  class cvc;

  // currently available collective variable components
  // list of available collective variable components

  // scalar colvar components
  class distance;
@@ -611,12 +612,15 @@ inline colvarvalue const & colvar::value() const
  return x_reported;
}


inline colvarvalue const & colvar::actual_value() const
{
  return x;
}

inline colvarvalue const & colvar::run_ave() const
{
  return runave;
}

inline colvarvalue const & colvar::velocity() const
{
+2 −2
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ namespace UIestimator {
            this->width = width;
            this->dimension = lowerboundary.size();
            this->y_size = y_size;     // keep in mind the internal (spare) matrix is stored in diagonal form
            this->y_total_size = int(pow(double(y_size), dimension) + EPSILON);
            this->y_total_size = int(std::pow(double(y_size), double(dimension)) + EPSILON);

            // the range of the matrix is [lowerboundary, upperboundary]
            x_total_size = 1;
@@ -121,7 +121,7 @@ namespace UIestimator {
            int index = 0;
            for (i = 0; i < dimension; i++) {
                if (i + 1 < dimension)
                    index += temp[i] * int(pow(double(y_size), dimension - i - 1) + EPSILON);
                    index += temp[i] * int(std::pow(double(y_size), double(dimension - i - 1)) + EPSILON);
                else
                    index += temp[i];
            }
+2 −0
Original line number Diff line number Diff line
@@ -8,9 +8,11 @@
// Colvars repository at GitHub.

#include "colvarmodule.h"
#include "colvarproxy.h"
#include "colvarparse.h"
#include "colvaratoms.h"


cvm::atom::atom()
{
  index = -1;
Loading