[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ESPResSo-users] non-bonded tabulated potential in epsresso-4.0.1

From: David Power
Subject: [ESPResSo-users] non-bonded tabulated potential in epsresso-4.0.1
Date: Fri, 18 Jan 2019 17:56:24 +0000

I'm using tabulated potentials in espresso-4.0.1 and have a questions about the order this function expects the data arrays. I have:

system.non_bonded_inter[0, t].tabulated.set_params(
 min = distances[0],
 max = distances[-1],
 energy  = energy,
 force = -np.gradient(energy)

where distances and energy are equal length arrays. distance goes from 0 (distance[0]) to 20.0 (distance[-1]). energy goes from some high value (energy[0]) to 0.0 (energy[-1]). I have this potential attached to a sphere constraint. I am trying to make a (non linear) repulsive wall.

This is the order the arrays would be in if I wanted to plot them with something like pyplot.

However, when I run this, all my particles get squished into a thin sheet at the surface of the sphere instead of being repelled like I would have expected.

Playing around, I set min to 20.0 and max to 0.0. Now I am seeing the behavior I expected!

I was just wondering if you could clarify the order of the energy and force arrays, and the order of max and min in tabulated potentials.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]