Refactor detailsΒΆ
There has been a major refactor from v0.2.2 to v0.3. The main changes
are:
- Crystal parameters (cell vectors, atomic positions etc.) are now contained
within a
Crystalobject - Crystal parameters referencing ions have been renamed to atoms e.g.
n_atoms,atom_r,atom_type - Shortened names have been extended
cell_vecs->cell_vectors,eigenvecs->eigenvectors,freqs->frequenciesetc. InterpolationDatahas been renamed toForceConstantsand is now a top-level import e.g.from euphonic import ForceConstantsPhononDatahas been renamed toQpointPhononModesand is now a top-level import e.g.from euphonic import QpointPhononModesInterpolationData.calculate_fine_phononshas been renamed toForceConstants.calculate_qpoint_phonon_modes- The arguments for
ForceConstants.from_castepandQpointPhononModes.from_castephave changed. The full filename must be specified and the file and path are no longer separate arguments e.g.ForceConstants.from_castep('quartz/quartz.castep_bin') - LO-TO split frequencies are no longer contained in their own arrays
(
split_freqs,split_eigenvecs,split_i), instead gamma-points are duplicated in the mainfrequenciesarray ForceConstantsis no longer a subclass ofQpointPhononModes. WhenForceConstants.calculate_qpoint_phonon_modesis called, a newQpointPhononModesobject is returned, rather than writing the frequencies into theForceConstantsobject.- Some attributes are now pint
Quantityobjects to ensure they have the correct units. e.g.ForceConstants.dielectric - All objects have
from_dict,to_dict,from_json_fileand ``to_json_file``methods - New objects have been created to store data, rather than being stored as
arrays in the ForceConstants or QPointPhononModes objects. This includes
DebyeWallerandStructureFactor - Density of states, and S(Q,w) are now stored in generic
Spectrum1DandSpectrum2Dobjects respectively - Any broadening is now performed by the
SpectrumNDobjects and returns a new, broadenedSpectrumNDobject - DOS and S(Q,w) plotting is now done by generic
plot_1dandplot_2dfunctions BandsDataand the ability to read CASTEP .bands files has been removed. This will be implemented in another project. Get in contact for details.