3
$\begingroup$

I have an interatomic potential (CHGNet) which is interfaced with pymatgen and can output the stress on any structure. Now, I want to use pymatgen to calculate the bulk modulus for aluminum. The code I use is attached below, along with the output. I used the DeformedStructureSet technique to create different strains on the material, and then using CHGNet predict the stresses corresponding to each strain

from chgnet.model.model import CHGNet
from pymatgen.core import Structure
from pymatgen.analysis.elasticity.strain import Deformation, DeformedStructureSet, Strain
from pymatgen.analysis.elasticity.stress import Stress
from pymatgen.analysis.elasticity import ElasticTensor

chgnet = CHGNet.load()
structure = Structure.from_file('cif_files/Al.cif')
prediction = chgnet.predict_structure(structure)

eq_stress = Stress(prediction['s'])

deformed_structure = DeformedStructureSet(structure)

strain_list = [i.green_lagrange_strain for i in deformed_structure.deformations]
stress_list = []

for i in range(len(deformed_structure)):
    prediction = chgnet.predict_structure(deformed_structure[i])
    stress_list.append(Stress(prediction['s']))

elastic_tensor = ElasticTensor.from_independent_strains(strain_list, stress_list, eq_stress)

print(elastic_tensor.property_dict)

The answer I get is:

{'k_voigt': 9.845064083735359, 'k_reuss': 9.845063833881039, 'k_vrh': 9.845063958808199, 'g_voigt': 8.0023897488912, 'g_reuss': 4.5904549461157655, 'g_vrh': 6.2964223475034835, 'universal_anisotropy': 3.716336252207812, 'homogeneous_poisson': 0.23641618649298335, 'y_mod': 15569997014.898907}

This is wrong, since the bulk modulus of aluminum is around 76-80 GPa. What have I missed? Or is there some obvious mistake? I am more than happy to be directed in the correct way. Many thanks!

$\endgroup$
4
  • $\begingroup$ +1, but why did you delete your previous question? Did you find the answer to it, or you no longer need the answer? Also, why did you add the materials-project tag? $\endgroup$ Commented Oct 17, 2023 at 18:03
  • $\begingroup$ @NikeDattani I no longer needed the answer to that. This is because I decided to change my workflow for the calculation. I added the materials-project tag for completeness because the data on which CHGNet is trained is from the materials project. I will be happy to remove the tag if this is not a valid reason $\endgroup$
    – xlr
    Commented Oct 17, 2023 at 18:09
  • $\begingroup$ You can keep the tag, it just wasn't clear to me why it was there! Also, can you please undelete the question and ask for it to be closed instead? It's better for the question to still be "not deleted" so that if someone does want to write an answer, they can still do it. $\endgroup$ Commented Oct 17, 2023 at 18:11
  • $\begingroup$ @NikeDattani For sure, will do that $\endgroup$
    – xlr
    Commented Oct 17, 2023 at 18:13

0

You must log in to answer this question.