-
Notifications
You must be signed in to change notification settings - Fork 296
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
Weird behavior of LOWER_WALLS #1091
Comments
I think the problem is here: Line 97 in 669793f
LOWER_WALLS now gets shorcut to a custom func whereas UPPER_WALLS to The solution should be to change the custom function to either:
We need to test the faster between the two and PR it I think (and maybe add a test for this) |
I agree that this is a bug, should be fixed as @Iximiel suggested (the two approaches should have the same measurable performance) |
I think @riccardocapelli just kicked a beehive 🐛 #1109 may not be enough: I'll use a "fancy nomenclature":
With @Puncist we started to set up the most simple test for this (walls on the x coordinate), and we discovered a few interesting things, already in 2.9:
Some examples in spoilerWe are running with this config type=driver
arg="--plumed plumed.dat --ixyz trajectory.xyz --debug-forces forces --dump-forces-fmt=%8.4f"
function plumed_regtest_before() {
for x in {-5..5}; do
echo "1"
echo "100 100 100"
echo "C $x 0 0"
done > trajectory.xyz
}
function plumed_regtest_after() {
awk 'NR==1{print} /^ 0 /{print}' forces > forces_0_x
}
forces_0_x are the values of the forces on the x component of atom 1 (I called it 0_x because I think in C...) And this plumed.dat:
With these two files, you can reproduce the same thing on your PC. I checked out the branch v2.9, but on master you can get the same results EXP=1forces_0_x
Also, the numerical derivative is -1 in x=0 COLVAR
EXP=2forces_0_x
COLVAR
EXP=3forces_0_x
COLVAR
EXP=10forces_0_x
COLVAR
EXP=11forces_0_x
COLVAR
and so on |
Co-authored-by: Daniele Rapetti <[email protected]>
Today I used a LOWER_WALLS potential on a distance and set the exponent of the function to 1.
Looking at the bias, I got a value of 0 when d>threshold, but a negative value (i.e. an attractive potential) when d<threshold.
Is this the expected behavior (and I should put a - in front of the KAPPA) or, as the name of LOWER_WALLS suggests, is this a bug?
Thanks a lot!
Riccardo
The text was updated successfully, but these errors were encountered: