mlund / faunus

A Framework for Metropolis Monte Carlo Simulation of Molecular Systems
https://faunus.readthedocs.io
MIT License
66 stars 33 forks source link

Failing unittest for SASA hamiltonian #412

Closed mlund closed 2 years ago

mlund commented 2 years ago

The newer SASA Hamiltonian (#397) with support for PBC fails to pass the pythontest.py. This can by reverted by changing sasa to freesasa here:

https://github.com/mlund/faunus/blob/6e2f08026c596fe38e8ae5f8f0af9ba92876f52e/examples/pythontest.py#L74

The sasa values seem to be 10-20% off (compiled with clang in debug mode). @Smutekj do you know what could cause this? The probe radius and molarity seems to be correctly captured.

Update: The above is fixed by increasing the number of slices per particle. However now the partial updating unit test seems to be failing. In the current master, the change object is accidentally set to everything, meaning that a partial update is never probed. See PR #413 to reproduce the error:

https://github.com/mlund/faunus/blob/549cc70bc311cab68018d393cb157a23dae54b9a/src/energy.cpp#L1475