| version 1.23 | version 1.24 |
|---|
| |
| // shared ABF | // shared ABF |
| get_keyval(conf, "shared", shared_on, false); | get_keyval(conf, "shared", shared_on, false); |
| if (shared_on) { | if (shared_on) { |
| if (!cvm::replica_enabled() || cvm::replica_num() <= 1) | if (!cvm::replica_enabled() || cvm::replica_num() <= 1) { |
| cvm::error("Error: shared ABF requires more than one replica."); | cvm::error("Error: shared ABF requires more than one replica."); |
| else | return COLVARS_ERROR; |
| | } |
| cvm::log("shared ABF will be applied among "+ cvm::to_str(cvm::replica_num()) + " replicas.\n"); | cvm::log("shared ABF will be applied among "+ cvm::to_str(cvm::replica_num()) + " replicas.\n"); |
| if (cvm::proxy->smp_enabled() == COLVARS_OK) { | if (cvm::proxy->smp_enabled() == COLVARS_OK) { |
| cvm::error("Error: shared ABF is currently not available with SMP parallelism; " | cvm::error("Error: shared ABF is currently not available with SMP parallelism; " |
| |
| COLVARS_NOT_IMPLEMENTED); | COLVARS_NOT_IMPLEMENTED); |
| return COLVARS_NOT_IMPLEMENTED; | return COLVARS_NOT_IMPLEMENTED; |
| } | } |
| | |
| // If shared_freq is not set, we default to output_freq | // If shared_freq is not set, we default to output_freq |
| get_keyval(conf, "sharedFreq", shared_freq, output_freq); | get_keyval(conf, "sharedFreq", shared_freq, output_freq); |
| } | } |
| |
| | |
| if (colvars.size() == 0) { | if (colvars.size() == 0) { |
| cvm::error("Error: no collective variables specified for the ABF bias.\n"); | cvm::error("Error: no collective variables specified for the ABF bias.\n"); |
| | return COLVARS_ERROR; |
| } | } |
| | |
| if (update_bias) { | if (update_bias) { |
| // Request calculation of total force (which also checks for availability) | // Request calculation of total force |
| // TODO - change this to a dependency - needs ABF-specific features | |
| if(enable(f_cvb_get_total_force)) return cvm::get_error(); | if(enable(f_cvb_get_total_force)) return cvm::get_error(); |
| } | } |
| | |