Skip to content

Commit 6f7439b

Browse files
committed
clone row_vector_cell
1 parent d8f67ff commit 6f7439b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

torch_sim/optimizers.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,7 @@ def gd_init(
385385
cell=state.cell,
386386
pbc=state.pbc,
387387
reference_cell=state.cell.clone(),
388+
row_vector_cell=state.row_vector_cell.clone(),
388389
cell_factor=cell_factor,
389390
hydrostatic_strain=hydrostatic_strain,
390391
constant_volume=constant_volume,
@@ -936,6 +937,7 @@ def fire_init(
936937
cell_masses=cell_masses,
937938
# Optimization attributes
938939
reference_cell=state.cell.clone(),
940+
row_vector_cell=state.row_vector_cell.clone(),
939941
cell_factor=cell_factor,
940942
pressure=pressure,
941943
dt=dt_start,
@@ -1020,7 +1022,6 @@ class FrechetCellFIREState(SimState, DeformGradMixin):
10201022
stress: torch.Tensor
10211023

10221024
# Optimization-specific attributes
1023-
reference_cell: torch.Tensor
10241025
cell_factor: torch.Tensor
10251026
pressure: torch.Tensor
10261027
hydrostatic_strain: bool
@@ -1243,6 +1244,7 @@ def fire_init(
12431244
cell_masses=cell_masses,
12441245
# Optimization attributes
12451246
reference_cell=state.cell.clone(),
1247+
row_vector_cell=state.row_vector_cell.clone(),
12461248
cell_factor=cell_factor,
12471249
pressure=pressure,
12481250
dt=dt_start,

0 commit comments

Comments
 (0)