version 1.11 | version 1.12 |
---|
| |
// -*- c++ -*- | // -*- 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 "colvarmodule.h" | #include "colvarmodule.h" |
#include "colvarvalue.h" | #include "colvarvalue.h" |
#include "colvar.h" | #include "colvar.h" |
| |
| |
int colvar::cvc::init_total_force_params(std::string const &conf) | int colvar::cvc::init_total_force_params(std::string const &conf) |
{ | { |
| if (cvm::get_error()) return COLVARS_ERROR; |
| |
if (get_keyval_feature(this, conf, "oneSiteSystemForce", | if (get_keyval_feature(this, conf, "oneSiteSystemForce", |
f_cvc_one_site_total_force, is_enabled(f_cvc_one_site_total_force))) { | f_cvc_one_site_total_force, is_enabled(f_cvc_one_site_total_force))) { |
cvm::log("Warning: keyword \"oneSiteSystemForce\" is deprecated: " | cvm::log("Warning: keyword \"oneSiteSystemForce\" is deprecated: " |
| |
f_cvc_one_site_total_force, is_enabled(f_cvc_one_site_total_force))) { | f_cvc_one_site_total_force, is_enabled(f_cvc_one_site_total_force))) { |
cvm::log("Computing total force on group 1 only"); | cvm::log("Computing total force on group 1 only"); |
} | } |
| |
| if (! is_enabled(f_cvc_one_site_total_force)) { |
| // check whether any of the other atom groups is dummy |
| std::vector<cvm::atom_group *>::iterator agi = atom_groups.begin(); |
| agi++; |
| for ( ; agi != atom_groups.end(); agi++) { |
| if ((*agi)->b_dummy) { |
| set_available(f_cvc_inv_gradient, false); |
| set_available(f_cvc_Jacobian, false); |
| } |
| } |
| } |
| |
return COLVARS_OK; | return COLVARS_OK; |
} | } |
| |