Skip to content

Commit 5cc3069

Browse files
committed
clamp at 2
1 parent 0585acf commit 5cc3069

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torch_sim/autobatching.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ def calculate_memory_scaler(
367367
volume = torch.abs(torch.linalg.det(state.cell[0])) / 1000
368368
else:
369369
bbox = state.positions.max(dim=0).values - state.positions.min(dim=0).values
370-
volume = bbox.clamp(min=1.0).prod() / 1000 # min 1 Å for planar molecules
370+
volume = bbox.clamp(min=2.0).prod() / 1000 # min 1 Å for planar molecules
371371
number_density = state.n_atoms / volume.item()
372372
return state.n_atoms * number_density
373373
raise ValueError(

0 commit comments

Comments
 (0)