Permalink
Browse files

Merge pull request #2294 from jonaslandsgesell/python

aovid error with widom insertion. exclusion radius should not have any effect here
  • Loading branch information...
fweik committed Nov 7, 2018
2 parents 2223737 + a910f90 commit f964c9a61f986cd5d72b1dfc3f9698543bdb7cdc
Showing with 1 addition and 6 deletions.
  1. +1 −6 src/core/reaction_ensemble.cpp
@@ -1780,7 +1780,6 @@ double ConstantpHEnsemble::calculate_acceptance_probability(
std::pair<double, double>
WidomInsertion::measure_excess_chemical_potential(int reaction_id) {
SingleReaction &current_reaction = reactions[reaction_id];
particle_inserted_too_close_to_another_one = false;
const double E_pot_old = calculate_current_potential_energy_of_system();
// make reaction attempt
@@ -1792,11 +1791,7 @@ WidomInsertion::measure_excess_chemical_potential(int reaction_id) {
// need to hide the particle and recover it
make_reaction_attempt(current_reaction, changed_particles_properties,
p_ids_created_particles, hidden_particles_properties);
double E_pot_new;
if (particle_inserted_too_close_to_another_one == true)
E_pot_new = std::numeric_limits<double>::max();
else
E_pot_new = calculate_current_potential_energy_of_system();
const double E_pot_new = calculate_current_potential_energy_of_system();
// reverse reaction attempt
// reverse reaction
// 1) delete created product particles

0 comments on commit f964c9a

Please sign in to comment.