Difference for src/colvardeps.C from version 1.3 to 1.4

version 1.3version 1.4
Line 1
Line 1
  // -*- c++ -*-
  
  // This file is part of the Collective Variables module (Colvars).
  // The original version of Colvars and its updates are located at:
  // https://github.com/colvars/colvars
  // Please update all Colvars source files before making any changes.
  // If you wish to distribute your changes, please submit them to the
  // Colvars repository at GitHub.
  
  
 #include "colvardeps.h" #include "colvardeps.h"
  
  
Line 29
Line 39
 } }
  
  
  void colvardeps::set_available(int feature_id, bool truefalse) {
    feature_states[feature_id]->available = truefalse;
  }
  
  
  void colvardeps::set_enabled(int feature_id, bool truefalse) {
    feature_states[feature_id]->enabled = truefalse;
  }
  
  
 bool colvardeps::get_keyval_feature(colvarparse *cvp, bool colvardeps::get_keyval_feature(colvarparse *cvp,
                         std::string const &conf, char const *key,                         std::string const &conf, char const *key,
                         int feature_id, bool const &def_value,                         int feature_id, bool const &def_value,
Line 158
Line 178
       if (res != COLVARS_OK) {       if (res != COLVARS_OK) {
         if (!dry_run) {         if (!dry_run) {
           cvm::log("...required by \"" + f->description + "\" in " + description);           cvm::log("...required by \"" + f->description + "\" in " + description);
         } 
         if (toplevel) {         if (toplevel) {
           cvm::error("Error: Failed dependency in " + description + ".");           cvm::error("Error: Failed dependency in " + description + ".");
         }         }
          }
         return res;         return res;
       }       }
     }     }
Line 219
Line 239
  
   f_description(f_cvb_history_dependent, "history-dependent");   f_description(f_cvb_history_dependent, "history-dependent");
  
    f_description(f_cvb_scalar_variables, "require scalar variables");
    f_req_children(f_cvb_scalar_variables, f_cv_scalar);
  
    f_description(f_cvb_calc_pmf, "calculate a PMF");
    // TODO define requirements?
  
   // Initialize feature_states for each instance   // Initialize feature_states for each instance
   feature_states.reserve(f_cvb_ntot);   feature_states.reserve(f_cvb_ntot);
   for (i = 0; i < f_cvb_ntot; i++) {   for (i = 0; i < f_cvb_ntot; i++) {
Line 229
Line 255
  
   // some biases are not history-dependent   // some biases are not history-dependent
   feature_states[f_cvb_history_dependent]->available = false;   feature_states[f_cvb_history_dependent]->available = false;
  
    // some biases do not compute a PMF
    feature_states[f_cvb_calc_pmf]->available = false;
  
    // by default, biases should work with vector variables, too
    feature_states[f_cvb_scalar_variables]->available = false;
 } }
  
  
Line 306
Line 338
     f_req_self(f_cv_grid, f_cv_lower_boundary);     f_req_self(f_cv_grid, f_cv_lower_boundary);
     f_req_self(f_cv_grid, f_cv_upper_boundary);     f_req_self(f_cv_grid, f_cv_upper_boundary);
  
     f_description(f_cv_lower_wall, "lower wall"); 
     f_req_self(f_cv_lower_wall, f_cv_lower_boundary); 
     f_req_self(f_cv_lower_wall, f_cv_gradient); 
  
     f_description(f_cv_upper_wall, "upper wall"); 
     f_req_self(f_cv_upper_wall, f_cv_upper_boundary); 
     f_req_self(f_cv_upper_wall, f_cv_gradient); 
  
     f_description(f_cv_runave, "running average");     f_description(f_cv_runave, "running average");
  
     f_description(f_cv_corrfunc, "correlation function");     f_description(f_cv_corrfunc, "correlation function");
Line 321
Line 345
     // The features below are set programmatically     // The features below are set programmatically
     f_description(f_cv_scripted, "scripted");     f_description(f_cv_scripted, "scripted");
     f_description(f_cv_periodic, "periodic");     f_description(f_cv_periodic, "periodic");
      f_req_self(f_cv_periodic, f_cv_homogeneous);
     f_description(f_cv_scalar, "scalar");     f_description(f_cv_scalar, "scalar");
     f_description(f_cv_linear, "linear");     f_description(f_cv_linear, "linear");
     f_description(f_cv_homogeneous, "homogeneous");     f_description(f_cv_homogeneous, "homogeneous");


Legend:
Removed in v.1.3 
changed lines
 Added in v.1.4



Made by using version 1.53 of cvs2html