Skip to content

Commit 2ab27bb

Browse files
committed
fix typo
1 parent 9eefb07 commit 2ab27bb

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

deepmd/pt/model/descriptor/dpa3.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -474,13 +474,13 @@ def forward(
474474
The smooth switch function. shape: nf x nloc x nnei
475475

476476
"""
477-
parrallel_mode = comm_dict is not None
477+
parallel_mode = comm_dict is not None
478478
# cast the input to internal precsion
479479
extended_coord = extended_coord.to(dtype=self.prec)
480480
nframes, nloc, nnei = nlist.shape
481481
nall = extended_coord.view(nframes, -1).shape[1] // 3
482482

483-
if not parrallel_mode and self.use_loc_mapping:
483+
if not parallel_mode and self.use_loc_mapping:
484484
node_ebd_ext = self.type_embedding(extended_atype[:, :nloc])
485485
else:
486486
node_ebd_ext = self.type_embedding(extended_atype)

deepmd/pt/model/descriptor/repflow_layer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ def optim_edge_update_dynamic(
684684

685685
def forward(
686686
self,
687-
node_ebd_ext: torch.Tensor, # nf x nall x n_dim [OR] nf x nloc x n_dim when not parrallel_mode
687+
node_ebd_ext: torch.Tensor, # nf x nall x n_dim [OR] nf x nloc x n_dim when not parallel_mode
688688
edge_ebd: torch.Tensor, # nf x nloc x nnei x e_dim
689689
h2: torch.Tensor, # nf x nloc x nnei x 3
690690
angle_ebd: torch.Tensor, # nf x nloc x a_nnei x a_nnei x a_dim

deepmd/pt/model/descriptor/repflows.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -417,8 +417,8 @@ def forward(
417417
mapping: Optional[torch.Tensor] = None,
418418
comm_dict: Optional[dict[str, torch.Tensor]] = None,
419419
):
420-
parrallel_mode = comm_dict is not None
421-
if not parrallel_mode:
420+
parallel_mode = comm_dict is not None
421+
if not parallel_mode:
422422
assert mapping is not None
423423
nframes, nloc, nnei = nlist.shape
424424
nall = extended_coord.view(nframes, -1).shape[1] // 3
@@ -492,7 +492,7 @@ def forward(
492492
cosine_ij = torch.matmul(normalized_diff_i, normalized_diff_j) * (1 - 1e-6)
493493
angle_input = cosine_ij.unsqueeze(-1) / (torch.pi**0.5)
494494

495-
if not parrallel_mode and self.use_loc_mapping:
495+
if not parallel_mode and self.use_loc_mapping:
496496
assert mapping is not None
497497
# convert nlist from nall to nloc index
498498
nlist = torch.gather(
@@ -534,15 +534,15 @@ def forward(
534534
angle_ebd = self.angle_embd(angle_input)
535535

536536
# nb x nall x n_dim
537-
if not parrallel_mode:
537+
if not parallel_mode:
538538
assert mapping is not None
539539
mapping = (
540540
mapping.view(nframes, nall).unsqueeze(-1).expand(-1, -1, self.n_dim)
541541
)
542542
for idx, ll in enumerate(self.layers):
543543
# node_ebd: nb x nloc x n_dim
544-
# node_ebd_ext: nb x nall x n_dim [OR] nb x nloc x n_dim when not parrallel_mode
545-
if not parrallel_mode:
544+
# node_ebd_ext: nb x nall x n_dim [OR] nb x nloc x n_dim when not parallel_mode
545+
if not parallel_mode:
546546
assert mapping is not None
547547
node_ebd_ext = (
548548
torch.gather(node_ebd, 1, mapping)

0 commit comments

Comments
 (0)