Browse Source

around molecules: no molecule if just reference position

Bastien Sevajol 8 years ago
parent
commit
46e0e970a8
1 changed files with 2 additions and 1 deletions
  1. 2 1
      intelligine/simulation/molecule/DirectionMolecule.py

+ 2 - 1
intelligine/simulation/molecule/DirectionMolecule.py View File

@@ -83,7 +83,8 @@ class DirectionMolecule():
83 83
             except NoMolecule:
84 84
                 pass  # Ok, no molecule, continue to sniff around
85 85
 
86
-        if not around_molecules_points:
86
+        if not around_molecules_points \
87
+           or (len(around_molecules_points) == 1 and around_molecules_points[0][0] == reference_point):
87 88
             raise NoMolecule()
88 89
 
89 90
         shuffle(around_molecules_points)