@@ -830,14 +830,11 @@ def deserialize(cls, data: dict, suffix: str = "") -> "Descriptor":
830830 # For InvarFitting types (ener, dos, property), out_bias can be reshaped and added to bias_atom_e
831831 # For GeneralFitting types (dipole, polar), out_bias and bias_atom_e have different purposes and shapes
832832 # and should not be added together
833- fitting_type = data ["fitting" ].get ("type" , "energy " )
833+ fitting_type = data ["fitting" ].get ("type" , "ener " )
834834 if fitting_type in [
835835 "ener" ,
836- "energy" ,
837836 "dos" ,
838837 "property" ,
839- "direct_force" ,
840- "direct_force_ener" ,
841838 ]:
842839 # For InvarFitting types, use the original logic to reshape and add out_bias to bias_atom_e
843840 if (
@@ -853,10 +850,8 @@ def deserialize(cls, data: dict, suffix: str = "") -> "Descriptor":
853850 ]["bias_atom_e" ] + data ["@variables" ]["out_bias" ].reshape (
854851 data ["fitting" ]["@variables" ]["bias_atom_e" ].shape
855852 )
856- else :
857- # For GeneralFitting types (dipole, polar), keep out_bias separate - don't add to bias_atom_e
858- # These fitting types have different bias structures that are incompatible
859- pass
853+ # For GeneralFitting types (dipole, polar), keep out_bias separate - don't add to bias_atom_e
854+ # These fitting types have different bias structures that are incompatible
860855 fitting = Fitting .deserialize (data .pop ("fitting" ), suffix = suffix )
861856 # pass descriptor type embedding to model
862857 if descriptor .explicit_ntypes :
0 commit comments