Skip to content

Commit

Permalink
rename BondLenCovalent to R_cov_list
Browse files Browse the repository at this point in the history
  • Loading branch information
QG-phy committed Sep 24, 2024
1 parent 5a98af3 commit cced890
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions dptb/nn/sktb/cov_radiiDB.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
import torch

# unit. \AA.
BondLenCovalent = torch.zeros(int(max(atomic_num_dict.values()))) - 100
R_cov_list = torch.zeros(int(max(atomic_num_dict.values()))) - 100
for k, v in Covalent_radii.items():
BondLenCovalent[atomic_num_dict[k]-1] = v * 0.01
R_cov_list[atomic_num_dict[k]-1] = v * 0.01
6 changes: 3 additions & 3 deletions dptb/tests/test_bondlength.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ def test_bond_length_list():
assert bond_length_full_dict[atom_symbol] is None
assert bond_length_list[ii-1] == -100

from dptb.nn.sktb.cov_radiiDB import Covalent_radii, BondLenCovalent
from dptb.nn.sktb.cov_radiiDB import Covalent_radii, R_cov_list
from dptb.utils.constants import atomic_num_dict

def test_Covalent_radii():
for key, val in atomic_num_dict.items():
if key in Covalent_radii:
assert Covalent_radii[key] * 0.01 == BondLenCovalent[val-1]
assert Covalent_radii[key] * 0.01 == R_cov_list[val-1]
else:
assert BondLenCovalent[val-1] == -100
assert R_cov_list[val-1] == -100

0 comments on commit cced890

Please sign in to comment.