File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
src/nomad_simulations/schema_packages Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -242,7 +242,19 @@ class AtomCenteredFunction(ArchiveSection):
242
242
243
243
def normalize (self , archive : 'EntryArchive' , logger : 'BoundLogger' ) -> None :
244
244
super ().normalize (archive , logger )
245
- # self.name = self.m_def.name
245
+
246
+ # Validation: Check that n_primitive matches the lengths of exponents and contraction coefficients
247
+ if self .n_primitive is not None :
248
+ if len (self .exponents or []) != self .n_primitive :
249
+ logger .error (
250
+ f"Mismatch in number of exponents: expected { self .n_primitive } , "
251
+ f"found { len (self .exponents or [])} ."
252
+ )
253
+ if len (self .contraction_coefficients or []) != self .n_primitive :
254
+ logger .error (
255
+ f"Mismatch in number of contraction coefficients: expected { self .n_primitive } , "
256
+ f"found { len (self .contraction_coefficients or [])} ."
257
+ )
246
258
247
259
248
260
class AtomCenteredBasisSet (BasisSetComponent ):
You can’t perform that action at this time.
0 commit comments