Skip to content

Commit 7165d32

Browse files
authored
Merge pull request brucefan1983#1167 from brucefan1983/fix_vcsgc
fix vcsgc
2 parents 878140b + 43a3679 commit 7165d32

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/mc/mc_ensemble_sgc.cu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,8 +466,8 @@ void MC_Ensemble_SGC::compute(
466466
energy_difference += mu_or_phi[index_new_species] - mu_or_phi[index_old_species];
467467
} else {
468468
energy_difference +=
469-
kappa * K_B * temperature / atom.number_of_atoms *
470-
(atom.number_of_atoms * (mu_or_phi[index_new_species] - mu_or_phi[index_old_species]) +
469+
kappa * K_B * temperature / group_size *
470+
(group_size * (mu_or_phi[index_new_species] - mu_or_phi[index_old_species]) +
471471
2 * (num_atoms_species[index_new_species] - num_atoms_species[index_old_species]) + 1.0);
472472
}
473473

0 commit comments

Comments
 (0)