Skip to content

Bug when two particles have D=0 #82

@Jintram

Description

@Jintram

Then the method that decides on the minimum pair size fails:

jintram@jintram-Aspire-7745G:~/jul2012_gfrd_git/samples/cluster$ python run.py 7 4 data.out
v23jun2011.3
Seed: 850
Constants: sigma=1e-08; D=1e-12; world_size=4.472135955e-07; k1=1.25663706144e-19; k2=100.0; spacing=1e-13; N=7; runs=4; kd/k1=1.0; f=0.0035
Traceback (most recent call last):
  File "run.py", line 292, in <module>
    outFile.write(str(single_run(N, LOGGING)) + '\n')
  File "run.py", line 266, in single_run
    s.step() # make eGFRD step
  File "/home/jintram/jul2012_gfrd_git/egfrd.py", line 445, in step
    f(self, domain, [domain.domain_id])         # fire the correct method for the class (e.g. process_single_event(self, Single))
  File "/home/jintram/jul2012_gfrd_git/egfrd.py", line 1760, in process_single_event
    domains = [self.make_new_domain(single)]
  File "/home/jintram/jul2012_gfrd_git/egfrd.py", line 1588, in make_new_domain
    domain = self.try_pair (single, obj)
  File "/home/jintram/jul2012_gfrd_git/egfrd.py", line 2296, in try_pair
    testShell = try_default_testpair(single1, single2, self.geometrycontainer, self.domains)
  File "/home/jintram/jul2012_gfrd_git/egfrd.py", line 138, in try_default_testpair
    return SphericalPairtestShell           (single1, single2, geometrycontainer, domains)
  File "/home/jintram/jul2012_gfrd_git/shells.py", line 1303, in __init__
    [])
  File "/home/jintram/jul2012_gfrd_git/shells.py", line 1220, in determine_possible_shell
    min_radius = self.apply_safety(self.get_min_radius())
  File "/home/jintram/jul2012_gfrd_git/shells.py", line 1309, in get_min_radius
    return self.get_min_pair_size()
  File "/home/jintram/jul2012_gfrd_git/shells.py", line 296, in get_min_pair_size
    dist_from_com1 = self.r0 * D_1 / self.D_tot      # particle distance from CoM
ZeroDivisionError: float division by zero

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions