File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed
Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ def forward(
139139 - virial: Virial correction tensor with shape (nframes, 3, 3)
140140 """
141141 if box is None :
142- raise RuntimeWarning (
142+ raise RuntimeError (
143143 "dipole_charge data modifier can only be applied for periodic systems."
144144 )
145145 else :
Original file line number Diff line number Diff line change @@ -164,11 +164,11 @@ pin_pytorch_cpu = [
164164 # macos x86 has been deprecated
165165 " torch>=2.8,<2.10; platform_machine!='x86_64' or platform_system != 'Darwin'" ,
166166 " torch; platform_machine=='x86_64' and platform_system == 'Darwin'" ,
167- " torch_admp @ git+https://github.com/chiahsinchu/torch-admp.git@v1.1.0a " ,
167+ " torch_admp @ git+https://github.com/chiahsinchu/torch-admp.git@v1.1.1 " ,
168168]
169169pin_pytorch_gpu = [
170170 " torch>=2.7,<2.10" ,
171- " torch_admp @ git+https://github.com/chiahsinchu/torch-admp.git@v1.1.0a " ,
171+ " torch_admp @ git+https://github.com/chiahsinchu/torch-admp.git@v1.1.1 " ,
172172]
173173pin_jax = [
174174 " jax==0.5.0;python_version>='3.10'" ,
Original file line number Diff line number Diff line change @@ -171,17 +171,17 @@ def test_serialize(self):
171171 )
172172
173173 def test_box_none_warning (self ):
174- """Test that a RuntimeWarning is raised when box is None."""
175- coord , box , atype = ref_data ()
174+ """Test that a RuntimeError is raised when box is None."""
175+ coord , _box , atype = ref_data ()
176176 # consistent with the input shape from BaseModifier.modify_data
177177 t_coord = to_torch_tensor (coord ).to (DTYPE ).reshape (1 , - 1 , 3 )
178178 t_atype = to_torch_tensor (atype ).to (torch .long )
179179
180- with self .assertRaises (RuntimeWarning ) as context :
180+ with self .assertRaises (RuntimeError ) as context :
181181 self .dm_pt (
182182 coord = t_coord ,
183183 atype = t_atype ,
184- box = None , # Pass None to trigger the warning
184+ box = None , # Pass None to trigger the error
185185 )
186186
187187 self .assertIn (
You can’t perform that action at this time.
0 commit comments