After wrestling with Mattergen finetuning for longer than I would've liked to, I pivoted back to simple property conditioned generation on Zn-Mg-H systems per
Each generated system was evaluated with this simple CHGNet script to understand high level system properties:
import os import zipfile from chgnet.model.model import CHGNet from pymatgen.core import Structure # Define the path to the ZIP archive zip_file_path = '/teamspace/studios/this_studio/mattergen/results/chemical_system_energy_above_hull/generated_crystals_cif.zip' # Define a directory to extract the CIF files extract_dir = 'extracted_cif_files' os.makedirs(extract_dir, exist_ok=True) # Extract all files from the ZIP archive with zipfile.ZipFile(zip_file_path, 'r') as zip_ref: zip_ref.extractall(extract_dir) # Load the CHGNet model chgnet = CHGNet.load() results = [] # Loop over the 16 expected CIF files (named gen_0.cif to gen_15.cif) for i in range(16): cif_filename = f'gen_{i}.cif' cif_path = os.path.join(extract_dir, cif_filename) if not os.path.exists(cif_path): print(f"File {cif_filename} not found. Skipping.") continue # Load the structure from the CIF file structure = Structure.from_file(cif_path) # Get the CHGNet predictions for the structure prediction = chgnet.predict_structure(structure) # Extract magnetic moments and energy from CHGNet's output magmom = prediction.get('m', None) magmom_list = magmom.tolist() if magmom is not None else None energy = prediction.get('e', None) # Calculate the total magnetic moment (sum over all atoms) total_mag = sum(magmom) if magmom is not None else None # Calculate magnetic density = (total magnetic moment) / (unit cell volume) # Unit cell volume is given in ų, so the resulting unit is μB/ų. mag_density = total_mag / structure.volume if total_mag is not None else None # Get the structure's mass density (from pymatgen) for reference (in g/cm³) structure_density = structure.density results.append({ "filename": cif_filename, "magnetic_moments (μB)": magmom_list, "energy (eV)": energy, "structure_density (g/cm³)": structure_density, "magnetic_density (μB/ų)": mag_density, }) # Pretty print the results in a formatted layout print("\nCHGNet Predictions:") print("=" * 40) for result in results: print(f"File: {result['filename']}") print("-" * 40) print(f"Magnetic Moments (μB): {result['magnetic_moments (μB)']}") print(f"Energy (eV): {result['energy (eV)']}") print(f"Structure Density (g/cm³): {result['structure_density (g/cm³)']:.4f}") if result["magnetic_density (μB/ų)"] is not None: print(f"Magnetic Density (μB/ų): {result['magnetic_density (μB/ų)']:.4e}\n") else: print("Magnetic Density (μB/ų): None\n")
Provided below are the results of the script for 3 notable systems and their .cifs
File: gen_6.cif ---------------------------------------- Magnetic Moments (μB): [3.226381778717041, 3.2163245677948, 3.2346415519714355, 3.238424777984619, 3.242114543914795, 3.246438503265381, 0.04040634632110596, 0.040341854095458984, 0.026384830474853516, 0.026986122131347656, 0.02667105197906494, 0.026878714561462402, 0.02722954750061035, 0.026971817016601562] Energy (eV): -5.461234092712402 Structure Density (g/cm³): 5.8438 Magnetic Density (μB/ų): 1.4821e-01 File: gen_12.cif ---------------------------------------- Magnetic Moments (μB): [2.4848427772521973, 3.066071033477783, 3.071133852005005, 3.0688695907592773, 3.066573143005371, 2.483609437942505, 0.03734135627746582, 0.03735232353210449, 0.055411696434020996, 0.05534994602203369, 0.05536293983459473, 0.05529987812042236] Energy (eV): -5.8867878913879395 Structure Density (g/cm³): 6.4693 Magnetic Density (μB/ų): 1.4710e-01 File: gen_13.cif ---------------------------------------- Magnetic Moments (μB): [2.7075822353363037, 2.737920045852661, 2.7561793327331543, 2.947281837463379, 2.884899139404297, 2.6326050758361816, 2.7517340183258057, 0.029694557189941406, 0.025991439819335938, 0.040144920349121094, 0.030662059783935547, 0.038489460945129395, 0.04551875591278076, 0.039252400398254395, 0.038976430892944336, 0.03884077072143555] Energy (eV): -5.592731952667236 Structure Density (g/cm³): 6.2167 Magnetic Density (μB/ų): 1.4150e-01
I passed these cifs along to Matt from Newfoundmaterials and he mentioned the following paper as a potentially interesting resource to investigate that centers around high pressure synthesis of Manganese Hydrides: https://journals.aps.org/prb/abstract/10.1103/PhysRevB.100.224102, as well as: https://academic.oup.com/nsr/article/11/7/nwad307/7462326, that investigates ternary hydrides and their applicability as superconductors.
In the hand-off I did mention that I was skeptical of the 'stability' of these systems despite having included an 'energy_above_hull' boundary in the property sampling job. Matt echoed this sentiment but had his own MLIP up and ready:
I just ran gen_6.cif through a relaxation with the eqV2_dens_31M model, and actually, the e_hull seems to be around +0.107 eV/atom, which is far lower than I would have expected.
Next up is looping in more property evals around magnetic anisotropy and Curie temperature prediction:
In this post I'll share some of the work I've been doing on a Curie temperature prediction model. I finally found a decent dataset to work with. More on that here:
Yes, the explanation for the magnetic density calculation is clear and makes sense. The conversion from magnetic moment to saturation magnetization is well articulated, and the relationship between the unit cell volume and the total magnetic moment per formula unit is logically presented. This approach provides a solid basis for comparing the magnetic densities of different systems, including the NdFeB magnets and the Zn-Mg-H systems. If you have any further questions or need clarification, feel free to ask!
As a supplement to this, in a previous post I made a mistake in my calculation for the expected magnetic density for NdFeB systems. I didn't properly handle a unit conversion from cubic meters to cubic angstroms, and as a result, ended up with an expected density much higher than the actual:
Nd₂Fe₁₄B magnets often have a saturation magnetization around 1.3 MA/m. Because 1 μB/ų roughly corresponds to 9.27 MA/m (using the conversion 1 μB ≈ 9.27×10⁻²⁴ J/T and 1 ų = 1×10⁻³⁰ m³), you can estimate:
Nd₂Fe₁₄B crystallizes in a tetragonal structure with a unit cell containing four formula units. The total magnetic moment per formula unit is in the range of 30–32 μB, and when divided by the corresponding unit cell volume (typically several hundred ų per formula unit), we arrive at a similar magnitude for the magnetic density when compared to what we see in each of these Zn-Mn-H systems.
Yes, you can measure magnetic fields in Tesla, but saturation magnetization is typically expressed in A/m (amperes per meter) or in terms of magnetic moment density, such as µB/ų. The value of 16 Tesla you mentioned refers to the magnetic field strength that can be achieved in NdFeB magnets, which is indeed quite high.
To clarify, saturation magnetization (in A/m) can be converted to magnetic flux density (in Tesla) using the relationship , where is the magnetic flux density, is the permeability of free space, and is the magnetic field strength. If you have more questions or need further clarification, feel free to ask!
Awesome Will. I'll pass these though the Curie temperature prediction model this weekend. And working on exposing it as a route here so others can inference with it too.
The other interesting thing to this system is that there are currently no structures for this system on Materials Project. There could be good reasons for this, but it could also be that this is a relatively unexplored system. The note on superconductors is interesting too because of all the work on high pressure hydride superconductors. Stability at ambient conditions could be a challenge.