Difference for src/colvarcomp.C from version 1.13 to 1.14

version 1.13version 1.14
Line 101
Line 101
     group->key = group_key;     group->key = group_key;
  
     if (b_try_scalable) {     if (b_try_scalable) {
       if (is_available(f_cvc_scalable_com) && is_enabled(f_cvc_com_based)) {       if (is_available(f_cvc_scalable_com)
            && is_enabled(f_cvc_com_based)
            && !is_enabled(f_cvc_debug_gradient)) {
         enable(f_cvc_scalable_com);         enable(f_cvc_scalable_com);
         enable(f_cvc_scalable);         enable(f_cvc_scalable);
         // The CVC makes the feature available;         // The CVC makes the feature available;
Line 156
Line 158
  
 colvar::cvc::~cvc() colvar::cvc::~cvc()
 { {
    free_children_deps();
   remove_all_children();   remove_all_children();
   for (size_t i = 0; i < atom_groups.size(); i++) {   for (size_t i = 0; i < atom_groups.size(); i++) {
     if (atom_groups[i] != NULL) delete atom_groups[i];     if (atom_groups[i] != NULL) delete atom_groups[i];
Line 201
Line 204
 } }
  
  
 void colvar::cvc::debug_gradients(cvm::atom_group *group) void colvar::cvc::calc_fit_gradients()
 { {
   // this function should work for any scalar variable:   for (size_t ig = 0; ig < atom_groups.size(); ig++) {
      atom_groups[ig]->calc_fit_gradients();
    }
  }
  
  
  void colvar::cvc::debug_gradients()
  {
    // this function should work for any scalar cvc:
   // the only difference will be the name of the atom group (here, "group")   // the only difference will be the name of the atom group (here, "group")
   // NOTE: this assumes that groups for this cvc are non-overlapping,   // NOTE: this assumes that groups for this cvc are non-overlapping,
   // since atom coordinates are modified only within the current group   // since atom coordinates are modified only within the current group
  
   if (group->b_dummy) return;   cvm::log("Debugging gradients for " + description);
  
    for (size_t ig = 0; ig < atom_groups.size(); ig++) {
      cvm::atom_group *group = atom_groups[ig];
      if (group->b_dummy) continue;
  
   cvm::rotation const rot_0 = group->rot;   cvm::rotation const rot_0 = group->rot;
   cvm::rotation const rot_inv = group->rot.inverse();   cvm::rotation const rot_inv = group->rot.inverse();
Line 223
Line 238
  
   // print the values of the fit gradients   // print the values of the fit gradients
   if (group->b_rotate || group->b_center) {   if (group->b_rotate || group->b_center) {
     if (group->b_fit_gradients) {       if (group->is_enabled(f_ag_fit_gradients)) {
       size_t j;       size_t j;
  
       // fit_gradients are in the simulation frame: we should print them in the rotated frame       // fit_gradients are in the simulation frame: we should print them in the rotated frame
Line 270
Line 285
     }     }
   }   }
  
   if ((group->b_fit_gradients) && (group->fitting_group != NULL)) {     if ((group->is_enabled(f_ag_fit_gradients)) && (group->fitting_group != NULL)) {
     cvm::atom_group *ref_group = group->fitting_group;     cvm::atom_group *ref_group = group->fitting_group;
     group->read_positions();     group->read_positions();
     group->calc_required_properties();     group->calc_required_properties();
Line 311
Line 326
   cvm::log("Gradient sum: " +  cvm::to_str(gradient_sum) +   cvm::log("Gradient sum: " +  cvm::to_str(gradient_sum) +
         "  Fit gradient sum: " + cvm::to_str(fit_gradient_sum) +         "  Fit gradient sum: " + cvm::to_str(fit_gradient_sum) +
         "  Total " + cvm::to_str(gradient_sum + fit_gradient_sum));         "  Total " + cvm::to_str(gradient_sum + fit_gradient_sum));
    }
   return;   return;
 } }
  


Legend:
Removed in v.1.13 
changed lines
 Added in v.1.14



Made by using version 1.53 of cvs2html