pymatgen icon indicating copy to clipboard operation
pymatgen copied to clipboard

All the Potentials are not written properly

Open aakhiltayal opened this issue 1 year ago • 4 comments

https://github.com/materialsproject/pymatgen/blob/ac8a7e9cd93ba9f7afeaced45dc28af6d4e151d4/pymatgen/io/feff/inputs.py#L927

@matthewcarbone While using the Potentials card to write potential it was found that it did not write all the potentials in the feff.inp file which makes the feff.inp file not usable for the further calculations. The exclusion of L927-L928 fix the issue but needs to be checked if it didn't create other issues as it was put deliberately.

for e.g the structure is pull from the materials project and passes to the Potential card the output doesnot have all the potentials but if L927 and L928 is excluded the output is correct.

potential_pymatgen = Potential(struct=structures['mp-1009019'], absorbing_atom='Fe')

In [37]: print(str(potential_pymatgen))
POTENTIALS 
  *ipot    Z  tag      lmax1    lmax2    xnatph(stoichometry)    spinph
******-  **-  ****-  ******-  ******-  **********************  ********
      0   26  Fe          -1       -1                  0.0001         0
      1    7  N           -1       -1                  1              0
In [38]: potential_modified  = Potential_rewrite(structure=structures['mp-1009019'], absorbing_atom='Fe')

In [39]: print(str(potential_modified))
POTENTIALS 
  *ipot    Z  tag      lmax1    lmax2    xnatph(stoichometry)    spinph
******-  **-  ****-  ******-  ******-  **********************  ********
      0   26  Fe          -1       -1                  0.0001         0
      1   26  Fe          -1       -1                  1              0
      2    7  N           -1       -1                  1              0

aakhiltayal avatar Mar 18 '24 14:03 aakhiltayal

@aakhiltayal to be clear, this only occurs when there's a single absorbing atom in the unit cell, correct?

matthewcarbone avatar Mar 18 '24 16:03 matthewcarbone

@matthewcarbone No it occurs even for two atom system as I shown for FeN. When I pull all the structure for FeN, for some of structures all the potentials are written. I think it is because they have composition like Fe2N2 and have four atom in the structure but for cases where composition is like Fe1N1 and only two atom in structure it did not write all the potentials.

aakhiltayal avatar Mar 18 '24 16:03 aakhiltayal

No I mean a single absorbing atom in the unit cell. Based on the structure, it looks like there's a single Fe/unit cell. I don't think this problem occurs when there are multiple, even symmetrically equivalent, atoms in the unit cell.

And just to be clear, what I mean by this is that this occurs in the case when you have some absorbing atom type and there is exactly one of those atoms in the unit cell.

matthewcarbone avatar Mar 18 '24 16:03 matthewcarbone

@matthewcarbone That is true

aakhiltayal avatar Mar 18 '24 16:03 aakhiltayal