Skip to content

Commit

Permalink
fix: nevermind it didnt work
Browse files Browse the repository at this point in the history
  • Loading branch information
1p22geo committed Jun 6, 2024
1 parent d67e0f7 commit 499c638
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion engine/renderpreview.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def renderpreview(state, mobile=False):
for potential in potentials:
V_total += potential.V
for p2 in particles:
if p2.__id != particle.__id:
if p2._id != particle._id:
V_total += (
libschrodinger.interaction.Interactions.get_relative_potential(
config, particle, p2
Expand Down
4 changes: 2 additions & 2 deletions libschrodinger/gauss.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def __init__(
vx=0.0,
vy=0.0,
):
self.__id = uuid.uuid4()
self._id = uuid.uuid4()
self.config = config
self.vx = vx
self.vy = vy
Expand Down Expand Up @@ -110,7 +110,7 @@ def propagate(
return
# Interact with other particles
for p in particles:
if p._id == self.__id:
if p._id == self._id:
continue
pass
# interact with particle
6 changes: 3 additions & 3 deletions libschrodinger/quark/baryon.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def propagate(self, V, particles, frame):
),
)
particles.append(m)
self._meson = m.__id # to access or delete this meson later on
self._meson = m._id # to access or delete this meson later on
self.quarks[0].color_charge = libschrodinger.quark.color.rotate(
libschrodinger.quark.color.COLOR.GREEN, self.rotation
)
Expand Down Expand Up @@ -132,7 +132,7 @@ def propagate(self, V, particles, frame):
),
)
particles.append(m)
self._meson = m.__id # to access or delete this meson later on
self._meson = m._id # to access or delete this meson later on
self.quarks[1].color_charge = libschrodinger.quark.color.rotate(
libschrodinger.quark.color.COLOR.BLUE, self.rotation
)
Expand Down Expand Up @@ -168,7 +168,7 @@ def propagate(self, V, particles, frame):
),
)
particles.append(m)
self._meson = m.__id # to access or delete this meson later on
self._meson = m._id # to access or delete this meson later on
self.quarks[2].color_charge = libschrodinger.quark.color.rotate(
libschrodinger.quark.color.COLOR.GREEN, self.rotation
)
Expand Down
4 changes: 2 additions & 2 deletions libschrodinger/quark/hadron.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class Hadron(libschrodinger.particle.Particle):
"""

def __init__(self, config, quarks: list[libschrodinger.quark.quark.Quark]):
self.__id = uuid.uuid4()
self._id = uuid.uuid4()
self.config = config
self.psi = np.zeros((config.Nx, config.Ny), dtype="complex128")
self.quarks = quarks
Expand Down Expand Up @@ -103,7 +103,7 @@ def propagate(
return
# Interact with other particles
for p in particles:
if p._id == self.__id:
if p._id == self._id:
continue
pass
# interact with particle
4 changes: 4 additions & 0 deletions libschrodinger/testutils/asserts.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import time


def assert_file_exists(file, timeout):
for _ in range(timeout):
try:
with open(file, "rb") as f:
assert f.readable()
return True
except:
time.sleep(1)
continue
raise TimeoutError("Assert timeout expired")
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "libschrodinger"
version = "1.3.1"
version = "1.3.2"
authors = [
{ name="1p22geo", email="[email protected]" },
{ name="KacperTZSTI", email="[email protected]" },
Expand Down

0 comments on commit 499c638

Please sign in to comment.