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 posfiletype maptype SpontaneousMagnetization UniaxialAnisotropyConstant source
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 D 2 1190240.0 A / m 2810000.0 J / m3 Uppsala
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 C 2 684366.2549226 A / m 440000.0 J / m3 Uppsala
2 Fe16N2 ? 0 5.680315 Angstrom 5.680315 Angstrom 6.2256 Angstrom 90.0 deg 90.0 deg 90.0 deg 200.875103 Angstrom3 D 2 1671127.0 A / m 1100000.0 J / m3 Uppsala
3 Fe3Y 0 5.088172 Angstrom 5.088172 Angstrom 24.355398 Angstrom 90.0 deg 90.0 deg 120.0 deg 546.071496 Angstrom3 D 2 851479.0 A / m -930000.0 J / m3 Uppsala
4 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 D 2 612746.0 A / m 2170000.0 J / m3 Uppsala

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=1190240.0, unit='A / m'), Ku_0=Entity(ontology_label='UniaxialAnisotropyConstant', value=2810000.0, unit='J / m3'))
results_dft.Ms_0
SpontaneousMagnetization(value=1190240.0, 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/runner/work/mammos/mammos/.pixi/envs/docs/lib/python3.11/site-packages/mammos_dft/data/Co2Fe2H4/posfile')
uppasd_input.posfiletype
'D'
uppasd_input.momfile
PosixPath('/home/runner/work/mammos/mammos/.pixi/envs/docs/lib/python3.11/site-packages/mammos_dft/data/Co2Fe2H4/momfile')
uppasd_input.exchange
PosixPath('/home/runner/work/mammos/mammos/.pixi/envs/docs/lib/python3.11/site-packages/mammos_dft/data/Co2Fe2H4/exchange')
uppasd_input.maptype
2
uppasd_input.cell
array([[ 2.645345  ,  0.        ,  0.        ],
       [-1.32267223,  2.29090033,  0.        ],
       [ 0.        ,  0.        ,  8.539476  ]])