Skip to content

Commit 9f0cda5

Browse files
Bug fix in Interface to duplicate and shift along the correct axis (#125)
* change interface axis to array, fix np.where behavior * remove print statement * update versions for mbuild and python in env files
1 parent 5b88f8c commit 9f0cda5

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

environment-dev.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ dependencies:
88
- gmso >=0.11.2
99
- gsd >=3.0
1010
- hoomd=4.3
11-
- mbuild >=0.16.4
11+
- mbuild >=0.17.0
1212
- numpy
1313
- openbabel >=3
1414
- pip
1515
- pre-commit
1616
- py3Dmol
1717
- pytest
1818
- pytest-cov
19-
- python >=3.10
19+
- python >=3.10, <3.12
2020
- fresnel >=0.13.5
2121
- cmeutils >=1.1.1
2222
- grits >=0.3.0

environment.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ dependencies:
88
- gmso >=0.11.2
99
- gsd >=3.0
1010
- hoomd=4.3
11-
- mbuild >=0.16.4
11+
- mbuild >=0.17.0
1212
- numpy
1313
- openbabel >=3
1414
- pip
1515
- py3Dmol
16-
- python >=3.10
16+
- python >=3.10, <3.12
1717
- fresnel >=0.13.5
1818
- cmeutils >=1.1.1
1919
- grits >=0.3.0

flowermd/modules/welding/welding.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def __init__(
3535
remove_void_particles=True,
3636
):
3737
self.gsd_files = check_return_iterable(gsd_files)
38-
self.interface_axis = interface_axis
38+
self.interface_axis = np.asarray(interface_axis)
3939
self.gap = gap
4040
self.wall_sigma = wall_sigma
4141
self._remove_void_particles = remove_void_particles
@@ -81,8 +81,7 @@ def _build(self):
8181
interface.dihedrals.N = snap_L.dihedrals.N + snap_R.dihedrals.N
8282
interface.dihedrals.M = 4
8383
interface.pairs.N = snap_L.pairs.N + snap_R.pairs.N
84-
# Set up box. Box edge is doubled along the interface axis direction,
85-
# plus the gap
84+
# Box edge is doubled along the interface axis plus the gap
8685
axis_index = np.where(self.interface_axis != 0)[0]
8786
interface.configuration.box = np.copy(snap_L.configuration.box)
8887
interface.configuration.box[axis_index] *= 2

0 commit comments

Comments
 (0)