def read_eterms(self, unit="eV"): """|AttrDict| with the decomposition of the total energy in units ``unit``""" return AttrDict( etotals=units.EnergyArray(self.read_value("etotal"), "Ha").to(unit), kinetic_terms=units.EnergyArray(self.read_value("ekin"), "Ha").to(unit), entropies=units.EnergyArray(self.read_value("entropy"), "Ha").to(unit), )
def fit(self, volumes, energies, vol_unit="ang^3", ene_unit="eV"): """ Fit energies [eV] as function of volumes [Angstrom**3]. Returns `EosFit` instance that gives access to the optimal volume, the minumum energy, and the bulk modulus. Notice that the units for the bulk modulus is eV/Angstrom^3. """ # Convert volumes to Ang**3 and energies to eV (if needed). volumes = units.ArrayWithUnit(volumes, vol_unit).to("ang^3") energies = units.EnergyArray(energies, ene_unit).to("eV") return EOS_Fit(volumes, energies, self._func, self._eos_name)
def fit(self, volumes, energies, vol_unit="ang^3", energy_unit="eV"): """ Fit energies (in eV) as function of volumes (in Angstrom**3). Args: volumes (list/np.array) energies (list/np.array) vol_unit (str): volume units energy_unit (str): energy units Returns: EOSFit: EOSFit object that gives access to the optimal volume, the minumum energy, and the bulk modulus. Note: the units for the bulk modulus is eV/Angstrom^3. """ # Convert volumes to Ang**3 and energies to eV (if needed). volumes = units.ArrayWithUnit(volumes, vol_unit).to("ang^3") energies = units.EnergyArray(energies, energy_unit).to("eV") return EOSFit(volumes, energies, self._func, self._eos_name)