@@ -1439,7 +1439,7 @@ class is created.
14391439
14401440 # # Get the symmetries from spglib
14411441 # super_structure = self.current_dyn.structure.generate_supercell(self.supercell)
1442- # spglib_syms = spglib.get_symmetry(super_structure.get_ase_atoms ())
1442+ # spglib_syms = spglib.get_symmetry(super_structure.get_spglib_cell ())
14431443
14441444 # # Convert them into the cellconstructor format
14451445 # cc_syms = CC.symmetries.GetSymmetriesFromSPGLIB(spglib_syms, False)
@@ -1534,7 +1534,7 @@ def _unwrap_symmetries_(self):
15341534
15351535 # Get the symmetries from spglib
15361536 super_structure = self .current_dyn .structure .generate_supercell (self .supercell )
1537- spglib_syms = spglib .get_symmetry (super_structure .get_ase_atoms ())
1537+ spglib_syms = spglib .get_symmetry (super_structure .get_spglib_cell ())
15381538
15391539 # Convert them into the cellconstructor format
15401540 cc_syms = CC .symmetries .GetSymmetriesFromSPGLIB (spglib_syms , False )
@@ -3655,6 +3655,15 @@ def get_free_energy_hessian(self, include_v4 = False, get_full_hessian = True, v
36553655 # """
36563656 # raise NotImplementedError(ERROR_MSG)
36573657
3658+ # Check if the ensemble has been initialized
3659+ if len (self .forces ) == 0 :
3660+ n_forces = len (self .forces )
3661+ raise ValueError (
3662+ f"Cannot evaluate free-energy Hessian: 'self.forces' is empty (len={ n_forces } ). "
3663+ "Initialize or load the ensemble and compute energies and forces first."
3664+ )
3665+
3666+
36583667 # Convert anything into the Ha units
36593668 # This is needed for the Fortran subroutines
36603669 self .convert_units (UNITS_HARTREE )
0 commit comments