Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aovid error with widom insertion. exclusion radius should not have any effect here #2294

Merged
merged 3 commits into from
Nov 7, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions src/core/reaction_ensemble.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down