Replies: 2 comments 2 replies
-
t present, this can only be achieved approximately by using particle types.. One could use np.histogram to sample the distributio into the size classes. If this approximation is not viable for the probelm in quesiton, one would have to
If you would like to implement that and have some C++ knowledge, I can point out the places to start form in the code. |
Beta Was this translation helpful? Give feedback.
-
Hi, here's a sketch (not tested, just a rough idea) n_classes = 11 # odd number for symmetry
assert n_classes%2==1
r_min =1.0 # smallerst particle size
r_max = 3.0 # largest particle size
rs = np.linspace(r_min, r_max, n_classes)
# Mixing rule (this is a physics decisin)
# for example
sigma = lambda i,j : rs[i] + rs[j]
epsilon = lambda i,j: 1.0 # but can depend on size class, too
# and similarly for the cutoff.
for i in range(n_classes):
for j in range(i,n_classes):
system.lennard_jones.non_bonded_inter[i,j].set_params(
epsilon=epsilon(i,j), sigma=sigma(i,j), cutoff=....) For electrostatics, you can set the charge for each particle individually. Hope that helps. |
Beta Was this translation helpful? Give feedback.
-
When dealing with a system composed of polydisperse particles, and assuming that the particle diameters adhere to a distribution such as a normal (Gaussian) distribution, how should one input these particles into the system?
Beta Was this translation helpful? Give feedback.
All reactions