|
6 | 6 | import numbers
|
7 | 7 |
|
8 | 8 | vector_label_names = SimpleNamespace(
|
9 |
| - tm = ['spherical_harmonics_l', 'species_center'], |
| 9 | + tm = ['o3_lambda', 'center_type'], |
10 | 10 | block_prop = ['radial_channel'],
|
11 | 11 | block_samp = ['atom_id'],
|
12 | 12 | block_comp = ['spherical_harmonics_m']
|
13 | 13 | )
|
14 | 14 |
|
15 | 15 | matrix_label_names = SimpleNamespace(
|
16 |
| - tm = ['spherical_harmonics_l1', 'spherical_harmonics_l2', 'species_center1', 'species_center2'], |
| 16 | + tm = ['o3_lambda1', 'o3_lambda2', 'center_type1', 'center_type2'], |
17 | 17 | block_prop = ['radial_channel1', 'radial_channel2'],
|
18 | 18 | block_samp = ['atom_id1', 'atom_id2'],
|
19 | 19 | block_comp = ['spherical_harmonics_m1', 'spherical_harmonics_m2']
|
@@ -68,10 +68,10 @@ def _get_tsize(tensor):
|
68 | 68 |
|
69 | 69 | def _labels_to_array(labels):
|
70 | 70 | """Represents a set of metatensor labels as an array of the labels, using custom dtypes
|
71 |
| - |
| 71 | +
|
72 | 72 | Args:
|
73 | 73 | labels (metatensor Labels): Labels
|
74 |
| - |
| 74 | +
|
75 | 75 | Returns:
|
76 | 76 | labels (numpy ndarray[ndim=1, structured dtype]): the same labels
|
77 | 77 | """
|
@@ -179,7 +179,7 @@ def tensormap_to_vector(mol, tensor):
|
179 | 179 | llist = _get_llist(q, mol)
|
180 | 180 | il = {l: 0 for l in range(max(llist)+1)}
|
181 | 181 | for l in llist:
|
182 |
| - block = tensor.block(spherical_harmonics_l=l, species_center=q) |
| 182 | + block = tensor.block(o3_lambda=l, center_type=q) |
183 | 183 | id_samp = block.samples.position((iat,))
|
184 | 184 | id_prop = block.properties.position((il[l],))
|
185 | 185 | for m in _get_mrange(l):
|
@@ -342,7 +342,7 @@ def tensormap_to_matrix(mol, tensor):
|
342 | 342 | il2 = {l2: 0 for l2 in range(max(llist2)+1)}
|
343 | 343 | for l2 in llist2:
|
344 | 344 |
|
345 |
| - block = tensor.block(spherical_harmonics_l1=l1, spherical_harmonics_l2=l2, species_center1=q1, species_center2=q2) |
| 345 | + block = tensor.block(o3_lambda1=l1, o3_lambda2=l2, center_type1=q1, center_type2=q2) |
346 | 346 | id_samp = block.samples.position((iat1, iat2))
|
347 | 347 | id_prop = block.properties.position((il1[l1], il2[l2]))
|
348 | 348 |
|
|
0 commit comments