Skip to content

Commit 215a969

Browse files
committed
Update dp_atomic_model.py
1 parent 7286d37 commit 215a969

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

deepmd/pt/model/atomic_model/dp_atomic_model.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@ def forward_atomic(
278278
if self.add_chg_spin_ebd and charge_spin is None:
279279
default_cs_tensor = self.descriptor.get_default_chg_spin()
280280
if default_cs_tensor is not None:
281+
default_cs_tensor = default_cs_tensor.to(device=extended_coord.device)
281282
charge_spin = torch.tile(default_cs_tensor.unsqueeze(0), [nframes, 1])
282283

283284
descriptor, rot_mat, g2, h2, sw = self.descriptor(

0 commit comments

Comments
 (0)