mammos_dft quickstart#

mammos_dft provides access to entities that can be computed with DFT.

  • The db (database) submodule contains pre-computed materials.

import mammos_dft

Querying the database – mammos_dft.db#

List available materials#

Use the following function to get a list of all available materials:

mammos_dft.db.find_materials()
chemical_formula space_group_name space_group_number cell_length_a cell_length_b cell_length_c cell_angle_alpha cell_angle_beta cell_angle_gamma cell_volume ICSD_label OQMD_label label SpontaneousMagnetization UniaxialAnisotropyConstant
0 Co2Fe2H4 P6_3/mmc 194 2.645345 Angstrom 2.645314 Angstrom 8.539476 Angstrom 90.0 deg 90.0 deg 120.0 deg 51.751119 Angstrom3 0001 1190240.2412648 A / m 2810000.0 J / m3
1 FeCoSi Pnma 62 4.942 Angstrom 3.776 Angstrom 7.172 Angstrom 90.0 deg 90.0 deg 90.0 deg 133.84 Angstrom3 165250 icsd-165250 0002 684366.2549226 A / m 440000.0 J / m3
2 Nd2Fe14B P42/mnm 136 8.78 Angstrom 8.78 Angstrom 12.12 Angstrom 90.0 deg 90.0 deg 90.0 deg 933.42 Angstrom3 0003 1280000.0 A / m 4300000.0 J / m3
3 Fe16N2 P42/mnm 136 8.78 Angstrom 8.78 Angstrom 12.12 Angstrom 90.0 deg 90.0 deg 90.0 deg 933.42 Angstrom3 0005 1671126.902464901 A / m 1100000.0 J / m3
4 Fe3Y 0 5.088172 Angstrom 5.088172 Angstrom 24.355398 Angstrom 90.0 deg 90.0 deg 120.0 deg 546.071496 Angstrom3 0006 851479.0 A / m -930000.0 J / m3
5 Fe2.33Ta0.67Y 0 5.227483 Angstrom 5.227483 Angstrom 25.022642 Angstrom 90.0 deg 90.0 deg 120.0 deg 592.173679 Angstrom3 0007 612746.0 A / m 2170000.0 J / m3

Get micromagnetic properties#

Use the following function to get an object that contains spontaneous magnetization Ms_0 and uniaxial anisotropy constant Ku_0 at T=0K:

results_dft = mammos_dft.db.get_micromagnetic_properties("Co2Fe2H4")
results_dft
MicromagneticProperties(Ms_0=Entity(ontology_label='SpontaneousMagnetization', value=np.float64(1190240.2412648), unit='A / m'), Ku_0=Entity(ontology_label='UniaxialAnisotropyConstant', value=np.float64(2810000.0), unit='J / m3'))
results_dft.Ms_0
SpontaneousMagnetization(value=1190240.2412648, unit=A / m)
results_dft.Ku_0
UniaxialAnisotropyConstant(value=2810000.0, unit=J / m3)

Get UppASD inputs#

Use the following function te get an object that contains information required as input for UppASD:

  • a file posfile with atom positions in the form posfiletype

  • a file momfile with magnetic moments of the atoms

  • a file exchange with exchange coupling constants Jij, with atom pairs ij following convention maptype

  • cell containing basis vectors of the unit cell read from the cif file

uppasd_input = mammos_dft.db.get_uppasd_properties("Co2Fe2H4")
uppasd_input
UppasdProperties(Co2Fe2H4)
uppasd_input.posfile
PosixPath('/home/mlang/repos/mammos/mammos-devtools/packages/mammos-dft/src/mammos_dft/data/0001/posfile')
uppasd_input.posfiletype
'D'
uppasd_input.momfile
PosixPath('/home/mlang/repos/mammos/mammos-devtools/packages/mammos-dft/src/mammos_dft/data/0001/momfile')
uppasd_input.exchange
PosixPath('/home/mlang/repos/mammos/mammos-devtools/packages/mammos-dft/src/mammos_dft/data/0001/exchange')
uppasd_input.maptype
2
uppasd_input.cell
Cell([[2.645345, 0.0, 0.0], [-1.3226722338393606, 2.290900329657839, 0.0], [0.0, 0.0, 8.539476]])